Checks if the given bundle has documentation metadata stored as resource.
@param bundle Bundle
@return true if metadata found
424251
public static boolean hasHalDocs(Bundle bundle) {
    return bundle.getResource(ServiceModelReader.DOCS_CLASSPATH_PREFIX + "/" + ServiceModelReader.SERVICE_DOC_FILE) != null;
  }
72051
protected boolean hasOuDetail() {

        CmsListMetadata meta = getList().getMetadata();
        CmsListItemDetails detail = meta.getItemDetailDefinition(LIST_DETAIL_OTHEROU);
        return (detail != null) && detail.isVisible();
    }
1213155
private void validateBundleId(ResourceBundleDefinition definition) {
		String bundleId = definition.getBundleId();
		if (bundleId != null) {
			if (!bundleId.endsWith(fileExtension)) {
				throw new BundlingProcessException("The extension of the bundle " + definition.getBundleName() + " - "
						+ bundleId + " doesn't match the allowed extension : '" + fileExtension
						+ "'. Please update your bundle definition.");
			} else if (bundleId.startsWith(JawrConstant.WEB_INF_DIR_PREFIX)
					|| bundleId.startsWith(JawrConstant.META_INF_DIR_PREFIX)) {
				throw new BundlingProcessException("For the bundle " + definition.getBundleName() + ", the bundle id '"
						+ bundleId
						+ "' is not allowed because it starts with \"/WEB-INF/\". Please update your bundle definition.");
			}
		}
	}
1142247
@Override
    protected URL findResource(String name) {
        URL result = null;
        // Only check the parent bundle loader if the request is outside of "" or "/"
        if (!!!"".equals(name) && !!!"/".equals(name)) {
            // First try the bundleLoader
            result = bundleLoader.getResource(name);
        }
        // This doesn't have access to ALL split packages (it just gets one) so it's augmented with a resource provider  
        return result == null ? resourceProviders.findResource(name) : result;
    }
969267
public boolean getBoolean( String key )
        throws MissingResourceException
    {
        ResourceBundle bundle = getBundle();
        String value = bundle.getString( key );
        return "true".equalsIgnoreCase( value );
    }
317018
private boolean hasResourceBindingsNeedingResource(int sdk) {
    for (ResourceBinding binding : resourceBindings) {
      if (binding.requiresResources(sdk)) {
        return true;
      }
    }
    return false;
  }
561555
function getMetaFilePaths(wofRoot, bundles) {
  return bundles.map((bundle) => {
    return path.join(wofRoot, 'meta', bundle);
  });
}
76460
private boolean isAvailable(String... bundleNames) {

    for (String name : bundleNames) {
      ResourceBundle.getBundle(name, AbstractNlsMessage.LOCALE_ROOT);
    }
    return true;
  }
270672
public function bundleExists($bundle)
    {
        $kernelBundles = $this->getConfigurationPool()->getContainer()->getParameter('kernel.bundles');
        if (array_key_exists($bundle, $kernelBundles)) {
            return true;
        }
        if (in_array($bundle, $kernelBundles)) {
            return true;
        }

        return false;
    }
947041
@Override
	public Reader getResource(JoinableResourceBundle bundle, String resourceName, boolean processingBundle) {

		Reader rd = null;
		String realPath = getRealResourcePath(resourceName);
		if (isFileSystemPath(resourceName, realPath)) { // The resource has been
														// remapped
			try {
				rd = new FileReader(realPath);
			} catch (FileNotFoundException e) {
				LOGGER.debug("The resource " + realPath + " has not been found");
			}
		}
		if (rd == null) {
			rd = super.getResource(bundle, realPath, processingBundle);
		}

		return rd;
	}
544606
@SuppressWarnings("static-method")
	protected boolean isSourceFile(Resource resource) {
		if (resource instanceof BatchLinkableResource) {
			return !((BatchLinkableResource) resource).isLoadedFromStorage();
		}
		return false;
	}
