Checks the bundle name

@param bundleName
the bundle name
@param bundleMap
the bundle map
178930
private void checkBundleName(String bundleName, Map<String, JoinableResourceBundle> bundleMap) {
		if (!JAWR_ROOT_MODULE_NAME.equals(bundleName)) {
			boolean moduleExist = bundleMap.get(bundleName) != null;
			if (!moduleExist) {
				throw new BundlingProcessException("The bundle name '" + bundleName
						+ "' defined in 'jawr.js.closure.modules' is not defined in the configuration. Please check your configuration.");
			}
		}
	}
497646
private void addFilePathMapping(BundlePathMapping bundlePathMapping, Set<String> paths) {
		for (String path : paths) {
			addFilePathMapping(bundlePathMapping, path);
		}
	}
1270131
public boolean isResourceBundleMatch(Object objResource, Bundle bundle)
    {
    	Resource resource = (Resource)objResource;
    	return ((bundle.getSymbolicName().equals(resource.getSymbolicName())) && (isValidVersion(bundle.getVersion(), resource.getVersion().toString())));
    }
995995
public ResourceBundle getBundle(final String bundleName) {
		LOG.info("Getting bundle: " + bundleName);
		return bundles.get(bundleName);
	}
406272
public void registerLookupBundles(final List<GuiceyBundle> bundles) {
        setScope(ConfigScope.BundleLookup.getType());
        for (GuiceyBundle bundle : bundles) {
            register(ConfigItem.Bundle, bundle);
        }
        closeScope();
        lifecycle().bundlesFromLookupResolved(bundles);
        lifecycle().bundlesResolved(getEnabledBundles(), getDisabledBundles());
    }
1197117
@Override
	public void storeJawrBundleMapping(Properties bundleMapping) {

		File bundleMappingFile = new File(tempDirPath, mappingFileName);
		OutputStream out = null;
		try {
			out = new FileOutputStream(bundleMappingFile);
			bundleMapping.store(out, "Jawr mapping");
		} catch (IOException e) {
			LOGGER.error("Unable to store the bundle mapping");
		} finally {
			IOUtils.close(out);
		}

	}
938162
public boolean getCustomBundleBooleanProperty(String bundleName, String key) {
		return Boolean.parseBoolean(props.getProperty(
				prefix + PropertiesBundleConstant.BUNDLE_FACTORY_CUSTOM_PROPERTY + bundleName + key, "false"));
	}
39611
public void bundleChanged(BundleEvent bundleEvent) {
        final String topic = getTopic(bundleEvent);

        // Bail quickly if the event is one that should be ignored
        if (topic == null) {
            return;
        }

        // Event properties
        Map<String, Object> eventProperties = new HashMap<String, Object>();

        // "event" --> the original event object
        eventProperties.put(EventConstants.EVENT, bundleEvent);

        // Non-null result from getBundle
        // "bundle.id" --> source bundle id as Long
        // "bundle.symbolicName" --> source bundle's symbolic name
        // "bundle" --> the source bundle object
        Bundle bundle = bundleEvent.getBundle();
        if (bundle != null) {
            eventProperties.put(EventConstants.BUNDLE_ID, Long.valueOf(bundle.getBundleId()));
            String symbolicName = bundle.getSymbolicName();
            if (symbolicName != null) {
                eventProperties.put(EventConstants.BUNDLE_SYMBOLICNAME, symbolicName);
            }
            eventProperties.put(EventConstants.BUNDLE, bundle);
        }

        // Construct and fire the event
        Event event = new Event(topic, eventProperties);
        eventAdmin.postEvent(event);
    }
1016997
@NonNull
    public static Set<String> keySet(@Nullable Bundle bundle) {
        if (bundle == null) {
            return Collections.emptySet();
        }
        return bundle.keySet();
    }
730097
private List<JoinableResourceBundle> getBundlesFromName(List<String> names, List<JoinableResourceBundle> bundles) {

		List<JoinableResourceBundle> resultBundles = new ArrayList<>();
		for (String name : names) {
			for (JoinableResourceBundle bundle : bundles) {
				if (bundle.getName().equals(name)) {
					resultBundles.add(bundle);
				}
			}
		}

		return resultBundles;
	}
965901
public List<String> getDirtyBundleNames() {

		List<String> bundleNames = new ArrayList<>();
		if (bundlesHandler != null) {
			bundleNames = bundlesHandler.getDirtyBundleNames();
		}

		return bundleNames;
	}
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);
			}
		}
	}
1075430
public void setBundleList(java.util.Collection<BundleDetails> bundleList) {
        if (bundleList == null) {
            this.bundleList = null;
            return;
        }

        this.bundleList = new java.util.ArrayList<BundleDetails>(bundleList);
    }
1012028
private void addPathMapping(BundlePathMapping bundlePathMapping, String pathMapping) {

		addFilePathMapping(bundlePathMapping, pathMapping);

		if (!bundle.getInclusionPattern().isIncludeOnlyOnDebug()) {
			bundlePathMapping.getItemPathList().add(new BundlePath(bundle.getBundlePrefix(), pathMapping));
		}

		if (!bundle.getInclusionPattern().isExcludeOnDebug()) {
			bundlePathMapping.getItemDebugPathList().add(new BundlePath(bundle.getBundlePrefix(), pathMapping));
		}

	}
174044
public void register(Bundler bundler) {
    if (bundler == null) throw new NullPointerException("Cannot register null bundler.");

    if (runner.state == BundleServiceRunner.State.SAVING) {
      throw new IllegalStateException("Cannot register during onSave");
    }

    if (bundlers.add(bundler)) bundler.onEnterScope(scope);
    String mortarBundleKey = bundler.getMortarBundleKey();
    if (mortarBundleKey == null || mortarBundleKey.trim().equals("")) {
      throw new IllegalArgumentException(format("%s has null or empty bundle key", bundler));
    }

    switch (runner.state) {
      case IDLE:
        toBeLoaded.add(bundler);
        runner.servicesToBeLoaded.add(this);
        runner.finishLoading();
        break;
      case LOADING:
        if (!toBeLoaded.contains(bundler)) {
          toBeLoaded.add(bundler);
          runner.servicesToBeLoaded.add(this);
        }
        break;

      default:
        throw new AssertionError("Unexpected state " + runner.state);
    }
  }
1323633
function Bundle(packages, name)
    {
        this.packages = _.map(packages, function (package) {

            if (_.isString(package)) {
                return new Package(package);
            }

            return package;
        });
        this.name = name || 'bundle';
    }
37109
private MessageResources lookupStrutsBundle(String name) {
        Object value = _servletContext.getAttribute(name);
        if(value instanceof MessageResources)
            return (MessageResources)value;
        else {
            if(value != null)
                LOGGER.warn("Can not resolve module bundle with name \"" +
                    name
                    + "\".  The object resolved from ServletContext is of type "
                    + value.getClass().toString());
            return null;
        }
    }