Returns the PathMapping for the generated resource

@param bundle
the bundle
@param path
the generated path
@param rsReader
the resource reader handler
@return the PathMapping for the generated resource
169772
public List<PathMapping> getGeneratedPathMappings(JoinableResourceBundle bundle, String path,
			ResourceReaderHandler rsReader) {

		List<PathMapping> pathMappings = null;
		ResourceGenerator resourceGenerator = getResourceGenerator(path);
		if (resourceGenerator instanceof PathMappingProvider) {
			pathMappings = ((PathMappingProvider) resourceGenerator).getPathMappings(bundle, path, rsReader);
		}

		return pathMappings;
	}
1296158
public static String get(Bundle bundle) {
    String applicationPath = ApplicationPath.get(bundle);
    if (applicationPath == null) {
      return null;
    }
    if (!hasHalDocs(bundle)) {
      return null;
    }
    return get(applicationPath);
  }
1317377
@Override
	public Reader getResource(JoinableResourceBundle bundle, String resourceName, boolean processingBundle) {

		Reader rd = null;
		if (!resourceName.contains(":")) {
			InputStream is = context.getResourceAsStream(resourceName);
			if (is != null) {
				rd = new InputStreamReader(is, charset);
			}
		}
		return rd;
	}
37845
@Override
	public Set<String> getResourcePaths(final String name) {
		final String normalizedname = Path.normalizeResourcePath(name);
		LOG.debug("Searching bundle [" + bundle + "] for resource paths of ["
				+ normalizedname + "]");
		final Enumeration<String> entryPaths = bundle
				.getEntryPaths(normalizedname);
		if (entryPaths == null || !entryPaths.hasMoreElements()) {
			return null;
		}
		Set<String> foundPaths = new HashSet<>();
		while (entryPaths.hasMoreElements()) {
			foundPaths.add(entryPaths.nextElement());
		}
		return foundPaths;
	}
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));
		}

	}
996360
protected void addFilePathMapping(BundlePathMapping bundlePathMapping, String pathMapping) {
		long timestamp = 0;
		String filePath = resourceReaderHandler.getFilePath(pathMapping);
		if (filePath != null) {
			timestamp = resourceReaderHandler.getLastModified(filePath);
			List<FilePathMapping> filePathMappings = bundlePathMapping.getFilePathMappings();
			boolean found = false;
			for (FilePathMapping filePathMapping : filePathMappings) {
				if (filePathMapping.getPath().equals(filePath)) {
					found = true;
					break;
				}
			}
			if (!found) {
				filePathMappings.add(new FilePathMapping(bundle, filePath, timestamp));
			}
		}

	}
234624
@Override
	public Set<String> getResourceNames(String path) {
		return ((WebJarsLocatorPathResolver)resolver).getResourceNames(path);
	}
879251
public BundlePathMapping build() {

		if (LOGGER.isDebugEnabled()) {
			LOGGER.debug("Creating bundle path List for " + this.bundle.getId());
		}

		BundlePathMapping bundlePathMapping = new BundlePathMapping(this.bundle);
		bundlePathMapping.setPathMappings(strPathMappings);
		List<PathMapping> pathMappings = bundlePathMapping.getPathMappings();
		Map<String, VariantSet> variants = new TreeMap<>();

		if (pathMappings != null) {
			for (PathMapping pathMapping : pathMappings) {
				boolean isGeneratedPath = generatorRegistry.isPathGenerated(pathMapping.getPath());

				// Handle generated resources
				// path ends in /, the folder is included without subfolders
				if (pathMapping.isDirectory()) {
					addItemsFromDir(bundlePathMapping, pathMapping, false);
				}
				// path ends in /, the folder is included with all subfolders
				else if (pathMapping.isRecursive()) {
					addItemsFromDir(bundlePathMapping, pathMapping, true);
				} else if (pathMapping.getPath().endsWith(fileExtension)) {
					addPathMapping(bundlePathMapping, asPath(pathMapping.getPath(), isGeneratedPath));
				} else if (generatorRegistry.isPathGenerated(pathMapping.getPath())) {
					addPathMapping(bundlePathMapping, pathMapping.getPath());
				} else if (pathMapping.getPath().endsWith(LICENSES_FILENAME)) {
					bundlePathMapping.getLicensesPathList().add(asPath(pathMapping.getPath(), isGeneratedPath));
				} else {
					throw new BundlingProcessException("Wrong mapping [" + pathMapping + "] for bundle ["
							+ this.bundle.getName() + "]. Please check configuration. ");
				}

				if (isGeneratedPath) {
					// Add variants
					variants = VariantUtils.concatVariants(variants,
							generatorRegistry.getAvailableVariants(pathMapping.getPath()));
				}
			}
		}

		bundle.setVariants(variants);

		if (LOGGER.isDebugEnabled()) {
			LOGGER.debug("Finished creating bundle path List for " + this.bundle.getId());
		}

		return bundlePathMapping;
	}