225851
@Override
	protected void addBundlesToMapping() throws DuplicateBundlePathException {
		Set<String> paths = rsHandler.getResourceNames(baseDir);

		for (String path : paths) {
			path = PathNormalizer.joinPaths(baseDir, path);
			if (!excludedPaths.contains(path) && rsHandler.isDirectory(path)) {
				String bundleKey = path + resourceExtension;
				addBundleToMap(bundleKey, path + "/**");
				if (LOGGER.isDebugEnabled())
					LOGGER.debug("Added [" + bundleKey + "] with value [" + path + "/**] to a generated path list");
			}
		}
	}
180122
public synchronized void initPathToResourceBundleMap(List<JoinableResourceBundle> bundles) throws IOException {

		for (JoinableResourceBundle bundle : bundles) {

			// Remove bundle reference from existing mapping if exists
			removePathMappingFromPathMap(bundle);

			List<PathMapping> mappings = bundle.getMappings();
			for (PathMapping pathMapping : mappings) {
				register(pathMapping);
			}

			// Register file path mapping for linked resources
			List<FilePathMapping> fMappings = bundle.getLinkedFilePathMappings();
			for (FilePathMapping fMapping : fMappings) {
				register(fMapping);
			}
		}
	}
267762
Boolean isResource(String resource) {
		Boolean isResource = false;
		if (!utils.isIdentifier(resource)) {
			try {
				String clazz = getControllerClass(resource);
				if (clazz != null) {
					Class.forName(clazz);
					isResource = true;
				}
			} catch (ClassNotFoundException e) {
				// It isn't a resource because there isn't a controller for it
			}
		}
		return isResource;
	}
1276321
private Optional<ResourceBundle> getResourceBundle(final String name) {
		try {
			LOGGER.debug("Resource bundle: " + name);
			return Optional.of(getBundle(name,
				new ResourceBundleControl(getResourceBundleCharset())));
		} catch (final MissingResourceException ex) {
			LOGGER.debug("No resource bundle could be determined: " + ex.getMessage());
			return Optional.empty();
		}
	}
943525
@Override
	public void writeBundleTo(String bundlePath, Writer writer) throws ResourceNotFoundException {

		Reader rd = null;

		try {

			// If debug mode is on, resources are retrieved one by one.
			if (config.isDebugModeOn()) {

				rd = resourceHandler.getResource(null, bundlePath);
			} else {

				for (String prefix : bundlePrefixes) {
					if (bundlePath.startsWith(prefix)) {
						bundlePath = bundlePath.substring(prefix.length());
						break;
					}
				}

				// Prefixes are used only in production mode
				String path = PathNormalizer.removeVariantPrefixFromPath(bundlePath);
				rd = resourceBundleHandler.getResourceBundleReader(path);
				if (liveProcessBundles.contains(path)) {
					rd = processInLive(rd);
				}
			}

			IOUtils.copy(rd, writer);
			writer.flush();
		} catch (IOException e) {
			throw new BundlingProcessException("Unexpected IOException writing bundle[" + bundlePath + "]", e);
		} finally {
			IOUtils.close(rd);
			IOUtils.close(writer);
		}
	}
240925
public boolean canBeBundledWith (@Nonnull final WebSiteResourceWithCondition aOther)
  {
    ValueEnforcer.notNull (aOther, "Other");

    // Resource cannot be bundled at all
    if (!m_bIsBundlable || !aOther.isBundlable ())
      return false;

    // Can only bundle resources of the same type
    if (!m_aResource.getResourceType ().equals (aOther.m_aResource.getResourceType ()))
      return false;

    // If the conditional comment is different, items cannot be bundled!
    if (!EqualsHelper.equals (m_sConditionalComment, aOther.m_sConditionalComment))
      return false;

    // If the CSS media list is different, items cannot be bundled!
    if (!EqualsHelper.equals (m_aMediaList, aOther.m_aMediaList))
      return false;

    // Can be bundled!
    return true;
  }