/*
(non-Javadoc)

@see net.jawr.web.resource.bundle.handler.ResourceBundlesHandler#
getDirtyBundleNames()
545018
@Override
	public List<String> getDirtyBundleNames() {

		List<String> bundleNames = new ArrayList<>();
		List<JoinableResourceBundle> bundlesToRebuild = getBundlesToRebuild();
		for (JoinableResourceBundle bundle : bundlesToRebuild) {
			bundleNames.add(bundle.getName());
		}
		return bundleNames;
	}
767391
public final Set<String> getBundleDependencies() {
		final Set<String> bundles = new TreeSet<>();
		updateBundleList(bundles);
		return bundles;
	}
721505
@GET
   @Produces(MediaType.APPLICATION_JSON)
   @RolesAllowed("administrators")
   @Path("/repositories")
   public Response getRepositoryNames()
   {
      List<String> repositories = new ArrayList<String>();

      for (RepositoryEntry rEntry : repositoryService.getConfig().getRepositoryConfigurations())
      {
         repositories.add(rEntry.getName());
      }

      return Response.ok(new NamesList(repositories)).cacheControl(NO_CACHE).build();
   }
211368
List<CmsResource> getBundleResources() {

        List<CmsResource> resources = new ArrayList<>(m_bundleFiles.values());
        if (m_desc != null) {
            resources.add(m_desc);
        }
        return resources;

    }
1281516
public String[] getResourceNames() {
        if (null != resourcesList) {
            return resourcesList.toArray(new String[resourcesList.size()]);
        }
        if (null != basedirListing) {
            return basedirListing.toArray(new String[basedirListing.size()]);
        }
        String[] list = listZipPath(zipFile, resourcesBasedir);
        if (null != list) {
            basedirListing = Arrays.asList(list);
            return list;
        }
        return new String[0];
    }
143354
private String getBundleName() {
        StringBuffer bundleName = new StringBuffer(24);
        // We can't get bundle-name since it requires AdminPermission.
        // bundleName.append((String)bc.getBundle().getHeaders().get("Bundle-Name"));
        // If name was not found use the Bid as name.
        if (bundleName.length() <= 0) {
            bundleName.append("bid#");
            bundleName.append(String.valueOf(bundleId));
        }
        if (bundleName.length() < 12) {
            bundleName.append("            ");
            bundleName.setLength(12);
        }
        return bundleName.toString();
    }
950959
@Override
	public List<BundlePath> getItemDebugPathList(Map<String, String> variants) {

		if (StringUtils.isNotEmpty(debugURL)) {
			return bundlePathMapping.getItemDebugPathList();
		}
		return getItemPathList(bundlePathMapping.getItemDebugPathList(), variants);
	}
1353954
private void initResourceBundles(List<JoinableResourceBundle> resourceBundles)
			throws DuplicateBundlePathException, BundleDependencyException {

		// Create custom defined bundles
		bundleDefinitionsWithDependencies = new HashSet<>();
		if (null != bundleDefinitions) {
			if (LOGGER.isInfoEnabled())
				LOGGER.info("Adding custom bundle definitions. ");
			for (ResourceBundleDefinition def : bundleDefinitions) {
				// If this is a composite bundle
				if (def.isComposite()) {
					resourceBundles.add(buildCompositeResourcebundle(def));
				} else
					resourceBundles.add(buildResourcebundle(def));
			}
		}

		// Normalize the base Dir if needed
		if (!jawrConfig.getGeneratorRegistry().isPathGenerated(baseDir)) {
			this.baseDir = PathNormalizer.asDirPath(baseDir);
		}

		// Use the dirmapper if specified
		if (useDirMapperFactory) {
			if (LOGGER.isInfoEnabled())
				LOGGER.info("Using ResourceBundleDirMapper. ");

			ResourceBundleDirMapper dirFactory = new ResourceBundleDirMapper(baseDir, resourceReaderHandler,
					resourceBundles, fileExtension, excludedDirMapperDirs);
			Map<String, String> mappings = dirFactory.getBundleMapping();
			for (Entry<String, String> entry : mappings.entrySet()) {
				resourceBundles.add(buildDirMappedResourceBundle(entry.getKey(), entry.getValue()));
			}
		}

		if (this.scanForOrphans) {
			// Add all orphan bundles
			OrphanResourceBundlesMapper orphanFactory = new OrphanResourceBundlesMapper(baseDir, resourceReaderHandler,
					jawrConfig.getGeneratorRegistry(), resourceBundles, fileExtension);
			List<String> orphans = orphanFactory.getOrphansList();

			// Orphans may be added separately or as one single resource bundle.
			if (useSingleResourceFactory) {
				// Add extension to the filename
				if (!singleFileBundleName.endsWith(fileExtension))
					singleFileBundleName += fileExtension;

				if (LOGGER.isInfoEnabled())
					LOGGER.info("Building bundle of orphan resources with the name: " + singleFileBundleName);

				resourceBundles.add(buildOrphansResourceBundle(singleFileBundleName, orphans));

			} else {
				if (LOGGER.isInfoEnabled())
					LOGGER.info("Creating mappings for orphan resources. ");
				for (Iterator<String> it = orphans.iterator(); it.hasNext();) {
					resourceBundles.add(buildOrphanResourceBundle(it.next()));
				}
			}
		} else if (LOGGER.isDebugEnabled()) {
			LOGGER.debug("Skipping orphan file auto processing. ");
			if ("".equals(jawrConfig.getServletMapping()))
				LOGGER.debug("Note that there is no specified mapping for Jawr "
						+ "(it has been seet to serve *.js or *.css requests). "
						+ "The orphan files will become unreachable through the server.");
		}

		// Initialize bundle dependencies
		for (ResourceBundleDefinition definition : bundleDefinitionsWithDependencies) {
			JoinableResourceBundle bundle = getBundleFromName(definition.getBundleName(), resourceBundles);
			if (bundle != null) {
				bundle.setDependencies(getBundleDependencies(definition, resourceBundles));
			}
		}
	}
109354
public Set<String> getConfiguredWorkplaceBundles() {

        Set<String> result = new HashSet<String>();
        for (CmsResourceTypeConfig config : internalGetResourceTypes(false)) {
            String bundlename = config.getConfiguredWorkplaceBundle();
            if (null != bundlename) {
                result.add(bundlename);
            }
        }
        return result;
    }
1342162
public String[] getBaseNames(boolean warDeployed) {

		String[] names = configParam.split(GrailsLocaleUtils.RESOURCE_BUNDLE_SEPARATOR);
		List<String> baseNames = new ArrayList<String>();

		for (String baseName : names) {
			
			// Read the properties files to find out the available message keys. It
			// is done differently
			// for run-app or run-war style of runtimes.
			boolean isPluginResoucePath = GrailsLocaleUtils
					.isPluginResoucePath(baseName);

			if (warDeployed) {

				if (isPluginResoucePath) {
					baseName = WEB_INF_DIR+rsReader.getRealResourcePath(baseName);
					
				} else {
					baseName = PROPERTIES_DIR
							+ baseName.substring(baseName.lastIndexOf('.') + 1);
				}

			} else {

				if (isPluginResoucePath) {
					baseName = URI_ABSOLUTE_FILE_PREFIX
							+ rsReader.getRealResourcePath(baseName);
				} else {
					baseName = URI_RELATIVE_FILE_PREFIX + baseName.replaceAll(REGEX_DOT_CHARACTER, JawrConstant.URL_SEPARATOR);
				}
			}
			baseNames.add(baseName);
		}

		return baseNames.toArray(new String[] {});
	}
1358269
@Override
    public boolean __isDirty() {
        return rewrite
               || delegate.size() > firstAppendedIndex
               || !modifiedIndexes.isEmpty()
               || __getDirtyFields().hasNext();
    }
896692
@Override
	public synchronized void rebuildDirtyBundles() {

		if (LOGGER.isDebugEnabled()) {
			LOGGER.debug("Rebuild dirty bundles");
		}

		StopWatch stopWatch = new StopWatch();
		ThreadLocalJawrContext.setStopWatch(stopWatch);

		// Initialize the Thread local for the Jawr context
		ThreadLocalJawrContext.setJawrConfigMgrObjectName(JmxUtils.getMBeanObjectName(servletContext, resourceType,
				jawrConfig.getProperty(JawrConstant.JAWR_JMX_MBEAN_PREFIX)));

		try {
			if (bundlesHandler != null) {
				bundlesHandler.rebuildModifiedBundles();
			}

			if (LOGGER.isDebugEnabled()) {
				LOGGER.debug("Jawr configuration successfully reloaded. ");
			}
			if (PERF_PROCESSING_LOGGER.isDebugEnabled()) {
				PERF_PROCESSING_LOGGER.debug(stopWatch.prettyPrint());
			}

		} catch (InterruptBundlingProcessException e) {
			if (LOGGER.isInfoEnabled()) {
				LOGGER.info("Bundling processed stopped");
			}
		} catch (Exception e) {
			throw new BundlingProcessException("Error while rebuilding dirty bundles : " + e.getMessage(), e);

		} finally {

			// Reset the Thread local for the Jawr context
			ThreadLocalJawrContext.reset();
		}
	}
180325
public Collection<String> getPropertyNames() throws RepositoryException
   {

      HashSet<String> props = new HashSet<String>();
      for (HierarchicalProperty p : properties)
      {
         props.add(p.getStringName());
      }
      return props;

      // PropertyIterator iter = node.getProperties();
      // ArrayList<String> props = new ArrayList<String>();
      // while (iter.hasNext()) {
      // String name = iter.nextProperty().getName();
      // if (!"jcr:primaryType".equals(name) && !"jcr:mixinTypes".equals(name)
      // && !"jcr:data".equals(name) && !"jcr:uuid".equals(name))
      // props.add(name);
      // }
      // return props;
   }
829306
public java.util.List<BundleTask> getBundleTasks() {
        if (bundleTasks == null) {
            bundleTasks = new com.amazonaws.internal.SdkInternalList<BundleTask>();
        }
        return bundleTasks;
    }
391001
Collection<File> getDirectories(NameNodeDirType dirType)
      throws IOException {
    ArrayList<File> list = new ArrayList<File>();
    Iterator<StorageDirectory> it = (dirType == null) ? dirIterator() :
                                    dirIterator(dirType);
    for ( ;it.hasNext(); ) {
      StorageDirectory sd = it.next();
      list.add(sd.getRoot());
    }
    return list;
  }
1312849
@Override
    public Collection<String> getSlaveDataSourceNames() {
        if (disabledDataSourceNames.isEmpty()) {
            return super.getSlaveDataSourceNames();
        }
        Collection<String> result = new LinkedList<>(super.getSlaveDataSourceNames());
        result.removeAll(disabledDataSourceNames);
        return result;
    }
1027910
public function getBundeled() : array
    {
        $directory = MODULARITY_PATH . 'source/php/Module/';
        $bundeled = array();

        foreach (@glob($directory . "*", GLOB_ONLYDIR) as $folder) {
            $bundeled[$folder] = basename($folder);
        }

        return $bundeled;
    }