699881
private JoinableResourceBundle buildDirMappedResourceBundle(String bundleId, String pathMapping) {
		List<String> path = Collections.singletonList(pathMapping);
		JoinableResourceBundle newBundle = new JoinableResourceBundleImpl(bundleId,
				generateBundleNameFromBundleId(bundleId), null, fileExtension, new InclusionPattern(), path,
				resourceReaderHandler, jawrConfig.getGeneratorRegistry());
		return newBundle;
	}
249809
@Override
	public JoinableResourceBundle resolveBundleForPath(String path) {

		JoinableResourceBundle theBundle = null;
		for (Iterator<JoinableResourceBundle> it = bundles.iterator(); it.hasNext();) {
			JoinableResourceBundle bundle = it.next();
			if (bundle.getId().equals(path) || bundle.belongsToBundle(path)) {
				theBundle = bundle;
				break;
			}
		}
		return theBundle;
	}
1164373
private String getStoredBundlePath(String rootDir, String bundleName) {
		if (bundleName.indexOf('/') != -1) {
			bundleName = bundleName.replace('/', File.separatorChar);
		}

		if (!bundleName.startsWith(File.separator)) {
			rootDir += File.separator;
		}

		return rootDir + PathNormalizer.escapeToPhysicalPath(bundleName);
	}
644271
protected ResourceReaderHandler initResourceReaderHandler() {
		ResourceReaderHandler rsHandler = null;
		if (servletContext != null) {
			try {
				rsHandler = new ServletContextResourceReaderHandler(servletContext, jawrConfig, generatorRegistry);
			} catch (IOException e) {
				throw new BundlingProcessException(e);
			}
		}

		return rsHandler;
	}
216324
@Override
	public Reader getResource(JoinableResourceBundle bundle, String resourceName, boolean processingBundle)
			throws ResourceNotFoundException {

		return getResource(bundle, resourceName, processingBundle, new ArrayList<Class<?>>());
	}
1143405
@Override
    public BundleEntry getEntry(String path) {
        path = preSlashify(path);
        if (path.equals("/")) {
            return new RootModuleEntry(container);
        }
        Entry entry = container.getEntry(path);
        return entry == null ? null : new ModuleEntry(entry, postSlashify(path, entry));
    }
1293008
protected String createBundleLink(String bundleId, String contextPath) {
    	
    	// When debug mode is on and the resource is generated the path must include a parameter
    	JawrConfig config = bundler.getConfig();
		if( config.isDebugModeOn() && 
    		config.getGeneratorRegistry().isPathGenerated(bundleId)) {
    		bundleId = PathNormalizer.createGenerationPath(bundleId, config.getGeneratorRegistry(), null);
    	}
    	String fullPath = PathNormalizer.joinPaths(config.getServletMapping(), bundleId);
    	fullPath = PathNormalizer.joinPaths(contextPath,fullPath);

    	return renderLink(fullPath);
    }
1138660
private InputStream getResourceInputStream(String path) {
		InputStream is = config.getContext().getResourceAsStream(path);
		if (is == null) {
			try {
				is = ClassLoaderResourceUtils.getResourceAsStream(path, this);
			} catch (FileNotFoundException e) {
				throw new BundlingProcessException(e);
			}
		}

		return is;
	}
90607
private Reader getResourceReader(String resource) throws ResourceNotFoundException {
		List<Class<?>> excluded = new ArrayList<>();
		excluded.add(ILessCssResourceGenerator.class);
		return rsReaderHandler.getResource(bundle, resource, false, excluded);
	}