id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
7,200
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/postprocess/impl/css/base64/Base64ImageEncoderPostProcessor.java
Base64ImageEncoderPostProcessor.prependBase64EncodedResources
protected void prependBase64EncodedResources(StringBuffer sb, Map<String, Base64EncodedResource> encodedImages) { Iterator<Entry<String, Base64EncodedResource>> it = encodedImages.entrySet().iterator(); StringBuilder mhtml = new StringBuilder(); String lineSeparator = StringUtils.STR_LINE_FEED; mhtml.append("/*...
java
protected void prependBase64EncodedResources(StringBuffer sb, Map<String, Base64EncodedResource> encodedImages) { Iterator<Entry<String, Base64EncodedResource>> it = encodedImages.entrySet().iterator(); StringBuilder mhtml = new StringBuilder(); String lineSeparator = StringUtils.STR_LINE_FEED; mhtml.append("/*...
[ "protected", "void", "prependBase64EncodedResources", "(", "StringBuffer", "sb", ",", "Map", "<", "String", ",", "Base64EncodedResource", ">", "encodedImages", ")", "{", "Iterator", "<", "Entry", "<", "String", ",", "Base64EncodedResource", ">", ">", "it", "=", ...
Prepend the base64 encoded resources to the bundle data @param sb the string buffer containing the processed bundle data @param encodedImages a map of encoded images
[ "Prepend", "the", "base64", "encoded", "resources", "to", "the", "bundle", "data" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/postprocess/impl/css/base64/Base64ImageEncoderPostProcessor.java#L152-L173
7,201
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/handler/reader/ResourceReaderComparator.java
ResourceReaderComparator.getPriority
private int getPriority(ResourceReader o1) { int priority = 0; if (o1 instanceof ServletContextResourceReader) { priority = baseDirHighPriority ? 5 : 4; } else if (o1 instanceof FileSystemResourceReader) { priority = baseDirHighPriority ? 4 : 5; } else if (o1 instanceof CssSmartSpritesResourceReader) { ...
java
private int getPriority(ResourceReader o1) { int priority = 0; if (o1 instanceof ServletContextResourceReader) { priority = baseDirHighPriority ? 5 : 4; } else if (o1 instanceof FileSystemResourceReader) { priority = baseDirHighPriority ? 4 : 5; } else if (o1 instanceof CssSmartSpritesResourceReader) { ...
[ "private", "int", "getPriority", "(", "ResourceReader", "o1", ")", "{", "int", "priority", "=", "0", ";", "if", "(", "o1", "instanceof", "ServletContextResourceReader", ")", "{", "priority", "=", "baseDirHighPriority", "?", "5", ":", "4", ";", "}", "else", ...
Returns the priority of the resource reader if the FileSystemResourceReader is configured with high priority the list of priorities is as follows : 5 - ServletContextResourceReader 4 - FileSystemResourceReader 3 - Generator with prefixed path 2 - Generator with suffixed path 1 - CssSmartSpriteResourceReader if the F...
[ "Returns", "the", "priority", "of", "the", "resource", "reader" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/handler/reader/ResourceReaderComparator.java#L81-L98
7,202
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/servlet/JawrBinaryResourceRequestHandler.java
JawrBinaryResourceRequestHandler.initMapping
private void initMapping(BinaryResourcesHandler binaryRsHandler) { if (jawrConfig.getUseBundleMapping() && rsBundleHandler.isExistingMappingFile()) { // Initialize the binary web resource mapping Iterator<Entry<Object, Object>> mapIterator = bundleMapping.entrySet().iterator(); while (mapIterator.hasNext()...
java
private void initMapping(BinaryResourcesHandler binaryRsHandler) { if (jawrConfig.getUseBundleMapping() && rsBundleHandler.isExistingMappingFile()) { // Initialize the binary web resource mapping Iterator<Entry<Object, Object>> mapIterator = bundleMapping.entrySet().iterator(); while (mapIterator.hasNext()...
[ "private", "void", "initMapping", "(", "BinaryResourcesHandler", "binaryRsHandler", ")", "{", "if", "(", "jawrConfig", ".", "getUseBundleMapping", "(", ")", "&&", "rsBundleHandler", ".", "isExistingMappingFile", "(", ")", ")", "{", "// Initialize the binary web resource...
Initialize the mapping of the binary web resources handler @param binaryRsHandler the binary web resources handler
[ "Initialize", "the", "mapping", "of", "the", "binary", "web", "resources", "handler" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/servlet/JawrBinaryResourceRequestHandler.java#L223-L276
7,203
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/servlet/JawrBinaryResourceRequestHandler.java
JawrBinaryResourceRequestHandler.addBinaryResourcePath
private void addBinaryResourcePath(BinaryResourcesHandler binRsHandler, String resourcePath) { try { String resultPath = CheckSumUtils.getCacheBustedUrl(resourcePath, rsReaderHandler, jawrConfig); binRsHandler.addMapping(resourcePath, resultPath); bundleMapping.put(resourcePath, resultPath); } catch (IOEx...
java
private void addBinaryResourcePath(BinaryResourcesHandler binRsHandler, String resourcePath) { try { String resultPath = CheckSumUtils.getCacheBustedUrl(resourcePath, rsReaderHandler, jawrConfig); binRsHandler.addMapping(resourcePath, resultPath); bundleMapping.put(resourcePath, resultPath); } catch (IOEx...
[ "private", "void", "addBinaryResourcePath", "(", "BinaryResourcesHandler", "binRsHandler", ",", "String", "resourcePath", ")", "{", "try", "{", "String", "resultPath", "=", "CheckSumUtils", ".", "getCacheBustedUrl", "(", "resourcePath", ",", "rsReaderHandler", ",", "j...
Add an binary resource path to the binary map @param binRsHandler the image resources handler @param resourcePath the image path
[ "Add", "an", "binary", "resource", "path", "to", "the", "binary", "map" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/servlet/JawrBinaryResourceRequestHandler.java#L286-L298
7,204
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/servlet/JawrBinaryResourceRequestHandler.java
JawrBinaryResourceRequestHandler.hasBinaryFileExtension
private boolean hasBinaryFileExtension(String path) { boolean result = false; int extFileIdx = path.lastIndexOf("."); if (extFileIdx != -1 && extFileIdx + 1 < path.length()) { String extension = path.substring(extFileIdx + 1); result = binaryMimeTypeMap.containsKey(extension); } return result; }
java
private boolean hasBinaryFileExtension(String path) { boolean result = false; int extFileIdx = path.lastIndexOf("."); if (extFileIdx != -1 && extFileIdx + 1 < path.length()) { String extension = path.substring(extFileIdx + 1); result = binaryMimeTypeMap.containsKey(extension); } return result; }
[ "private", "boolean", "hasBinaryFileExtension", "(", "String", "path", ")", "{", "boolean", "result", "=", "false", ";", "int", "extFileIdx", "=", "path", ".", "lastIndexOf", "(", "\".\"", ")", ";", "if", "(", "extFileIdx", "!=", "-", "1", "&&", "extFileId...
Returns true of the path contains a binary file extension @param path the path @return the binary file extension
[ "Returns", "true", "of", "the", "path", "contains", "a", "binary", "file", "extension" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/servlet/JawrBinaryResourceRequestHandler.java#L307-L317
7,205
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/servlet/JawrBinaryResourceRequestHandler.java
JawrBinaryResourceRequestHandler.addItemsFromDir
private void addItemsFromDir(BinaryResourcesHandler binRsHandler, String dirName, boolean addSubDirs) { Set<String> resources = rsReaderHandler.getResourceNames(dirName); if (LOGGER.isDebugEnabled()) { LOGGER.debug("Adding " + resources.size() + " resources from path [" + dirName + "] to binary bundle"); } ...
java
private void addItemsFromDir(BinaryResourcesHandler binRsHandler, String dirName, boolean addSubDirs) { Set<String> resources = rsReaderHandler.getResourceNames(dirName); if (LOGGER.isDebugEnabled()) { LOGGER.debug("Adding " + resources.size() + " resources from path [" + dirName + "] to binary bundle"); } ...
[ "private", "void", "addItemsFromDir", "(", "BinaryResourcesHandler", "binRsHandler", ",", "String", "dirName", ",", "boolean", "addSubDirs", ")", "{", "Set", "<", "String", ">", "resources", "=", "rsReaderHandler", ".", "getResourceNames", "(", "dirName", ")", ";"...
Adds all the resources within a path to the image map. @param binRsHandler the binary resources handler @param dirName the directory name @param addSubDirs boolean If subfolders will be included. In such case, every folder below the path is included.
[ "Adds", "all", "the", "resources", "within", "a", "path", "to", "the", "image", "map", "." ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/servlet/JawrBinaryResourceRequestHandler.java#L330-L369
7,206
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/servlet/JawrBinaryResourceRequestHandler.java
JawrBinaryResourceRequestHandler.getContentType
@Override protected String getContentType(String filePath, HttpServletRequest request) { String requestUri = request.getRequestURI(); // Retrieve the extension String extension = getExtension(filePath); if (extension == null) { LOGGER.info("No extension found for the request URI : " + requestUri); retu...
java
@Override protected String getContentType(String filePath, HttpServletRequest request) { String requestUri = request.getRequestURI(); // Retrieve the extension String extension = getExtension(filePath); if (extension == null) { LOGGER.info("No extension found for the request URI : " + requestUri); retu...
[ "@", "Override", "protected", "String", "getContentType", "(", "String", "filePath", ",", "HttpServletRequest", "request", ")", "{", "String", "requestUri", "=", "request", ".", "getRequestURI", "(", ")", ";", "// Retrieve the extension", "String", "extension", "=",...
Returns the content type for the image @param filePath the image file path @param request the request @return the content type of the image
[ "Returns", "the", "content", "type", "for", "the", "image" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/servlet/JawrBinaryResourceRequestHandler.java#L532-L552
7,207
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/servlet/JawrBinaryResourceRequestHandler.java
JawrBinaryResourceRequestHandler.getRealFilePath
private String getRealFilePath(String fileName, BundleHashcodeType bundleHashcodeType) { String realFilePath = fileName; if (bundleHashcodeType.equals(BundleHashcodeType.INVALID_HASHCODE)) { int idx = realFilePath.indexOf(JawrConstant.URL_SEPARATOR, 1); if (idx != -1) { realFilePath = realFilePath.substr...
java
private String getRealFilePath(String fileName, BundleHashcodeType bundleHashcodeType) { String realFilePath = fileName; if (bundleHashcodeType.equals(BundleHashcodeType.INVALID_HASHCODE)) { int idx = realFilePath.indexOf(JawrConstant.URL_SEPARATOR, 1); if (idx != -1) { realFilePath = realFilePath.substr...
[ "private", "String", "getRealFilePath", "(", "String", "fileName", ",", "BundleHashcodeType", "bundleHashcodeType", ")", "{", "String", "realFilePath", "=", "fileName", ";", "if", "(", "bundleHashcodeType", ".", "equals", "(", "BundleHashcodeType", ".", "INVALID_HASHC...
Removes the cache buster @param fileName the file name @return the file name without the cache buster.
[ "Removes", "the", "cache", "buster" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/servlet/JawrBinaryResourceRequestHandler.java#L612-L626
7,208
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/generator/js/coffee/CoffeeScriptGenerator.java
CoffeeScriptGenerator.getResourceInputStream
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...
java
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...
[ "private", "InputStream", "getResourceInputStream", "(", "String", "path", ")", "{", "InputStream", "is", "=", "config", ".", "getContext", "(", ")", ".", "getResourceAsStream", "(", "path", ")", ";", "if", "(", "is", "==", "null", ")", "{", "try", "{", ...
Returns the resource input stream @param path the resource path @return the resource input stream
[ "Returns", "the", "resource", "input", "stream" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/generator/js/coffee/CoffeeScriptGenerator.java#L133-L144
7,209
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/generator/js/coffee/CoffeeScriptGenerator.java
CoffeeScriptGenerator.compile
public String compile(String resourcePath, String coffeeScriptSource) { String result = null; try { result = (String) jsEngine.invokeMethod(coffeeScript, "compile", coffeeScriptSource, options); } catch (NoSuchMethodException | ScriptException e) { throw new BundlingProcessException(e); } return resul...
java
public String compile(String resourcePath, String coffeeScriptSource) { String result = null; try { result = (String) jsEngine.invokeMethod(coffeeScript, "compile", coffeeScriptSource, options); } catch (NoSuchMethodException | ScriptException e) { throw new BundlingProcessException(e); } return resul...
[ "public", "String", "compile", "(", "String", "resourcePath", ",", "String", "coffeeScriptSource", ")", "{", "String", "result", "=", "null", ";", "try", "{", "result", "=", "(", "String", ")", "jsEngine", ".", "invokeMethod", "(", "coffeeScript", ",", "\"co...
Compile the CoffeeScript source to a JS source @param resourcePath the resource path @param coffeeScriptSource the CoffeeScript source @return the JS source
[ "Compile", "the", "CoffeeScript", "source", "to", "a", "JS", "source" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/generator/js/coffee/CoffeeScriptGenerator.java#L237-L247
7,210
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/locale/message/BundleStringJsonifier.java
BundleStringJsonifier.serializeBundles
public StringBuffer serializeBundles() { StringBuffer sb = new StringBuffer("{"); // Iterates over the for (Iterator<String> it = keyMap.keySet().iterator(); it.hasNext();) { String currentKey = it.next(); handleKey(sb, keyMap, currentKey, currentKey, !it.hasNext()); } return sb.append("}"); }
java
public StringBuffer serializeBundles() { StringBuffer sb = new StringBuffer("{"); // Iterates over the for (Iterator<String> it = keyMap.keySet().iterator(); it.hasNext();) { String currentKey = it.next(); handleKey(sb, keyMap, currentKey, currentKey, !it.hasNext()); } return sb.append("}"); }
[ "public", "StringBuffer", "serializeBundles", "(", ")", "{", "StringBuffer", "sb", "=", "new", "StringBuffer", "(", "\"{\"", ")", ";", "// Iterates over the", "for", "(", "Iterator", "<", "String", ">", "it", "=", "keyMap", ".", "keySet", "(", ")", ".", "i...
Creates a javascript object literal representing a set of message resources. @return StringBuffer the object literal.
[ "Creates", "a", "javascript", "object", "literal", "representing", "a", "set", "of", "message", "resources", "." ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/locale/message/BundleStringJsonifier.java#L95-L105
7,211
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/locale/message/BundleStringJsonifier.java
BundleStringJsonifier.handleKey
@SuppressWarnings("unchecked") private void handleKey(final StringBuffer sb, Map<String, Object> currentLeaf, String currentKey, String fullKey, boolean isLeafLast) { Map<String, Object> newLeaf = (Map<String, Object>) currentLeaf.get(currentKey); if (bundleValues.containsKey(fullKey)) { addValuedKey(sb, c...
java
@SuppressWarnings("unchecked") private void handleKey(final StringBuffer sb, Map<String, Object> currentLeaf, String currentKey, String fullKey, boolean isLeafLast) { Map<String, Object> newLeaf = (Map<String, Object>) currentLeaf.get(currentKey); if (bundleValues.containsKey(fullKey)) { addValuedKey(sb, c...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "void", "handleKey", "(", "final", "StringBuffer", "sb", ",", "Map", "<", "String", ",", "Object", ">", "currentLeaf", ",", "String", "currentKey", ",", "String", "fullKey", ",", "boolean", "isLeaf...
Processes a leaf from the key map, adding its name and values recursively in a javascript object literal structure, where values are invocations of a method that returns a function. @param sb StringBuffer to append the javascript code. @param currentLeaf Current Map from the keys tree. @param currentKey Current key fr...
[ "Processes", "a", "leaf", "from", "the", "key", "map", "adding", "its", "name", "and", "values", "recursively", "in", "a", "javascript", "object", "literal", "structure", "where", "values", "are", "invocations", "of", "a", "method", "that", "returns", "a", "...
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/locale/message/BundleStringJsonifier.java#L125-L154
7,212
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/locale/message/BundleStringJsonifier.java
BundleStringJsonifier.getJsonKey
private String getJsonKey(String key) { String jsonKey = key; if (addQuoteToKey) { jsonKey = JavascriptStringUtil.quote(key); } return jsonKey; }
java
private String getJsonKey(String key) { String jsonKey = key; if (addQuoteToKey) { jsonKey = JavascriptStringUtil.quote(key); } return jsonKey; }
[ "private", "String", "getJsonKey", "(", "String", "key", ")", "{", "String", "jsonKey", "=", "key", ";", "if", "(", "addQuoteToKey", ")", "{", "jsonKey", "=", "JavascriptStringUtil", ".", "quote", "(", "key", ")", ";", "}", "return", "jsonKey", ";", "}" ...
Returns the json key for messages taking in account the addQuoteToKey attribute. @param key the key @return the json key
[ "Returns", "the", "json", "key", "for", "messages", "taking", "in", "account", "the", "addQuoteToKey", "attribute", "." ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/locale/message/BundleStringJsonifier.java#L164-L170
7,213
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/locale/message/BundleStringJsonifier.java
BundleStringJsonifier.addValuedKey
private void addValuedKey(final StringBuffer sb, String key, String fullKey) { sb.append(getJsonKey(key)).append(":").append(FUNC) .append(JavascriptStringUtil.quote(bundleValues.get(fullKey).toString())); }
java
private void addValuedKey(final StringBuffer sb, String key, String fullKey) { sb.append(getJsonKey(key)).append(":").append(FUNC) .append(JavascriptStringUtil.quote(bundleValues.get(fullKey).toString())); }
[ "private", "void", "addValuedKey", "(", "final", "StringBuffer", "sb", ",", "String", "key", ",", "String", "fullKey", ")", "{", "sb", ".", "append", "(", "getJsonKey", "(", "key", ")", ")", ".", "append", "(", "\":\"", ")", ".", "append", "(", "FUNC",...
Add a key and its value to the object literal. @param sb @param key @param fullKey
[ "Add", "a", "key", "and", "its", "value", "to", "the", "object", "literal", "." ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/locale/message/BundleStringJsonifier.java#L179-L183
7,214
j-a-w-r/jawr-main-repo
jawr-dwr3.x/jawr-dwr3.x-webapp-sample/src/main/java/org/getahead/dwrdemo/asmg/Generator.java
Generator.generateAntiSpamMailto
public String generateAntiSpamMailto(String name, String email) { StringTokenizer st = new StringTokenizer(email, "@"); if (Security.containsXssRiskyCharacters(email) || st.countTokens() != 2) { throw new IllegalArgumentException("Invalid email address: " + email); } ...
java
public String generateAntiSpamMailto(String name, String email) { StringTokenizer st = new StringTokenizer(email, "@"); if (Security.containsXssRiskyCharacters(email) || st.countTokens() != 2) { throw new IllegalArgumentException("Invalid email address: " + email); } ...
[ "public", "String", "generateAntiSpamMailto", "(", "String", "name", ",", "String", "email", ")", "{", "StringTokenizer", "st", "=", "new", "StringTokenizer", "(", "email", ",", "\"@\"", ")", ";", "if", "(", "Security", ".", "containsXssRiskyCharacters", "(", ...
Generate an anti-spam mailto link from an email address @param name The person to contact @param email The address to generate a link from @return The HTML snippet
[ "Generate", "an", "anti", "-", "spam", "mailto", "link", "from", "an", "email", "address" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr-dwr3.x/jawr-dwr3.x-webapp-sample/src/main/java/org/getahead/dwrdemo/asmg/Generator.java#L44-L81
7,215
j-a-w-r/jawr-main-repo
jawr-grails/jawr-grails-plugin/src/java/net/jawr/web/resource/bundle/locale/GrailsLocaleUtils.java
GrailsLocaleUtils.addSuffixIfAvailable
private static void addSuffixIfAvailable(String messageBundlePath, List<String> availableLocaleSuffixes, Locale locale, String fileSuffix, GrailsServletContextResourceReader rsReader) { String localMsgResourcePath = toBundleName(messageBundlePath, locale) + fileSuffix; boolean isFileSystemResourcePath =...
java
private static void addSuffixIfAvailable(String messageBundlePath, List<String> availableLocaleSuffixes, Locale locale, String fileSuffix, GrailsServletContextResourceReader rsReader) { String localMsgResourcePath = toBundleName(messageBundlePath, locale) + fileSuffix; boolean isFileSystemResourcePath =...
[ "private", "static", "void", "addSuffixIfAvailable", "(", "String", "messageBundlePath", ",", "List", "<", "String", ">", "availableLocaleSuffixes", ",", "Locale", "locale", ",", "String", "fileSuffix", ",", "GrailsServletContextResourceReader", "rsReader", ")", "{", ...
Add the locale suffix if the message resource bundle file exists. @param messageBundlePath the message resource bundle path @param availableLocaleSuffixes the list of available locale suffix to update @param locale the locale to check. @param fileSuffix the file suffix @param rsReader the grails servlet context resour...
[ "Add", "the", "locale", "suffix", "if", "the", "message", "resource", "bundle", "file", "exists", "." ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr-grails/jawr-grails-plugin/src/java/net/jawr/web/resource/bundle/locale/GrailsLocaleUtils.java#L194-L234
7,216
j-a-w-r/jawr-main-repo
jawr-grails/jawr-grails-plugin/src/java/net/jawr/web/resource/bundle/locale/GrailsLocaleUtils.java
GrailsLocaleUtils.isPluginResoucePath
public static boolean isPluginResoucePath(String resourcePath) { Matcher matcher = PLUGIN_RESOURCE_PATTERN.matcher(resourcePath); return matcher.find(); }
java
public static boolean isPluginResoucePath(String resourcePath) { Matcher matcher = PLUGIN_RESOURCE_PATTERN.matcher(resourcePath); return matcher.find(); }
[ "public", "static", "boolean", "isPluginResoucePath", "(", "String", "resourcePath", ")", "{", "Matcher", "matcher", "=", "PLUGIN_RESOURCE_PATTERN", ".", "matcher", "(", "resourcePath", ")", ";", "return", "matcher", ".", "find", "(", ")", ";", "}" ]
Returns true is the resource path is a plugin path @param resourcePath the resource path @return true is the resource path is a plugin path
[ "Returns", "true", "is", "the", "resource", "path", "is", "a", "plugin", "path" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr-grails/jawr-grails-plugin/src/java/net/jawr/web/resource/bundle/locale/GrailsLocaleUtils.java#L349-L353
7,217
j-a-w-r/jawr-main-repo
jawr-grails/jawr-grails-plugin/src/java/net/jawr/web/resource/bundle/locale/GrailsLocaleUtils.java
GrailsLocaleUtils.getRealResourcePath
public static String getRealResourcePath(String path, Map<String, String> pluginMsgPathMap) { String realPath = path; Matcher matcher = PLUGIN_RESOURCE_PATTERN.matcher(path); StringBuffer sb = new StringBuffer(); if (matcher.find()) { String pluginName = matcher.group(2); String pluginPath = pluginMs...
java
public static String getRealResourcePath(String path, Map<String, String> pluginMsgPathMap) { String realPath = path; Matcher matcher = PLUGIN_RESOURCE_PATTERN.matcher(path); StringBuffer sb = new StringBuffer(); if (matcher.find()) { String pluginName = matcher.group(2); String pluginPath = pluginMs...
[ "public", "static", "String", "getRealResourcePath", "(", "String", "path", ",", "Map", "<", "String", ",", "String", ">", "pluginMsgPathMap", ")", "{", "String", "realPath", "=", "path", ";", "Matcher", "matcher", "=", "PLUGIN_RESOURCE_PATTERN", ".", "matcher",...
Handle the mapping of the resource path to the right one. This can be the case for plugin resources. It will returns the file system path or the real path or the same path if the path has not been remapped @param path the path @param pluginMsgPathMap the map for plugin path @return the real path or the same path if th...
[ "Handle", "the", "mapping", "of", "the", "resource", "path", "to", "the", "right", "one", ".", "This", "can", "be", "the", "case", "for", "plugin", "resources", ".", "It", "will", "returns", "the", "file", "system", "path", "or", "the", "real", "path", ...
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr-grails/jawr-grails-plugin/src/java/net/jawr/web/resource/bundle/locale/GrailsLocaleUtils.java#L366-L393
7,218
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ClientSideHandlerScriptRequestHandler.java
ClientSideHandlerScriptRequestHandler.handleClientSideHandlerRequest
public void handleClientSideHandlerRequest(HttpServletRequest request, HttpServletResponse response) { Handler handler; Map<String, String> variants = config.getGeneratorRegistry().resolveVariants(request); String variantKey = VariantUtils.getVariantKey(variants); if (handlerCache.containsKey(variantKey)) { ...
java
public void handleClientSideHandlerRequest(HttpServletRequest request, HttpServletResponse response) { Handler handler; Map<String, String> variants = config.getGeneratorRegistry().resolveVariants(request); String variantKey = VariantUtils.getVariantKey(variants); if (handlerCache.containsKey(variantKey)) { ...
[ "public", "void", "handleClientSideHandlerRequest", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ")", "{", "Handler", "handler", ";", "Map", "<", "String", ",", "String", ">", "variants", "=", "config", ".", "getGeneratorRegistry", "...
Generates a locale dependent script used to include bundles in non dynamic html pages. Uses a cache of said scripts to avoid constant regeneration. It also keeps track of eTags and if-modified-since headers to take advantage of client side caching. @param request the request @param response the response
[ "Generates", "a", "locale", "dependent", "script", "used", "to", "include", "bundles", "in", "non", "dynamic", "html", "pages", ".", "Uses", "a", "cache", "of", "said", "scripts", "to", "avoid", "constant", "regeneration", ".", "It", "also", "keeps", "track"...
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ClientSideHandlerScriptRequestHandler.java#L131-L173
7,219
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ClientSideHandlerScriptRequestHandler.java
ClientSideHandlerScriptRequestHandler.useNotModifiedHeader
private boolean useNotModifiedHeader(HttpServletRequest request, String scriptEtag) { long modifiedHeader = -1; try { modifiedHeader = request.getDateHeader(HEADER_IF_MODIFIED); if (modifiedHeader != -1) modifiedHeader -= modifiedHeader % 1000; } catch (RuntimeException ex) { } String eTag = request...
java
private boolean useNotModifiedHeader(HttpServletRequest request, String scriptEtag) { long modifiedHeader = -1; try { modifiedHeader = request.getDateHeader(HEADER_IF_MODIFIED); if (modifiedHeader != -1) modifiedHeader -= modifiedHeader % 1000; } catch (RuntimeException ex) { } String eTag = request...
[ "private", "boolean", "useNotModifiedHeader", "(", "HttpServletRequest", "request", ",", "String", "scriptEtag", ")", "{", "long", "modifiedHeader", "=", "-", "1", ";", "try", "{", "modifiedHeader", "=", "request", ".", "getDateHeader", "(", "HEADER_IF_MODIFIED", ...
Determines whether a response should get a 304 response and empty body, according to etags and if-modified-since headers. @param request @param scriptEtag @return
[ "Determines", "whether", "a", "response", "should", "get", "a", "304", "response", "and", "empty", "body", "according", "to", "etags", "and", "if", "-", "modified", "-", "since", "headers", "." ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ClientSideHandlerScriptRequestHandler.java#L183-L199
7,220
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/mappings/CompositeBundlePathMappingBuilder.java
CompositeBundlePathMappingBuilder.addFilePathMapping
private void addFilePathMapping(BundlePathMapping bundlePathMapping, Set<String> paths) { for (String path : paths) { addFilePathMapping(bundlePathMapping, path); } }
java
private void addFilePathMapping(BundlePathMapping bundlePathMapping, Set<String> paths) { for (String path : paths) { addFilePathMapping(bundlePathMapping, path); } }
[ "private", "void", "addFilePathMapping", "(", "BundlePathMapping", "bundlePathMapping", ",", "Set", "<", "String", ">", "paths", ")", "{", "for", "(", "String", "path", ":", "paths", ")", "{", "addFilePathMapping", "(", "bundlePathMapping", ",", "path", ")", "...
Adds paths to the file path mapping @param bundlePathMapping the bundle path mapping @param paths the paths to add
[ "Adds", "paths", "to", "the", "file", "path", "mapping" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/mappings/CompositeBundlePathMappingBuilder.java#L83-L87
7,221
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/mappings/CompositeBundlePathMappingBuilder.java
CompositeBundlePathMappingBuilder.addFilePathMapping
private void addFilePathMapping(BundlePathMapping bundlePathMapping, List<BundlePath> itemPathList) { for (BundlePath bundlePath : itemPathList) { addFilePathMapping(bundlePathMapping, bundlePath.getPath()); } }
java
private void addFilePathMapping(BundlePathMapping bundlePathMapping, List<BundlePath> itemPathList) { for (BundlePath bundlePath : itemPathList) { addFilePathMapping(bundlePathMapping, bundlePath.getPath()); } }
[ "private", "void", "addFilePathMapping", "(", "BundlePathMapping", "bundlePathMapping", ",", "List", "<", "BundlePath", ">", "itemPathList", ")", "{", "for", "(", "BundlePath", "bundlePath", ":", "itemPathList", ")", "{", "addFilePathMapping", "(", "bundlePathMapping"...
Adds bundle paths to the file path mapping @param bundlePathMapping the bundle path mapping @param paths the paths to add
[ "Adds", "bundle", "paths", "to", "the", "file", "path", "mapping" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/mappings/CompositeBundlePathMappingBuilder.java#L97-L101
7,222
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/taglib/ImageTagUtils.java
ImageTagUtils.getFullImagePath
private static String getFullImagePath(String imgSrc, BinaryResourcesHandler binaryRsHandler, HttpServletRequest request) { String contextPath = request.getContextPath(); // relative path if (!binaryRsHandler.getConfig().getGeneratorRegistry().isGeneratedBinaryResource(imgSrc) && !imgSrc.startsWith("/")) ...
java
private static String getFullImagePath(String imgSrc, BinaryResourcesHandler binaryRsHandler, HttpServletRequest request) { String contextPath = request.getContextPath(); // relative path if (!binaryRsHandler.getConfig().getGeneratorRegistry().isGeneratedBinaryResource(imgSrc) && !imgSrc.startsWith("/")) ...
[ "private", "static", "String", "getFullImagePath", "(", "String", "imgSrc", ",", "BinaryResourcesHandler", "binaryRsHandler", ",", "HttpServletRequest", "request", ")", "{", "String", "contextPath", "=", "request", ".", "getContextPath", "(", ")", ";", "// relative pa...
Returns the full image path to handle the relative path @param imgSrc the image source path @param binaryRsHandler the binary resource handler @param request the request @return the full image path
[ "Returns", "the", "full", "image", "path", "to", "handle", "the", "relative", "path" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/taglib/ImageTagUtils.java#L155-L169
7,223
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/taglib/ImageTagUtils.java
ImageTagUtils.getImageUrl
public static String getImageUrl(String imgSrc, PageContext pageContext) { BinaryResourcesHandler imgRsHandler = (BinaryResourcesHandler) pageContext.getServletContext() .getAttribute(JawrConstant.BINARY_CONTEXT_ATTRIBUTE); if (null == imgRsHandler) throw new JawrLinkRenderingException( "You are using a...
java
public static String getImageUrl(String imgSrc, PageContext pageContext) { BinaryResourcesHandler imgRsHandler = (BinaryResourcesHandler) pageContext.getServletContext() .getAttribute(JawrConstant.BINARY_CONTEXT_ATTRIBUTE); if (null == imgRsHandler) throw new JawrLinkRenderingException( "You are using a...
[ "public", "static", "String", "getImageUrl", "(", "String", "imgSrc", ",", "PageContext", "pageContext", ")", "{", "BinaryResourcesHandler", "imgRsHandler", "=", "(", "BinaryResourcesHandler", ")", "pageContext", ".", "getServletContext", "(", ")", ".", "getAttribute"...
Sames as its counterpart, only meant to be used as a JSP EL function. @param imgSrc the image path @param pageContext the page context @return the image URL
[ "Sames", "as", "its", "counterpart", "only", "meant", "to", "be", "used", "as", "a", "JSP", "EL", "function", "." ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/taglib/ImageTagUtils.java#L180-L193
7,224
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/taglib/ImageTagUtils.java
ImageTagUtils.getBase64EncodedImage
public static String getBase64EncodedImage(String imgSrc, BinaryResourcesHandler binaryRsHandler, HttpServletRequest request) { String encodedResult = null; if (null == binaryRsHandler) { throw new JawrLinkRenderingException( "You are using a Jawr image tag while the Jawr Image servlet has not been init...
java
public static String getBase64EncodedImage(String imgSrc, BinaryResourcesHandler binaryRsHandler, HttpServletRequest request) { String encodedResult = null; if (null == binaryRsHandler) { throw new JawrLinkRenderingException( "You are using a Jawr image tag while the Jawr Image servlet has not been init...
[ "public", "static", "String", "getBase64EncodedImage", "(", "String", "imgSrc", ",", "BinaryResourcesHandler", "binaryRsHandler", ",", "HttpServletRequest", "request", ")", "{", "String", "encodedResult", "=", "null", ";", "if", "(", "null", "==", "binaryRsHandler", ...
Returns the base64 image of the image path given in parameter @param imgSrc the image path @param binaryRsHandler the binary resource handler @param request the HTTP request @return he base64 image of the image path given in parameter @throws JawrLinkRenderingException if an exception occurs
[ "Returns", "the", "base64", "image", "of", "the", "image", "path", "given", "in", "parameter" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/taglib/ImageTagUtils.java#L209-L243
7,225
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/renderer/CSSHTMLBundleLinkRenderer.java
CSSHTMLBundleLinkRenderer.setClosingTag
public static void setClosingTag(String flavor) { if (FLAVORS_XHTML_EXTENDED.equalsIgnoreCase(flavor)) { closingFlavor = POST_XHTML_EXT_TAG; } else if (FLAVORS_HTML.equalsIgnoreCase(flavor)) closingFlavor = POST_HTML_TAG; else closingFlavor = POST_TAG; }
java
public static void setClosingTag(String flavor) { if (FLAVORS_XHTML_EXTENDED.equalsIgnoreCase(flavor)) { closingFlavor = POST_XHTML_EXT_TAG; } else if (FLAVORS_HTML.equalsIgnoreCase(flavor)) closingFlavor = POST_HTML_TAG; else closingFlavor = POST_TAG; }
[ "public", "static", "void", "setClosingTag", "(", "String", "flavor", ")", "{", "if", "(", "FLAVORS_XHTML_EXTENDED", ".", "equalsIgnoreCase", "(", "flavor", ")", ")", "{", "closingFlavor", "=", "POST_XHTML_EXT_TAG", ";", "}", "else", "if", "(", "FLAVORS_HTML", ...
Utility method to get the closing tag value based on a config parameter. @param flavor the flavor
[ "Utility", "method", "to", "get", "the", "closing", "tag", "value", "based", "on", "a", "config", "parameter", "." ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/renderer/CSSHTMLBundleLinkRenderer.java#L139-L148
7,226
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/renderer/CSSHTMLBundleLinkRenderer.java
CSSHTMLBundleLinkRenderer.isForcedToRenderIeCssBundleInDebug
private boolean isForcedToRenderIeCssBundleInDebug(BundleRendererContext ctx, boolean debugOn) { return debugOn && getResourceType().equals(JawrConstant.CSS_TYPE) && bundler.getConfig().isForceCssBundleInDebugForIEOn() && RendererRequestUtils.isIE(ctx.getRequest()); }
java
private boolean isForcedToRenderIeCssBundleInDebug(BundleRendererContext ctx, boolean debugOn) { return debugOn && getResourceType().equals(JawrConstant.CSS_TYPE) && bundler.getConfig().isForceCssBundleInDebugForIEOn() && RendererRequestUtils.isIE(ctx.getRequest()); }
[ "private", "boolean", "isForcedToRenderIeCssBundleInDebug", "(", "BundleRendererContext", "ctx", ",", "boolean", "debugOn", ")", "{", "return", "debugOn", "&&", "getResourceType", "(", ")", ".", "equals", "(", "JawrConstant", ".", "CSS_TYPE", ")", "&&", "bundler", ...
Returns true if the renderer must render a CSS bundle link even in debug mode @param ctx the context @param debugOn the debug flag @return true if the renderer must render a CSS bundle link even in debug mode
[ "Returns", "true", "if", "the", "renderer", "must", "render", "a", "CSS", "bundle", "link", "even", "in", "debug", "mode" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/renderer/CSSHTMLBundleLinkRenderer.java#L172-L176
7,227
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/renderer/CSSHTMLBundleLinkRenderer.java
CSSHTMLBundleLinkRenderer.renderIeCssBundleLink
private void renderIeCssBundleLink(BundleRendererContext ctx, Writer out, BundlePath bundlePath) throws IOException { Random randomSeed = new Random(); int random = randomSeed.nextInt(); if (random < 0) random *= -1; String path = GeneratorRegistry.IE_CSS_GENERATOR_PREFIX + GeneratorRegistry.PREFIX_SEPARA...
java
private void renderIeCssBundleLink(BundleRendererContext ctx, Writer out, BundlePath bundlePath) throws IOException { Random randomSeed = new Random(); int random = randomSeed.nextInt(); if (random < 0) random *= -1; String path = GeneratorRegistry.IE_CSS_GENERATOR_PREFIX + GeneratorRegistry.PREFIX_SEPARA...
[ "private", "void", "renderIeCssBundleLink", "(", "BundleRendererContext", "ctx", ",", "Writer", "out", ",", "BundlePath", "bundlePath", ")", "throws", "IOException", "{", "Random", "randomSeed", "=", "new", "Random", "(", ")", ";", "int", "random", "=", "randomS...
Renders the CSS link to retrieve the CSS bundle for IE in debug mode. @param ctx the context @param out the writer @param bundle the bundle @throws IOException if an IOException occurs
[ "Renders", "the", "CSS", "link", "to", "retrieve", "the", "CSS", "bundle", "for", "IE", "in", "debug", "mode", "." ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/renderer/CSSHTMLBundleLinkRenderer.java#L350-L360
7,228
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/generator/css/sass/ruby/SassRubyGenerator.java
SassRubyGenerator.compile
private String compile(JoinableResourceBundle bundle, String content, String path, GeneratorContext ctx) throws ScriptException, IOException { try(InputStream is = getResourceInputStream(JAWR_IMPORTER_RB)){ String script = IOUtils.toString(is); rubyEngine.eval(script); } SimpleBindings bindings = new...
java
private String compile(JoinableResourceBundle bundle, String content, String path, GeneratorContext ctx) throws ScriptException, IOException { try(InputStream is = getResourceInputStream(JAWR_IMPORTER_RB)){ String script = IOUtils.toString(is); rubyEngine.eval(script); } SimpleBindings bindings = new...
[ "private", "String", "compile", "(", "JoinableResourceBundle", "bundle", ",", "String", "content", ",", "String", "path", ",", "GeneratorContext", "ctx", ")", "throws", "ScriptException", ",", "IOException", "{", "try", "(", "InputStream", "is", "=", "getResourceI...
Compile the Sass content @param bundle the bundle @param content the content to compile @param path the path @param ctx the generator context @return the compiled Sass content @throws ScriptException if a ScriptException occurs @throws IOException if an IOExceptions occurs
[ "Compile", "the", "Sass", "content" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/generator/css/sass/ruby/SassRubyGenerator.java#L196-L210
7,229
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/generator/css/sass/ruby/SassRubyGenerator.java
SassRubyGenerator.buildScript
private String buildScript(String path, String content) { StringBuilder script = new StringBuilder(); script.append("require 'rubygems'\n" + "require 'sass/plugin'\n" + "require 'sass/engine'\n"); content = SassRubyUtils.normalizeMultiByteString(content); script.append(String.format( "customImporter = S...
java
private String buildScript(String path, String content) { StringBuilder script = new StringBuilder(); script.append("require 'rubygems'\n" + "require 'sass/plugin'\n" + "require 'sass/engine'\n"); content = SassRubyUtils.normalizeMultiByteString(content); script.append(String.format( "customImporter = S...
[ "private", "String", "buildScript", "(", "String", "path", ",", "String", "content", ")", "{", "StringBuilder", "script", "=", "new", "StringBuilder", "(", ")", ";", "script", ".", "append", "(", "\"require 'rubygems'\\n\"", "+", "\"require 'sass/plugin'\\n\"", "+...
Builds the ruby script to execute @param path the resource path @param content the resource content @return the ruby script to execute
[ "Builds", "the", "ruby", "script", "to", "execute" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/generator/css/sass/ruby/SassRubyGenerator.java#L221-L234
7,230
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/config/JawrConfig.java
JawrConfig.setCharsetName
public final void setCharsetName(String charsetName) { if (!Charset.isSupported(charsetName)) throw new IllegalArgumentException( "The specified charset [" + charsetName + "] is not supported by the jvm."); this.charsetName = charsetName; }
java
public final void setCharsetName(String charsetName) { if (!Charset.isSupported(charsetName)) throw new IllegalArgumentException( "The specified charset [" + charsetName + "] is not supported by the jvm."); this.charsetName = charsetName; }
[ "public", "final", "void", "setCharsetName", "(", "String", "charsetName", ")", "{", "if", "(", "!", "Charset", ".", "isSupported", "(", "charsetName", ")", ")", "throw", "new", "IllegalArgumentException", "(", "\"The specified charset [\"", "+", "charsetName", "+...
Set the charsetname to be used to interpret and generate resource. @param charsetName the charset name to set
[ "Set", "the", "charsetname", "to", "be", "used", "to", "interpret", "and", "generate", "resource", "." ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/config/JawrConfig.java#L869-L874
7,231
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/config/JawrConfig.java
JawrConfig.setGeneratorRegistry
public void setGeneratorRegistry(GeneratorRegistry generatorRegistry) { this.generatorRegistry = generatorRegistry; this.generatorRegistry.setConfig(this); localeResolver = null; if (configProperties.getProperty(JAWR_LOCALE_RESOLVER) == null) { localeResolver = new DefaultLocaleResolver(); } else { loca...
java
public void setGeneratorRegistry(GeneratorRegistry generatorRegistry) { this.generatorRegistry = generatorRegistry; this.generatorRegistry.setConfig(this); localeResolver = null; if (configProperties.getProperty(JAWR_LOCALE_RESOLVER) == null) { localeResolver = new DefaultLocaleResolver(); } else { loca...
[ "public", "void", "setGeneratorRegistry", "(", "GeneratorRegistry", "generatorRegistry", ")", "{", "this", ".", "generatorRegistry", "=", "generatorRegistry", ";", "this", ".", "generatorRegistry", ".", "setConfig", "(", "this", ")", ";", "localeResolver", "=", "nul...
Set the generator registry @param generatorRegistry the generatorRegistry to set
[ "Set", "the", "generator", "registry" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/config/JawrConfig.java#L1207-L1223
7,232
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/config/JawrConfig.java
JawrConfig.registerResolver
private VariantResolver registerResolver(VariantResolver defaultResolver, String configPropertyName) { VariantResolver resolver = null; if (configProperties.getProperty(configPropertyName) == null) { resolver = defaultResolver; } else { resolver = (VariantResolver) ClassLoaderResourceUtils .buildObject...
java
private VariantResolver registerResolver(VariantResolver defaultResolver, String configPropertyName) { VariantResolver resolver = null; if (configProperties.getProperty(configPropertyName) == null) { resolver = defaultResolver; } else { resolver = (VariantResolver) ClassLoaderResourceUtils .buildObject...
[ "private", "VariantResolver", "registerResolver", "(", "VariantResolver", "defaultResolver", ",", "String", "configPropertyName", ")", "{", "VariantResolver", "resolver", "=", "null", ";", "if", "(", "configProperties", ".", "getProperty", "(", "configPropertyName", ")"...
Register a resolver in the generator registry @param defaultResolver the default resolver @param configPropertyName the configuration property whose the value define the resolver class @return
[ "Register", "a", "resolver", "in", "the", "generator", "registry" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/config/JawrConfig.java#L1235-L1246
7,233
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/config/JawrConfig.java
JawrConfig.setCssLinkFlavor
public final void setCssLinkFlavor(String cssLinkFlavor) { if (CSSHTMLBundleLinkRenderer.FLAVORS_HTML.equalsIgnoreCase(cssLinkFlavor) || CSSHTMLBundleLinkRenderer.FLAVORS_XHTML.equalsIgnoreCase(cssLinkFlavor) || CSSHTMLBundleLinkRenderer.FLAVORS_XHTML_EXTENDED.equalsIgnoreCase(cssLinkFlavor)) CSSHTMLBundle...
java
public final void setCssLinkFlavor(String cssLinkFlavor) { if (CSSHTMLBundleLinkRenderer.FLAVORS_HTML.equalsIgnoreCase(cssLinkFlavor) || CSSHTMLBundleLinkRenderer.FLAVORS_XHTML.equalsIgnoreCase(cssLinkFlavor) || CSSHTMLBundleLinkRenderer.FLAVORS_XHTML_EXTENDED.equalsIgnoreCase(cssLinkFlavor)) CSSHTMLBundle...
[ "public", "final", "void", "setCssLinkFlavor", "(", "String", "cssLinkFlavor", ")", "{", "if", "(", "CSSHTMLBundleLinkRenderer", ".", "FLAVORS_HTML", ".", "equalsIgnoreCase", "(", "cssLinkFlavor", ")", "||", "CSSHTMLBundleLinkRenderer", ".", "FLAVORS_XHTML", ".", "equ...
Sets the css link flavor @param cssLinkFlavor the cssLinkFlavor to set
[ "Sets", "the", "css", "link", "flavor" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/config/JawrConfig.java#L1310-L1319
7,234
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/config/JawrConfig.java
JawrConfig.getBooleanProperty
public boolean getBooleanProperty(String propertyName, boolean defaultValue) { return Boolean.valueOf(getProperty(propertyName, Boolean.toString(defaultValue))); }
java
public boolean getBooleanProperty(String propertyName, boolean defaultValue) { return Boolean.valueOf(getProperty(propertyName, Boolean.toString(defaultValue))); }
[ "public", "boolean", "getBooleanProperty", "(", "String", "propertyName", ",", "boolean", "defaultValue", ")", "{", "return", "Boolean", ".", "valueOf", "(", "getProperty", "(", "propertyName", ",", "Boolean", ".", "toString", "(", "defaultValue", ")", ")", ")",...
Returns the boolean property value @param propertyName the property name @param defaultValue the default value @return the boolean property value
[ "Returns", "the", "boolean", "property", "value" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/config/JawrConfig.java#L1330-L1333
7,235
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/config/JawrConfig.java
JawrConfig.getProperty
public String getProperty(String key, String defaultValue) { String property = configProperties.getProperty(key, defaultValue); if (property != null) { property = property.trim(); } return property; }
java
public String getProperty(String key, String defaultValue) { String property = configProperties.getProperty(key, defaultValue); if (property != null) { property = property.trim(); } return property; }
[ "public", "String", "getProperty", "(", "String", "key", ",", "String", "defaultValue", ")", "{", "String", "property", "=", "configProperties", ".", "getProperty", "(", "key", ",", "defaultValue", ")", ";", "if", "(", "property", "!=", "null", ")", "{", "...
Returns the value of the property associated to the key passed in parameter @param key the key of the property @param defaultValue the default value @return the value of the property
[ "Returns", "the", "value", "of", "the", "property", "associated", "to", "the", "key", "passed", "in", "parameter" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/config/JawrConfig.java#L1358-L1365
7,236
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/config/JawrConfig.java
JawrConfig.getJavascriptEngineName
public String getJavascriptEngineName(String defaultJsEnginePropName) { String jsEngineName = null; if (StringUtils.isEmpty(defaultJsEnginePropName)) { jsEngineName = getJavascriptEngineName(); } else { jsEngineName = getProperty(defaultJsEnginePropName); if (StringUtils.isEmpty(jsEngineName)) { jsE...
java
public String getJavascriptEngineName(String defaultJsEnginePropName) { String jsEngineName = null; if (StringUtils.isEmpty(defaultJsEnginePropName)) { jsEngineName = getJavascriptEngineName(); } else { jsEngineName = getProperty(defaultJsEnginePropName); if (StringUtils.isEmpty(jsEngineName)) { jsE...
[ "public", "String", "getJavascriptEngineName", "(", "String", "defaultJsEnginePropName", ")", "{", "String", "jsEngineName", "=", "null", ";", "if", "(", "StringUtils", ".", "isEmpty", "(", "defaultJsEnginePropName", ")", ")", "{", "jsEngineName", "=", "getJavascrip...
Returns the name of JS engine to use @param defaultJsEnginePropName the default JS engine property name @return the name of JS engine to use
[ "Returns", "the", "name", "of", "JS", "engine", "to", "use" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/config/JawrConfig.java#L1418-L1431
7,237
j-a-w-r/jawr-main-repo
jawr-spring/jawr-spring-extension/src/main/java/net/jawr/web/servlet/JawrSpringController.java
JawrSpringController.setControllerMapping
public void setControllerMapping(String controllerMapping) { if (controllerMapping.endsWith("/")) { this.controllerMapping = controllerMapping.substring(0, controllerMapping.length() - 1); } else { this.controllerMapping = controllerMapping; } }
java
public void setControllerMapping(String controllerMapping) { if (controllerMapping.endsWith("/")) { this.controllerMapping = controllerMapping.substring(0, controllerMapping.length() - 1); } else { this.controllerMapping = controllerMapping; } }
[ "public", "void", "setControllerMapping", "(", "String", "controllerMapping", ")", "{", "if", "(", "controllerMapping", ".", "endsWith", "(", "\"/\"", ")", ")", "{", "this", ".", "controllerMapping", "=", "controllerMapping", ".", "substring", "(", "0", ",", "...
Sets the controller mapping @param controllerMapping the controllerMapping to set
[ "Sets", "the", "controller", "mapping" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr-spring/jawr-spring-extension/src/main/java/net/jawr/web/servlet/JawrSpringController.java#L175-L182
7,238
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/factory/util/ConfigPropertiesAugmenter.java
ConfigPropertiesAugmenter.augmentConfiguration
public void augmentConfiguration(Properties configToAdd) { for (Entry<Object, Object> entry : configToAdd.entrySet()) { String configKey = (String) entry.getKey(); String configValue = (String) entry.getValue(); // Skip the property is it is not overridable if (null != privateConfigProperties && privateC...
java
public void augmentConfiguration(Properties configToAdd) { for (Entry<Object, Object> entry : configToAdd.entrySet()) { String configKey = (String) entry.getKey(); String configValue = (String) entry.getValue(); // Skip the property is it is not overridable if (null != privateConfigProperties && privateC...
[ "public", "void", "augmentConfiguration", "(", "Properties", "configToAdd", ")", "{", "for", "(", "Entry", "<", "Object", ",", "Object", ">", "entry", ":", "configToAdd", ".", "entrySet", "(", ")", ")", "{", "String", "configKey", "=", "(", "String", ")", ...
Augments the base configuration with the properties specified as parameter. @param configToAdd the configuration properties to add
[ "Augments", "the", "base", "configuration", "with", "the", "properties", "specified", "as", "parameter", "." ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/factory/util/ConfigPropertiesAugmenter.java#L80-L101
7,239
j-a-w-r/jawr-main-repo
jawr-tools/jawr-bundle-processor/src/main/java/net/jawr/web/bundle/processor/ServletDefinition.java
ServletDefinition.initServlet
public HttpServlet initServlet() throws Exception { servlet = (HttpServlet) servletClass.newInstance(); servlet.init(servletConfig); return servlet; }
java
public HttpServlet initServlet() throws Exception { servlet = (HttpServlet) servletClass.newInstance(); servlet.init(servletConfig); return servlet; }
[ "public", "HttpServlet", "initServlet", "(", ")", "throws", "Exception", "{", "servlet", "=", "(", "HttpServlet", ")", "servletClass", ".", "newInstance", "(", ")", ";", "servlet", ".", "init", "(", "servletConfig", ")", ";", "return", "servlet", ";", "}" ]
Create a new instance of the servlet and initialize it. @param servletClass the servlet class @param servletConfig the servlet config @throws ServletException if a servlet exception occurs.
[ "Create", "a", "new", "instance", "of", "the", "servlet", "and", "initialize", "it", "." ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr-tools/jawr-bundle-processor/src/main/java/net/jawr/web/bundle/processor/ServletDefinition.java#L97-L102
7,240
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/CheckSumUtils.java
CheckSumUtils.getChecksum
public static String getChecksum(String url, ResourceReaderHandler rsReader, JawrConfig jawrConfig) throws IOException, ResourceNotFoundException { String checksum = null; InputStream is = null; boolean generatedBinaryResource = jawrConfig.getGeneratorRegistry().isGeneratedBinaryResource(url); try { i...
java
public static String getChecksum(String url, ResourceReaderHandler rsReader, JawrConfig jawrConfig) throws IOException, ResourceNotFoundException { String checksum = null; InputStream is = null; boolean generatedBinaryResource = jawrConfig.getGeneratorRegistry().isGeneratedBinaryResource(url); try { i...
[ "public", "static", "String", "getChecksum", "(", "String", "url", ",", "ResourceReaderHandler", "rsReader", ",", "JawrConfig", "jawrConfig", ")", "throws", "IOException", ",", "ResourceNotFoundException", "{", "String", "checksum", "=", "null", ";", "InputStream", ...
Return the checksum of the path given in parameter, if the resource is not found, null will b returned. @param url the url path to the resource file @param rsReader the resource reader handler @param jawrConfig the jawrConfig @return checksum of the path given in parameter @throws IOException if an IO exception occurs...
[ "Return", "the", "checksum", "of", "the", "path", "given", "in", "parameter", "if", "the", "resource", "is", "not", "found", "null", "will", "b", "returned", "." ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/CheckSumUtils.java#L59-L87
7,241
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/CheckSumUtils.java
CheckSumUtils.getCacheBustedUrl
public static String getCacheBustedUrl(String url, ResourceReaderHandler rsReader, JawrConfig jawrConfig) throws IOException, ResourceNotFoundException { String checksum = getChecksum(url, rsReader, jawrConfig); String result = JawrConstant.CACHE_BUSTER_PREFIX; boolean generatedBinaryResource = jawrConfig.get...
java
public static String getCacheBustedUrl(String url, ResourceReaderHandler rsReader, JawrConfig jawrConfig) throws IOException, ResourceNotFoundException { String checksum = getChecksum(url, rsReader, jawrConfig); String result = JawrConstant.CACHE_BUSTER_PREFIX; boolean generatedBinaryResource = jawrConfig.get...
[ "public", "static", "String", "getCacheBustedUrl", "(", "String", "url", ",", "ResourceReaderHandler", "rsReader", ",", "JawrConfig", "jawrConfig", ")", "throws", "IOException", ",", "ResourceNotFoundException", "{", "String", "checksum", "=", "getChecksum", "(", "url...
Return the cache busted url associated to the url passed in parameter, if the resource is not found, null will b returned. @param url the url path to the resource file @param rsReader the resource reader handler @param jawrConfig the jawrConfig @return the cache busted url @throws IOException if an IO exception occurs...
[ "Return", "the", "cache", "busted", "url", "associated", "to", "the", "url", "passed", "in", "parameter", "if", "the", "resource", "is", "not", "found", "null", "will", "b", "returned", "." ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/CheckSumUtils.java#L105-L126
7,242
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/CheckSumUtils.java
CheckSumUtils.getChecksum
public static String getChecksum(InputStream is, String algorithm) throws IOException { if (algorithm.equals(JawrConstant.CRC32_ALGORITHM)) { return getCRC32Checksum(is); } else if (algorithm.equals(JawrConstant.MD5_ALGORITHM)) { return getMD5Checksum(is); } else { throw new BundlingProcessException("Th...
java
public static String getChecksum(InputStream is, String algorithm) throws IOException { if (algorithm.equals(JawrConstant.CRC32_ALGORITHM)) { return getCRC32Checksum(is); } else if (algorithm.equals(JawrConstant.MD5_ALGORITHM)) { return getMD5Checksum(is); } else { throw new BundlingProcessException("Th...
[ "public", "static", "String", "getChecksum", "(", "InputStream", "is", ",", "String", "algorithm", ")", "throws", "IOException", "{", "if", "(", "algorithm", ".", "equals", "(", "JawrConstant", ".", "CRC32_ALGORITHM", ")", ")", "{", "return", "getCRC32Checksum",...
Returns the checksum value of the input stream taking in count the algorithm passed in parameter @param is the input stream @param algorithm the checksum algorithm @return the checksum value @throws IOException if an exception occurs.
[ "Returns", "the", "checksum", "value", "of", "the", "input", "stream", "taking", "in", "count", "the", "algorithm", "passed", "in", "parameter" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/CheckSumUtils.java#L140-L150
7,243
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/CheckSumUtils.java
CheckSumUtils.getCRC32Checksum
public static String getCRC32Checksum(InputStream is) throws IOException { Checksum checksum = new CRC32(); byte[] bytes = new byte[1024]; int len = 0; while ((len = is.read(bytes)) >= 0) { checksum.update(bytes, 0, len); } return Long.toString(checksum.getValue()); }
java
public static String getCRC32Checksum(InputStream is) throws IOException { Checksum checksum = new CRC32(); byte[] bytes = new byte[1024]; int len = 0; while ((len = is.read(bytes)) >= 0) { checksum.update(bytes, 0, len); } return Long.toString(checksum.getValue()); }
[ "public", "static", "String", "getCRC32Checksum", "(", "InputStream", "is", ")", "throws", "IOException", "{", "Checksum", "checksum", "=", "new", "CRC32", "(", ")", ";", "byte", "[", "]", "bytes", "=", "new", "byte", "[", "1024", "]", ";", "int", "len",...
Returns the CRC 32 Checksum of the input stream @param is the input stream @return the CRC 32 checksum of the input stream @throws IOException if an IO exception occurs
[ "Returns", "the", "CRC", "32", "Checksum", "of", "the", "input", "stream" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/CheckSumUtils.java#L162-L174
7,244
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/CheckSumUtils.java
CheckSumUtils.getMD5Checksum
public static String getMD5Checksum(InputStream is) throws IOException { byte[] digest = null; try { MessageDigest md = MessageDigest.getInstance(JawrConstant.MD5_ALGORITHM); InputStream digestIs = new DigestInputStream(is, md); // read stream to EOF as normal... while (digestIs.read() != -1) { } ...
java
public static String getMD5Checksum(InputStream is) throws IOException { byte[] digest = null; try { MessageDigest md = MessageDigest.getInstance(JawrConstant.MD5_ALGORITHM); InputStream digestIs = new DigestInputStream(is, md); // read stream to EOF as normal... while (digestIs.read() != -1) { } ...
[ "public", "static", "String", "getMD5Checksum", "(", "InputStream", "is", ")", "throws", "IOException", "{", "byte", "[", "]", "digest", "=", "null", ";", "try", "{", "MessageDigest", "md", "=", "MessageDigest", ".", "getInstance", "(", "JawrConstant", ".", ...
Returns the MD5 Checksum of the input stream @param is the input stream @return the Checksum of the input stream @throws IOException if an IO exception occurs
[ "Returns", "the", "MD5", "Checksum", "of", "the", "input", "stream" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/CheckSumUtils.java#L220-L236
7,245
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/util/PropertyUtils.java
PropertyUtils.getProperty
public static String getProperty(Object bean, String name) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { String value = null; // Retrieve the property getter method for the specified property PropertyDescriptor descriptor = getPropertyDescriptor(bean, name); if (descrip...
java
public static String getProperty(Object bean, String name) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { String value = null; // Retrieve the property getter method for the specified property PropertyDescriptor descriptor = getPropertyDescriptor(bean, name); if (descrip...
[ "public", "static", "String", "getProperty", "(", "Object", "bean", ",", "String", "name", ")", "throws", "NoSuchMethodException", ",", "IllegalAccessException", ",", "InvocationTargetException", "{", "String", "value", "=", "null", ";", "// Retrieve the property getter...
Return the value of the specified simple property of the specified bean, with string conversions. @param bean Bean whose property is to be extracted @param name Name of the property to be extracted @return the value of the specified simple property of the specified bean, with string conversions. @exception IllegalAcc...
[ "Return", "the", "value", "of", "the", "specified", "simple", "property", "of", "the", "specified", "bean", "with", "string", "conversions", "." ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/util/PropertyUtils.java#L62-L86
7,246
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/util/PropertyUtils.java
PropertyUtils.setProperty
public static void setProperty(Object bean, String name, Object value) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { if (bean == null) { throw new IllegalArgumentException("No bean specified"); } if (name == null) { throw new IllegalArgumentException("No name specifie...
java
public static void setProperty(Object bean, String name, Object value) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { if (bean == null) { throw new IllegalArgumentException("No bean specified"); } if (name == null) { throw new IllegalArgumentException("No name specifie...
[ "public", "static", "void", "setProperty", "(", "Object", "bean", ",", "String", "name", ",", "Object", "value", ")", "throws", "IllegalAccessException", ",", "InvocationTargetException", ",", "NoSuchMethodException", "{", "if", "(", "bean", "==", "null", ")", "...
Set the value of the specified simple property of the specified bean, with no type conversions. @param bean Bean whose property is to be modified @param name Name of the property to be modified @param value Value to which the property should be set @exception IllegalAccessException if the caller does not have access ...
[ "Set", "the", "value", "of", "the", "specified", "simple", "property", "of", "the", "specified", "bean", "with", "no", "type", "conversions", "." ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/util/PropertyUtils.java#L191-L217
7,247
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/util/PropertyUtils.java
PropertyUtils.invokeMethod
private static Object invokeMethod(Method method, Object bean, Object[] values) throws IllegalAccessException, InvocationTargetException { try { return method.invoke(bean, values); } catch (IllegalArgumentException e) { LOGGER.error("Method invocation failed.", e); throw new IllegalArgumentException(...
java
private static Object invokeMethod(Method method, Object bean, Object[] values) throws IllegalAccessException, InvocationTargetException { try { return method.invoke(bean, values); } catch (IllegalArgumentException e) { LOGGER.error("Method invocation failed.", e); throw new IllegalArgumentException(...
[ "private", "static", "Object", "invokeMethod", "(", "Method", "method", ",", "Object", "bean", ",", "Object", "[", "]", "values", ")", "throws", "IllegalAccessException", ",", "InvocationTargetException", "{", "try", "{", "return", "method", ".", "invoke", "(", ...
This utility method just catches and wraps IllegalArgumentException. @param method the method to call @param bean the bean @param values the values @return the returned value of the method @throws IllegalAccessException if an exception occurs @throws InvocationTargetException if an exception occurs
[ "This", "utility", "method", "just", "catches", "and", "wraps", "IllegalArgumentException", "." ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/util/PropertyUtils.java#L234-L247
7,248
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java
ResourceBundlesHandlerImpl.isSearchingForVariantInPostProcessNeeded
private boolean isSearchingForVariantInPostProcessNeeded() { boolean needToSearch = false; ResourceBundlePostProcessor[] postprocessors = new ResourceBundlePostProcessor[] { postProcessor, unitaryCompositePostProcessor, compositePostProcessor, unitaryCompositePostProcessor }; for (ResourceBundlePostProcessor...
java
private boolean isSearchingForVariantInPostProcessNeeded() { boolean needToSearch = false; ResourceBundlePostProcessor[] postprocessors = new ResourceBundlePostProcessor[] { postProcessor, unitaryCompositePostProcessor, compositePostProcessor, unitaryCompositePostProcessor }; for (ResourceBundlePostProcessor...
[ "private", "boolean", "isSearchingForVariantInPostProcessNeeded", "(", ")", "{", "boolean", "needToSearch", "=", "false", ";", "ResourceBundlePostProcessor", "[", "]", "postprocessors", "=", "new", "ResourceBundlePostProcessor", "[", "]", "{", "postProcessor", ",", "uni...
Checks if it is needed to search for variant in post process @return true if it is needed to search for variant in post process
[ "Checks", "if", "it", "is", "needed", "to", "search", "for", "variant", "in", "post", "process" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java#L260-L275
7,249
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java
ResourceBundlesHandlerImpl.splitBundlesByType
private void splitBundlesByType(List<JoinableResourceBundle> bundles) { // Temporary lists (CopyOnWriteArrayList does not support sort()) List<JoinableResourceBundle> tmpGlobal = new ArrayList<>(); List<JoinableResourceBundle> tmpContext = new ArrayList<>(); for (JoinableResourceBundle bundle : bundles) { i...
java
private void splitBundlesByType(List<JoinableResourceBundle> bundles) { // Temporary lists (CopyOnWriteArrayList does not support sort()) List<JoinableResourceBundle> tmpGlobal = new ArrayList<>(); List<JoinableResourceBundle> tmpContext = new ArrayList<>(); for (JoinableResourceBundle bundle : bundles) { i...
[ "private", "void", "splitBundlesByType", "(", "List", "<", "JoinableResourceBundle", ">", "bundles", ")", "{", "// Temporary lists (CopyOnWriteArrayList does not support sort())", "List", "<", "JoinableResourceBundle", ">", "tmpGlobal", "=", "new", "ArrayList", "<>", "(", ...
Splits the bundles in two lists, one for global lists and other for the remaining bundles.
[ "Splits", "the", "bundles", "in", "two", "lists", "one", "for", "global", "lists", "and", "other", "for", "the", "remaining", "bundles", "." ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java#L315-L341
7,250
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java
ResourceBundlesHandlerImpl.initBundlePrefixes
protected void initBundlePrefixes() { bundlePrefixes = new CopyOnWriteArrayList<>(); for (JoinableResourceBundle bundle : globalBundles) { if (StringUtils.isNotEmpty(bundle.getBundlePrefix())) { bundlePrefixes.add(bundle.getBundlePrefix()); } } for (JoinableResourceBundle bundle : contextBundles) { ...
java
protected void initBundlePrefixes() { bundlePrefixes = new CopyOnWriteArrayList<>(); for (JoinableResourceBundle bundle : globalBundles) { if (StringUtils.isNotEmpty(bundle.getBundlePrefix())) { bundlePrefixes.add(bundle.getBundlePrefix()); } } for (JoinableResourceBundle bundle : contextBundles) { ...
[ "protected", "void", "initBundlePrefixes", "(", ")", "{", "bundlePrefixes", "=", "new", "CopyOnWriteArrayList", "<>", "(", ")", ";", "for", "(", "JoinableResourceBundle", "bundle", ":", "globalBundles", ")", "{", "if", "(", "StringUtils", ".", "isNotEmpty", "(",...
Initialize the bundle prefixes
[ "Initialize", "the", "bundle", "prefixes" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java#L346-L358
7,251
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java
ResourceBundlesHandlerImpl.getBundleIterator
private ResourceBundlePathsIterator getBundleIterator(DebugMode debugMode, List<JoinableResourceBundle> bundles, ConditionalCommentCallbackHandler commentCallbackHandler, Map<String, String> variants) { ResourceBundlePathsIterator bundlesIterator; if (debugMode.equals(DebugMode.DEBUG)) { bundlesIterator = new...
java
private ResourceBundlePathsIterator getBundleIterator(DebugMode debugMode, List<JoinableResourceBundle> bundles, ConditionalCommentCallbackHandler commentCallbackHandler, Map<String, String> variants) { ResourceBundlePathsIterator bundlesIterator; if (debugMode.equals(DebugMode.DEBUG)) { bundlesIterator = new...
[ "private", "ResourceBundlePathsIterator", "getBundleIterator", "(", "DebugMode", "debugMode", ",", "List", "<", "JoinableResourceBundle", ">", "bundles", ",", "ConditionalCommentCallbackHandler", "commentCallbackHandler", ",", "Map", "<", "String", ",", "String", ">", "va...
Returns the bundle iterator @param debugMode the flag indicating if we are in debug mode or not @param commentCallbackHandler the comment callback handler @param variants the variant map @return the bundle iterator
[ "Returns", "the", "bundle", "iterator" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java#L508-L520
7,252
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java
ResourceBundlesHandlerImpl.processInLive
private StringReader processInLive(Reader reader) throws IOException { String requestURL = ThreadLocalJawrContext.getRequestURL(); StringWriter swriter = new StringWriter(); IOUtils.copy(reader, swriter, true); String updatedContent = swriter.getBuffer().toString(); if (requestURL != null) { updatedConte...
java
private StringReader processInLive(Reader reader) throws IOException { String requestURL = ThreadLocalJawrContext.getRequestURL(); StringWriter swriter = new StringWriter(); IOUtils.copy(reader, swriter, true); String updatedContent = swriter.getBuffer().toString(); if (requestURL != null) { updatedConte...
[ "private", "StringReader", "processInLive", "(", "Reader", "reader", ")", "throws", "IOException", "{", "String", "requestURL", "=", "ThreadLocalJawrContext", ".", "getRequestURL", "(", ")", ";", "StringWriter", "swriter", "=", "new", "StringWriter", "(", ")", ";"...
Process the bundle content in live @param reader the reader @return the processed bundle content @throws IOException if an IOException occured
[ "Process", "the", "bundle", "content", "in", "live" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java#L576-L587
7,253
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java
ResourceBundlesHandlerImpl.getJawrConfigHashcode
protected String getJawrConfigHashcode() { try { return CheckSumUtils.getMD5Checksum(config.getConfigProperties().toString()); } catch (IOException e) { throw new BundlingProcessException("Unable to calculate Jawr config checksum", e); } }
java
protected String getJawrConfigHashcode() { try { return CheckSumUtils.getMD5Checksum(config.getConfigProperties().toString()); } catch (IOException e) { throw new BundlingProcessException("Unable to calculate Jawr config checksum", e); } }
[ "protected", "String", "getJawrConfigHashcode", "(", ")", "{", "try", "{", "return", "CheckSumUtils", ".", "getMD5Checksum", "(", "config", ".", "getConfigProperties", "(", ")", ".", "toString", "(", ")", ")", ";", "}", "catch", "(", "IOException", "e", ")",...
Returns the jawr config hashcode @return the jawr config hashcode
[ "Returns", "the", "jawr", "config", "hashcode" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java#L713-L719
7,254
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java
ResourceBundlesHandlerImpl.executeGlobalPreprocessing
private void executeGlobalPreprocessing(List<JoinableResourceBundle> bundlesToBuild, boolean processBundleFlag, StopWatch stopWatch) { stopProcessIfNeeded(); if (resourceTypePreprocessor != null) { if (stopWatch != null) { stopWatch.start("Global preprocessing"); } GlobalPreprocessingContext ctx =...
java
private void executeGlobalPreprocessing(List<JoinableResourceBundle> bundlesToBuild, boolean processBundleFlag, StopWatch stopWatch) { stopProcessIfNeeded(); if (resourceTypePreprocessor != null) { if (stopWatch != null) { stopWatch.start("Global preprocessing"); } GlobalPreprocessingContext ctx =...
[ "private", "void", "executeGlobalPreprocessing", "(", "List", "<", "JoinableResourceBundle", ">", "bundlesToBuild", ",", "boolean", "processBundleFlag", ",", "StopWatch", "stopWatch", ")", "{", "stopProcessIfNeeded", "(", ")", ";", "if", "(", "resourceTypePreprocessor",...
Executes the global preprocessing @param bundlesToBuild The list of bundles to rebuild @param processBundleFlag the flag indicating if the bundles needs to be processed @param stopWatch the stopWatch
[ "Executes", "the", "global", "preprocessing" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java#L732-L756
7,255
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java
ResourceBundlesHandlerImpl.rebuildModifiedBundles
@Override public synchronized void rebuildModifiedBundles() { stopProcessIfNeeded(); StopWatch stopWatch = ThreadLocalJawrContext.getStopWatch(); if (config.getUseSmartBundling()) { // Wait until all watch event has been processed if (watcher != null) { while (!watcher.hasNoEventToProcess()) { ...
java
@Override public synchronized void rebuildModifiedBundles() { stopProcessIfNeeded(); StopWatch stopWatch = ThreadLocalJawrContext.getStopWatch(); if (config.getUseSmartBundling()) { // Wait until all watch event has been processed if (watcher != null) { while (!watcher.hasNoEventToProcess()) { ...
[ "@", "Override", "public", "synchronized", "void", "rebuildModifiedBundles", "(", ")", "{", "stopProcessIfNeeded", "(", ")", ";", "StopWatch", "stopWatch", "=", "ThreadLocalJawrContext", ".", "getStopWatch", "(", ")", ";", "if", "(", "config", ".", "getUseSmartBun...
Rebuilds the bundles given in parameter
[ "Rebuilds", "the", "bundles", "given", "in", "parameter" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java#L762-L794
7,256
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java
ResourceBundlesHandlerImpl.build
public void build(List<JoinableResourceBundle> bundlesToBuild, boolean forceWriteBundleMapping, StopWatch stopWatch) { stopProcessIfNeeded(); if (LOGGER.isInfoEnabled()) { LOGGER.info("Starting bundle processing"); } notifyStartBundlingProcess(); boolean mappingFileExists = resourceBundleHandler.isE...
java
public void build(List<JoinableResourceBundle> bundlesToBuild, boolean forceWriteBundleMapping, StopWatch stopWatch) { stopProcessIfNeeded(); if (LOGGER.isInfoEnabled()) { LOGGER.info("Starting bundle processing"); } notifyStartBundlingProcess(); boolean mappingFileExists = resourceBundleHandler.isE...
[ "public", "void", "build", "(", "List", "<", "JoinableResourceBundle", ">", "bundlesToBuild", ",", "boolean", "forceWriteBundleMapping", ",", "StopWatch", "stopWatch", ")", "{", "stopProcessIfNeeded", "(", ")", ";", "if", "(", "LOGGER", ".", "isInfoEnabled", "(", ...
Builds the bundles given in parameter @param bundlesToBuild the list of bundle to build @param forceWriteBundleMapping the flag indicating if the bundle mapping must be written in any case @param stopWatch the stop watch
[ "Builds", "the", "bundles", "given", "in", "parameter" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java#L832-L898
7,257
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java
ResourceBundlesHandlerImpl.storeJawrBundleMapping
private void storeJawrBundleMapping(boolean mappingFileExists, boolean force) { if (config.getUseBundleMapping() && (!mappingFileExists || force)) { bundleMapping.setProperty(JawrConstant.JAWR_CONFIG_HASHCODE, getJawrConfigHashcode()); resourceBundleHandler.storeJawrBundleMapping(bundleMapping); if (resourc...
java
private void storeJawrBundleMapping(boolean mappingFileExists, boolean force) { if (config.getUseBundleMapping() && (!mappingFileExists || force)) { bundleMapping.setProperty(JawrConstant.JAWR_CONFIG_HASHCODE, getJawrConfigHashcode()); resourceBundleHandler.storeJawrBundleMapping(bundleMapping); if (resourc...
[ "private", "void", "storeJawrBundleMapping", "(", "boolean", "mappingFileExists", ",", "boolean", "force", ")", "{", "if", "(", "config", ".", "getUseBundleMapping", "(", ")", "&&", "(", "!", "mappingFileExists", "||", "force", ")", ")", "{", "bundleMapping", ...
Stores the Jawr bundle mapping @param mappingFileExists the flag indicating if the mapping file exists @param force force the storage of Jawr bundle mapping
[ "Stores", "the", "Jawr", "bundle", "mapping" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java#L947-L981
7,258
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java
ResourceBundlesHandlerImpl.executeGlobalPostProcessing
private void executeGlobalPostProcessing(boolean processBundleFlag, StopWatch stopWatch) { // Launch global postprocessing if (resourceTypePostprocessor != null) { if (stopWatch != null) { stopWatch.start("Global postprocessing"); } GlobalPostProcessingContext ctx = new GlobalPostProcessingContext(conf...
java
private void executeGlobalPostProcessing(boolean processBundleFlag, StopWatch stopWatch) { // Launch global postprocessing if (resourceTypePostprocessor != null) { if (stopWatch != null) { stopWatch.start("Global postprocessing"); } GlobalPostProcessingContext ctx = new GlobalPostProcessingContext(conf...
[ "private", "void", "executeGlobalPostProcessing", "(", "boolean", "processBundleFlag", ",", "StopWatch", "stopWatch", ")", "{", "// Launch global postprocessing", "if", "(", "resourceTypePostprocessor", "!=", "null", ")", "{", "if", "(", "stopWatch", "!=", "null", ")"...
Execute the global post processing @param processBundleFlag the flag indicating if the bundle should be processed @param stopWatch the stopWatch
[ "Execute", "the", "global", "post", "processing" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java#L991-L1005
7,259
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java
ResourceBundlesHandlerImpl.joinAndStoreCompositeResourcebundle
private void joinAndStoreCompositeResourcebundle(CompositeResourceBundle composite) { stopProcessIfNeeded(); BundleProcessingStatus status = new BundleProcessingStatus(BundleProcessingStatus.FILE_PROCESSING_TYPE, composite, resourceHandler, config); // Collect all variant names from child bundles Map<Str...
java
private void joinAndStoreCompositeResourcebundle(CompositeResourceBundle composite) { stopProcessIfNeeded(); BundleProcessingStatus status = new BundleProcessingStatus(BundleProcessingStatus.FILE_PROCESSING_TYPE, composite, resourceHandler, config); // Collect all variant names from child bundles Map<Str...
[ "private", "void", "joinAndStoreCompositeResourcebundle", "(", "CompositeResourceBundle", "composite", ")", "{", "stopProcessIfNeeded", "(", ")", ";", "BundleProcessingStatus", "status", "=", "new", "BundleProcessingStatus", "(", "BundleProcessingStatus", ".", "FILE_PROCESSIN...
Joins the members of a composite bundle in all its variants, storing in a separate file for each variant. @param composite the composite resource bundle
[ "Joins", "the", "members", "of", "a", "composite", "bundle", "in", "all", "its", "variants", "storing", "in", "a", "separate", "file", "for", "each", "variant", "." ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java#L1014-L1050
7,260
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java
ResourceBundlesHandlerImpl.hasVariantPostProcessor
private boolean hasVariantPostProcessor(JoinableResourceBundle bundle) { boolean hasVariantPostProcessor = false; ResourceBundlePostProcessor bundlePostProcessor = bundle.getBundlePostProcessor(); if (bundlePostProcessor != null && ((AbstractChainedResourceBundlePostProcessor) bundlePostProcessor).isVariantP...
java
private boolean hasVariantPostProcessor(JoinableResourceBundle bundle) { boolean hasVariantPostProcessor = false; ResourceBundlePostProcessor bundlePostProcessor = bundle.getBundlePostProcessor(); if (bundlePostProcessor != null && ((AbstractChainedResourceBundlePostProcessor) bundlePostProcessor).isVariantP...
[ "private", "boolean", "hasVariantPostProcessor", "(", "JoinableResourceBundle", "bundle", ")", "{", "boolean", "hasVariantPostProcessor", "=", "false", ";", "ResourceBundlePostProcessor", "bundlePostProcessor", "=", "bundle", ".", "getBundlePostProcessor", "(", ")", ";", ...
Checks if the bundle has variant post processor @param bundle the bundle @return true if the bundle has variant post processor
[ "Checks", "if", "the", "bundle", "has", "variant", "post", "processor" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java#L1059-L1075
7,261
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java
ResourceBundlesHandlerImpl.joinAndPostProcessBundle
private void joinAndPostProcessBundle(CompositeResourceBundle composite, BundleProcessingStatus status) { JoinableResourceBundleContent store; stopProcessIfNeeded(); List<Map<String, String>> allVariants = VariantUtils.getAllVariants(composite.getVariants()); // Add the default bundle variant (the non variant...
java
private void joinAndPostProcessBundle(CompositeResourceBundle composite, BundleProcessingStatus status) { JoinableResourceBundleContent store; stopProcessIfNeeded(); List<Map<String, String>> allVariants = VariantUtils.getAllVariants(composite.getVariants()); // Add the default bundle variant (the non variant...
[ "private", "void", "joinAndPostProcessBundle", "(", "CompositeResourceBundle", "composite", ",", "BundleProcessingStatus", "status", ")", "{", "JoinableResourceBundleContent", "store", ";", "stopProcessIfNeeded", "(", ")", ";", "List", "<", "Map", "<", "String", ",", ...
Joins and post process the variant composite bundle @param composite the composite bundle @param status the status @param compositeBundleVariants the variants
[ "Joins", "and", "post", "process", "the", "variant", "composite", "bundle" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java#L1087-L1120
7,262
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java
ResourceBundlesHandlerImpl.postProcessJoinedCompositeBundle
private JoinableResourceBundleContent postProcessJoinedCompositeBundle(CompositeResourceBundle composite, StringBuffer content, BundleProcessingStatus status) { JoinableResourceBundleContent store = new JoinableResourceBundleContent(); StringBuffer processedContent = null; status.setProcessingType(BundleProce...
java
private JoinableResourceBundleContent postProcessJoinedCompositeBundle(CompositeResourceBundle composite, StringBuffer content, BundleProcessingStatus status) { JoinableResourceBundleContent store = new JoinableResourceBundleContent(); StringBuffer processedContent = null; status.setProcessingType(BundleProce...
[ "private", "JoinableResourceBundleContent", "postProcessJoinedCompositeBundle", "(", "CompositeResourceBundle", "composite", ",", "StringBuffer", "content", ",", "BundleProcessingStatus", "status", ")", "{", "JoinableResourceBundleContent", "store", "=", "new", "JoinableResourceB...
Postprocess the composite bundle only if a composite bundle post processor is defined @param composite the composite bundle @param content the content @param status the status @return the content
[ "Postprocess", "the", "composite", "bundle", "only", "if", "a", "composite", "bundle", "post", "processor", "is", "defined" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java#L1134-L1154
7,263
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java
ResourceBundlesHandlerImpl.initBundleDataHashcode
private void initBundleDataHashcode(JoinableResourceBundle bundle, JoinableResourceBundleContent store, String variant) { String bundleHashcode = bundleHashcodeGenerator.generateHashCode(config, store.getContent().toString()); bundle.setBundleDataHashCode(variant, bundleHashcode); }
java
private void initBundleDataHashcode(JoinableResourceBundle bundle, JoinableResourceBundleContent store, String variant) { String bundleHashcode = bundleHashcodeGenerator.generateHashCode(config, store.getContent().toString()); bundle.setBundleDataHashCode(variant, bundleHashcode); }
[ "private", "void", "initBundleDataHashcode", "(", "JoinableResourceBundle", "bundle", ",", "JoinableResourceBundleContent", "store", ",", "String", "variant", ")", "{", "String", "bundleHashcode", "=", "bundleHashcodeGenerator", ".", "generateHashCode", "(", "config", ","...
Initialize the bundle data hashcode and initialize the bundle mapping if needed @param bundle the bundle @param store the data to store
[ "Initialize", "the", "bundle", "data", "hashcode", "and", "initialize", "the", "bundle", "mapping", "if", "needed" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java#L1165-L1170
7,264
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java
ResourceBundlesHandlerImpl.joinAndStoreBundle
private void joinAndStoreBundle(JoinableResourceBundle bundle) { BundleProcessingStatus status = new BundleProcessingStatus(BundleProcessingStatus.FILE_PROCESSING_TYPE, bundle, resourceHandler, config); JoinableResourceBundleContent store = null; // Process the bundle for searching variant if (needToSearc...
java
private void joinAndStoreBundle(JoinableResourceBundle bundle) { BundleProcessingStatus status = new BundleProcessingStatus(BundleProcessingStatus.FILE_PROCESSING_TYPE, bundle, resourceHandler, config); JoinableResourceBundleContent store = null; // Process the bundle for searching variant if (needToSearc...
[ "private", "void", "joinAndStoreBundle", "(", "JoinableResourceBundle", "bundle", ")", "{", "BundleProcessingStatus", "status", "=", "new", "BundleProcessingStatus", "(", "BundleProcessingStatus", ".", "FILE_PROCESSING_TYPE", ",", "bundle", ",", "resourceHandler", ",", "c...
Joins the members of a bundle and stores it @param bundle the bundle @param the flag indicating if we should process the bundle or not
[ "Joins", "the", "members", "of", "a", "bundle", "and", "stores", "it" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java#L1215-L1253
7,265
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java
ResourceBundlesHandlerImpl.storeBundle
private void storeBundle(String bundleId, JoinableResourceBundleContent store) { stopProcessIfNeeded(); if (bundleMustBeProcessedInLive(store.getContent().toString())) { liveProcessBundles.add(bundleId); } resourceBundleHandler.storeBundle(bundleId, store); }
java
private void storeBundle(String bundleId, JoinableResourceBundleContent store) { stopProcessIfNeeded(); if (bundleMustBeProcessedInLive(store.getContent().toString())) { liveProcessBundles.add(bundleId); } resourceBundleHandler.storeBundle(bundleId, store); }
[ "private", "void", "storeBundle", "(", "String", "bundleId", ",", "JoinableResourceBundleContent", "store", ")", "{", "stopProcessIfNeeded", "(", ")", ";", "if", "(", "bundleMustBeProcessedInLive", "(", "store", ".", "getContent", "(", ")", ".", "toString", "(", ...
Store the bundle @param bundleId the bundle Id to store @param store the bundle
[ "Store", "the", "bundle" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java#L1263-L1271
7,266
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java
ResourceBundlesHandlerImpl.joinAndPostProcessBundle
private void joinAndPostProcessBundle(JoinableResourceBundle bundle, BundleProcessingStatus status) { JoinableResourceBundleContent store; List<Map<String, String>> allVariants = VariantUtils.getAllVariants(bundle.getVariants()); // Add the default bundle variant (the non variant one) allVariants.add(null); ...
java
private void joinAndPostProcessBundle(JoinableResourceBundle bundle, BundleProcessingStatus status) { JoinableResourceBundleContent store; List<Map<String, String>> allVariants = VariantUtils.getAllVariants(bundle.getVariants()); // Add the default bundle variant (the non variant one) allVariants.add(null); ...
[ "private", "void", "joinAndPostProcessBundle", "(", "JoinableResourceBundle", "bundle", ",", "BundleProcessingStatus", "status", ")", "{", "JoinableResourceBundleContent", "store", ";", "List", "<", "Map", "<", "String", ",", "String", ">", ">", "allVariants", "=", ...
Join and post process the bundle taking in account all its variants. @param bundle the bundle @param status the bundle processing status
[ "Join", "and", "post", "process", "the", "bundle", "taking", "in", "account", "all", "its", "variants", "." ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java#L1292-L1307
7,267
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java
ResourceBundlesHandlerImpl.joinAndPostprocessBundle
private JoinableResourceBundleContent joinAndPostprocessBundle(JoinableResourceBundle bundle, Map<String, String> variants, BundleProcessingStatus status) { JoinableResourceBundleContent bundleContent = new JoinableResourceBundleContent(); StringBuffer bundleData = new StringBuffer(); StringBuffer store = nu...
java
private JoinableResourceBundleContent joinAndPostprocessBundle(JoinableResourceBundle bundle, Map<String, String> variants, BundleProcessingStatus status) { JoinableResourceBundleContent bundleContent = new JoinableResourceBundleContent(); StringBuffer bundleData = new StringBuffer(); StringBuffer store = nu...
[ "private", "JoinableResourceBundleContent", "joinAndPostprocessBundle", "(", "JoinableResourceBundle", "bundle", ",", "Map", "<", "String", ",", "String", ">", "variants", ",", "BundleProcessingStatus", "status", ")", "{", "JoinableResourceBundleContent", "bundleContent", "...
Reads all the members of a bundle and executes all associated postprocessors. @param bundle the bundle @param variants the variant map @param the bundling processing status @param the flag indicating if we should process the bundle or not @return the resource bundle content, where all postprocessors have been executed
[ "Reads", "all", "the", "members", "of", "a", "bundle", "and", "executes", "all", "associated", "postprocessors", "." ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java#L1324-L1399
7,268
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java
ResourceBundlesHandlerImpl.executeUnitaryPostProcessing
private StringBuffer executeUnitaryPostProcessing(JoinableResourceBundle bundle, BundleProcessingStatus status, StringBuffer content, ResourceBundlePostProcessor defaultPostProcessor) { StringBuffer bundleData = new StringBuffer(); status.setProcessingType(BundleProcessingStatus.FILE_PROCESSING_TYPE); if (nul...
java
private StringBuffer executeUnitaryPostProcessing(JoinableResourceBundle bundle, BundleProcessingStatus status, StringBuffer content, ResourceBundlePostProcessor defaultPostProcessor) { StringBuffer bundleData = new StringBuffer(); status.setProcessingType(BundleProcessingStatus.FILE_PROCESSING_TYPE); if (nul...
[ "private", "StringBuffer", "executeUnitaryPostProcessing", "(", "JoinableResourceBundle", "bundle", ",", "BundleProcessingStatus", "status", ",", "StringBuffer", "content", ",", "ResourceBundlePostProcessor", "defaultPostProcessor", ")", "{", "StringBuffer", "bundleData", "=", ...
Executes the unitary resource post processing @param bundle the bundle @param status the bundle processing status @param content the content to process @return the processed content
[ "Executes", "the", "unitary", "resource", "post", "processing" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java#L1412-L1430
7,269
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java
ResourceBundlesHandlerImpl.executeBundlePostProcessing
private StringBuffer executeBundlePostProcessing(JoinableResourceBundle bundle, BundleProcessingStatus status, StringBuffer bundleData) { StringBuffer store; status.setProcessingType(BundleProcessingStatus.BUNDLE_PROCESSING_TYPE); status.setLastPathAdded(bundle.getId()); if (null != bundle.getBundlePostProc...
java
private StringBuffer executeBundlePostProcessing(JoinableResourceBundle bundle, BundleProcessingStatus status, StringBuffer bundleData) { StringBuffer store; status.setProcessingType(BundleProcessingStatus.BUNDLE_PROCESSING_TYPE); status.setLastPathAdded(bundle.getId()); if (null != bundle.getBundlePostProc...
[ "private", "StringBuffer", "executeBundlePostProcessing", "(", "JoinableResourceBundle", "bundle", ",", "BundleProcessingStatus", "status", ",", "StringBuffer", "bundleData", ")", "{", "StringBuffer", "store", ";", "status", ".", "setProcessingType", "(", "BundleProcessingS...
Execute the bundle post processing @param bundle the bundle @param status the status @param bundleData the bundle data @return the processed content
[ "Execute", "the", "bundle", "post", "processing" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java#L1443-L1456
7,270
j-a-w-r/jawr-main-repo
jawr-dwr3.x/jawr-dwr3.x-extension/src/main/java/net/jawr/web/resource/bundle/generator/dwr/DWR3BeanGenerator.java
DWR3BeanGenerator.getContainer
private Container getContainer(final GeneratorContext context) { List<Container> containers = StartupUtil .getAllPublishedContainers(context.getServletContext()); // TODO: here we assume there is only one DWR Servlet / Container ... we // should find a way to math the container with the DWR mapping config f...
java
private Container getContainer(final GeneratorContext context) { List<Container> containers = StartupUtil .getAllPublishedContainers(context.getServletContext()); // TODO: here we assume there is only one DWR Servlet / Container ... we // should find a way to math the container with the DWR mapping config f...
[ "private", "Container", "getContainer", "(", "final", "GeneratorContext", "context", ")", "{", "List", "<", "Container", ">", "containers", "=", "StartupUtil", ".", "getAllPublishedContainers", "(", "context", ".", "getServletContext", "(", ")", ")", ";", "// TODO...
Get the DWR Container. If multiple DWR containers exist in the ServletContext, the first found is returned. @param context The GeneratorContext @return The DWR Container
[ "Get", "the", "DWR", "Container", ".", "If", "multiple", "DWR", "containers", "exist", "in", "the", "ServletContext", "the", "first", "found", "is", "returned", "." ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr-dwr3.x/jawr-dwr3.x-extension/src/main/java/net/jawr/web/resource/bundle/generator/dwr/DWR3BeanGenerator.java#L176-L185
7,271
j-a-w-r/jawr-main-repo
jawr-dwr3.x/jawr-dwr3.x-extension/src/main/java/net/jawr/web/resource/bundle/generator/dwr/DWR3BeanGenerator.java
DWR3BeanGenerator.getInterfaceScript
private String getInterfaceScript(String scriptName, final GeneratorContext context) throws IOException { Container container = getContainer(context); CreatorManager ctManager = (CreatorManager) container .getBean(CreatorManager.class.getName()); if (ctManager.getCreator(scriptName, false) != null) { In...
java
private String getInterfaceScript(String scriptName, final GeneratorContext context) throws IOException { Container container = getContainer(context); CreatorManager ctManager = (CreatorManager) container .getBean(CreatorManager.class.getName()); if (ctManager.getCreator(scriptName, false) != null) { In...
[ "private", "String", "getInterfaceScript", "(", "String", "scriptName", ",", "final", "GeneratorContext", "context", ")", "throws", "IOException", "{", "Container", "container", "=", "getContainer", "(", "context", ")", ";", "CreatorManager", "ctManager", "=", "(", ...
Get a specific interface script @param scriptName The name of the script @param context The GeneratorContext @return The script as a String @throws IOException
[ "Get", "a", "specific", "interface", "script" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr-dwr3.x/jawr-dwr3.x-extension/src/main/java/net/jawr/web/resource/bundle/generator/dwr/DWR3BeanGenerator.java#L197-L212
7,272
j-a-w-r/jawr-main-repo
jawr-dwr3.x/jawr-dwr3.x-extension/src/main/java/net/jawr/web/resource/bundle/generator/dwr/DWR3BeanGenerator.java
DWR3BeanGenerator.getAllPublishedInterfaces
private String getAllPublishedInterfaces(final GeneratorContext context) throws IOException { StringBuilder sb = new StringBuilder(); Container container = getContainer(context); // The creatormanager holds the list of beans CreatorManager ctManager = (CreatorManager) container .getBean(CreatorManager...
java
private String getAllPublishedInterfaces(final GeneratorContext context) throws IOException { StringBuilder sb = new StringBuilder(); Container container = getContainer(context); // The creatormanager holds the list of beans CreatorManager ctManager = (CreatorManager) container .getBean(CreatorManager...
[ "private", "String", "getAllPublishedInterfaces", "(", "final", "GeneratorContext", "context", ")", "throws", "IOException", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "Container", "container", "=", "getContainer", "(", "context", ")", ...
Get all interfaces in one script @param context The GeneratorContext @return All interfaces scripts as a single string @throws IOException
[ "Get", "all", "interfaces", "in", "one", "script" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr-dwr3.x/jawr-dwr3.x-extension/src/main/java/net/jawr/web/resource/bundle/generator/dwr/DWR3BeanGenerator.java#L222-L262
7,273
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/generator/css/sass/vaadin/SassVaadinGenerator.java
SassVaadinGenerator.compile
protected String compile(JoinableResourceBundle bundle, String content, String path, GeneratorContext context) { try { JawrScssResolver scssResolver = new JawrScssResolver(bundle, rsHandler); JawrScssStylesheet sheet = new JawrScssStylesheet(bundle, content, path, scssResolver, context.getCharset()); s...
java
protected String compile(JoinableResourceBundle bundle, String content, String path, GeneratorContext context) { try { JawrScssResolver scssResolver = new JawrScssResolver(bundle, rsHandler); JawrScssStylesheet sheet = new JawrScssStylesheet(bundle, content, path, scssResolver, context.getCharset()); s...
[ "protected", "String", "compile", "(", "JoinableResourceBundle", "bundle", ",", "String", "content", ",", "String", "path", ",", "GeneratorContext", "context", ")", "{", "try", "{", "JawrScssResolver", "scssResolver", "=", "new", "JawrScssResolver", "(", "bundle", ...
Compile the SASS source to a CSS source @param bundle the bundle @param content the resource content to compile @param path the compiled resource path @param context the generator context @return the compiled CSS content
[ "Compile", "the", "SASS", "source", "to", "a", "CSS", "source" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/generator/css/sass/vaadin/SassVaadinGenerator.java#L165-L179
7,274
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/generator/AbstractCSSGenerator.java
AbstractCSSGenerator.generateResourceForDebug
protected Reader generateResourceForDebug(Reader rd, GeneratorContext context) { // Rewrite the image URL StringWriter writer = new StringWriter(); try { IOUtils.copy(rd, writer); String content = rewriteUrl(context, writer.toString()); rd = new StringReader(content); } catch (IOException e) { thro...
java
protected Reader generateResourceForDebug(Reader rd, GeneratorContext context) { // Rewrite the image URL StringWriter writer = new StringWriter(); try { IOUtils.copy(rd, writer); String content = rewriteUrl(context, writer.toString()); rd = new StringReader(content); } catch (IOException e) { thro...
[ "protected", "Reader", "generateResourceForDebug", "(", "Reader", "rd", ",", "GeneratorContext", "context", ")", "{", "// Rewrite the image URL", "StringWriter", "writer", "=", "new", "StringWriter", "(", ")", ";", "try", "{", "IOUtils", ".", "copy", "(", "rd", ...
Returns the resource in debug mode. Here an extra step is used to rewrite the URL in debug mode @param reader the reader @param context the generator context @return the reader
[ "Returns", "the", "resource", "in", "debug", "mode", ".", "Here", "an", "extra", "step", "is", "used", "to", "rewrite", "the", "URL", "in", "debug", "mode" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/generator/AbstractCSSGenerator.java#L76-L89
7,275
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/generator/AbstractCSSGenerator.java
AbstractCSSGenerator.rewriteUrl
protected String rewriteUrl(GeneratorContext context, String content) throws IOException { JawrConfig jawrConfig = context.getConfig(); CssImageUrlRewriter rewriter = new CssImageUrlRewriter(jawrConfig); String bundlePath = PathNormalizer.joinPaths(jawrConfig.getServletMapping(), ResourceGenerator.CSS_DEBUGPATH)...
java
protected String rewriteUrl(GeneratorContext context, String content) throws IOException { JawrConfig jawrConfig = context.getConfig(); CssImageUrlRewriter rewriter = new CssImageUrlRewriter(jawrConfig); String bundlePath = PathNormalizer.joinPaths(jawrConfig.getServletMapping(), ResourceGenerator.CSS_DEBUGPATH)...
[ "protected", "String", "rewriteUrl", "(", "GeneratorContext", "context", ",", "String", "content", ")", "throws", "IOException", "{", "JawrConfig", "jawrConfig", "=", "context", ".", "getConfig", "(", ")", ";", "CssImageUrlRewriter", "rewriter", "=", "new", "CssIm...
Rewrite the URL for debug mode @param context the generator context @param content the content @return the rewritten content @throws IOException if IOException occurs
[ "Rewrite", "the", "URL", "for", "debug", "mode" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/generator/AbstractCSSGenerator.java#L102-L110
7,276
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/generator/AbstractCSSGenerator.java
AbstractCSSGenerator.getBinaryServletMapping
private String getBinaryServletMapping() { String binaryServletMapping = null; // Retrieve binary servlet mapping from the binary resource handler BinaryResourcesHandler binaryRsHandler = (BinaryResourcesHandler) config.getContext() .getAttribute(JawrConstant.BINARY_CONTEXT_ATTRIBUTE); if (binaryRsHandler !...
java
private String getBinaryServletMapping() { String binaryServletMapping = null; // Retrieve binary servlet mapping from the binary resource handler BinaryResourcesHandler binaryRsHandler = (BinaryResourcesHandler) config.getContext() .getAttribute(JawrConstant.BINARY_CONTEXT_ATTRIBUTE); if (binaryRsHandler !...
[ "private", "String", "getBinaryServletMapping", "(", ")", "{", "String", "binaryServletMapping", "=", "null", ";", "// Retrieve binary servlet mapping from the binary resource handler", "BinaryResourcesHandler", "binaryRsHandler", "=", "(", "BinaryResourcesHandler", ")", "config"...
Retrieves the binary servlet mapping @return the binary servlet mapping or null if it doesn't exist
[ "Retrieves", "the", "binary", "servlet", "mapping" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/generator/AbstractCSSGenerator.java#L175-L184
7,277
j-a-w-r/jawr-main-repo
jawr-grails/jawr-grails-plugin/src/java/net/jawr/web/resource/bundle/locale/message/grails/GrailsMessageBundleScriptCreator.java
GrailsMessageBundleScriptCreator.getBaseNames
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 diff...
java
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 diff...
[ "public", "String", "[", "]", "getBaseNames", "(", "boolean", "warDeployed", ")", "{", "String", "[", "]", "names", "=", "configParam", ".", "split", "(", "GrailsLocaleUtils", ".", "RESOURCE_BUNDLE_SEPARATOR", ")", ";", "List", "<", "String", ">", "baseNames",...
Returns the basenames @return the base names for the bundle resources
[ "Returns", "the", "basenames" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr-grails/jawr-grails-plugin/src/java/net/jawr/web/resource/bundle/locale/message/grails/GrailsMessageBundleScriptCreator.java#L136-L172
7,278
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/factory/global/postprocessor/BasicGlobalPostprocessorChainFactory.java
BasicGlobalPostprocessorChainFactory.buildProcessorByKey
@Override protected AbstractChainedGlobalProcessor<GlobalPostProcessingContext> buildProcessorByKey(String key) { AbstractChainedGlobalProcessor<GlobalPostProcessingContext> processor = null; if (key.equals(JawrConstant.GLOBAL_GOOGLE_CLOSURE_POSTPROCESSOR_ID)) { processor = new ClosureGlobalPostProcessor(); ...
java
@Override protected AbstractChainedGlobalProcessor<GlobalPostProcessingContext> buildProcessorByKey(String key) { AbstractChainedGlobalProcessor<GlobalPostProcessingContext> processor = null; if (key.equals(JawrConstant.GLOBAL_GOOGLE_CLOSURE_POSTPROCESSOR_ID)) { processor = new ClosureGlobalPostProcessor(); ...
[ "@", "Override", "protected", "AbstractChainedGlobalProcessor", "<", "GlobalPostProcessingContext", ">", "buildProcessorByKey", "(", "String", "key", ")", "{", "AbstractChainedGlobalProcessor", "<", "GlobalPostProcessingContext", ">", "processor", "=", "null", ";", "if", ...
Build the global preprocessor from the ID given in parameter @param key the ID of the preprocessor @return a global preprocessor
[ "Build", "the", "global", "preprocessor", "from", "the", "ID", "given", "in", "parameter" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/factory/global/postprocessor/BasicGlobalPostprocessorChainFactory.java#L37-L47
7,279
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/global/preprocessor/css/smartsprites/CssSmartSpritesGlobalPreprocessor.java
CssSmartSpritesGlobalPreprocessor.updateBundlesDirtyState
private void updateBundlesDirtyState(List<JoinableResourceBundle> bundles, CssSmartSpritesResourceReader cssSpriteResourceReader) { for (JoinableResourceBundle bundle : bundles) { List<BundlePath> bundlePaths = bundle.getItemPathList(); for (BundlePath bundlePath : bundlePaths) { String path = bundlePa...
java
private void updateBundlesDirtyState(List<JoinableResourceBundle> bundles, CssSmartSpritesResourceReader cssSpriteResourceReader) { for (JoinableResourceBundle bundle : bundles) { List<BundlePath> bundlePaths = bundle.getItemPathList(); for (BundlePath bundlePath : bundlePaths) { String path = bundlePa...
[ "private", "void", "updateBundlesDirtyState", "(", "List", "<", "JoinableResourceBundle", ">", "bundles", ",", "CssSmartSpritesResourceReader", "cssSpriteResourceReader", ")", "{", "for", "(", "JoinableResourceBundle", "bundle", ":", "bundles", ")", "{", "List", "<", ...
Update the bundles dirty state @param bundles the list of bundle @param cssSpriteResourceReader the css sprite resource reader
[ "Update", "the", "bundles", "dirty", "state" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/global/preprocessor/css/smartsprites/CssSmartSpritesGlobalPreprocessor.java#L114-L137
7,280
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/global/preprocessor/css/smartsprites/CssSmartSpritesGlobalPreprocessor.java
CssSmartSpritesGlobalPreprocessor.generateSprites
private void generateSprites(ResourceReaderHandler cssRsHandler, BinaryResourcesHandler binaryRsHandler, Set<String> resourcePaths, JawrConfig jawrConfig, Charset charset) { MessageLevel msgLevel = MessageLevel.valueOf(ERROR_LEVEL); String sinkLevel = WARN_LEVEL; if (LOGGER.isTraceEnabled() || LOGGER.isDebugE...
java
private void generateSprites(ResourceReaderHandler cssRsHandler, BinaryResourcesHandler binaryRsHandler, Set<String> resourcePaths, JawrConfig jawrConfig, Charset charset) { MessageLevel msgLevel = MessageLevel.valueOf(ERROR_LEVEL); String sinkLevel = WARN_LEVEL; if (LOGGER.isTraceEnabled() || LOGGER.isDebugE...
[ "private", "void", "generateSprites", "(", "ResourceReaderHandler", "cssRsHandler", ",", "BinaryResourcesHandler", "binaryRsHandler", ",", "Set", "<", "String", ">", "resourcePaths", ",", "JawrConfig", "jawrConfig", ",", "Charset", "charset", ")", "{", "MessageLevel", ...
Generates the image sprites from the smartsprites annotation in the CSS, rewrite the CSS files to references the generated sprites. @param cssRsHandler the css resourceHandler @param binaryRsHandler the binary resourceHandler @param resourcePaths the set of CSS resource paths to handle @param jawrConfig the Jawr confi...
[ "Generates", "the", "image", "sprites", "from", "the", "smartsprites", "annotation", "in", "the", "CSS", "rewrite", "the", "CSS", "files", "to", "references", "the", "generated", "sprites", "." ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/global/preprocessor/css/smartsprites/CssSmartSpritesGlobalPreprocessor.java#L154-L211
7,281
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/global/preprocessor/css/smartsprites/CssSmartSpritesGlobalPreprocessor.java
CssSmartSpritesGlobalPreprocessor.getResourcePaths
private Set<String> getResourcePaths(List<JoinableResourceBundle> bundles) { Set<String> resourcePaths = new HashSet<>(); for (JoinableResourceBundle bundle : bundles) { for (BundlePath bundlePath : bundle.getItemPathList()) { resourcePaths.add(bundlePath.getPath()); } } return resourcePaths; }
java
private Set<String> getResourcePaths(List<JoinableResourceBundle> bundles) { Set<String> resourcePaths = new HashSet<>(); for (JoinableResourceBundle bundle : bundles) { for (BundlePath bundlePath : bundle.getItemPathList()) { resourcePaths.add(bundlePath.getPath()); } } return resourcePaths; }
[ "private", "Set", "<", "String", ">", "getResourcePaths", "(", "List", "<", "JoinableResourceBundle", ">", "bundles", ")", "{", "Set", "<", "String", ">", "resourcePaths", "=", "new", "HashSet", "<>", "(", ")", ";", "for", "(", "JoinableResourceBundle", "bun...
Returns the list of all CSS files defined in the bundles. @param bundles the list of bundle @return the list of all CSS files defined in the bundles.
[ "Returns", "the", "list", "of", "all", "CSS", "files", "defined", "in", "the", "bundles", "." ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/global/preprocessor/css/smartsprites/CssSmartSpritesGlobalPreprocessor.java#L220-L231
7,282
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/variant/VariantUtils.java
VariantUtils.getVariants
private static List<Map<String, String>> getVariants(Map<String, String> curVariant, String variantType, Collection<String> variantList) { List<Map<String, String>> variants = new ArrayList<>(); for (String variant : variantList) { Map<String, String> map = new HashMap<>(); if (curVariant != null) { m...
java
private static List<Map<String, String>> getVariants(Map<String, String> curVariant, String variantType, Collection<String> variantList) { List<Map<String, String>> variants = new ArrayList<>(); for (String variant : variantList) { Map<String, String> map = new HashMap<>(); if (curVariant != null) { m...
[ "private", "static", "List", "<", "Map", "<", "String", ",", "String", ">", ">", "getVariants", "(", "Map", "<", "String", ",", "String", ">", "curVariant", ",", "String", "variantType", ",", "Collection", "<", "String", ">", "variantList", ")", "{", "Li...
Returns the list of variant maps, which are initialized with the current map values and each element of the list contains an element of the variant list with the variant type as key @param curVariant the current variant map @param variantType the variant type @param variantList the variant list @return the list of var...
[ "Returns", "the", "list", "of", "variant", "maps", "which", "are", "initialized", "with", "the", "current", "map", "values", "and", "each", "element", "of", "the", "list", "contains", "an", "element", "of", "the", "variant", "list", "with", "the", "variant",...
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/variant/VariantUtils.java#L81-L94
7,283
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/variant/VariantUtils.java
VariantUtils.getVariantKeys
private static List<String> getVariantKeys(String variantKeyPrefix, Collection<String> variants) { List<String> variantKeys = new ArrayList<>(); for (String variant : variants) { if (variant == null) { variant = ""; } if (variantKeyPrefix == null) { variantKeys.add(variant); } else { varian...
java
private static List<String> getVariantKeys(String variantKeyPrefix, Collection<String> variants) { List<String> variantKeys = new ArrayList<>(); for (String variant : variants) { if (variant == null) { variant = ""; } if (variantKeyPrefix == null) { variantKeys.add(variant); } else { varian...
[ "private", "static", "List", "<", "String", ">", "getVariantKeys", "(", "String", "variantKeyPrefix", ",", "Collection", "<", "String", ">", "variants", ")", "{", "List", "<", "String", ">", "variantKeys", "=", "new", "ArrayList", "<>", "(", ")", ";", "for...
Returns the variant keys @param variantKeyPrefix the variant key prefix @param variants The variants
[ "Returns", "the", "variant", "keys" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/variant/VariantUtils.java#L167-L182
7,284
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/variant/VariantUtils.java
VariantUtils.getVariantKey
public static String getVariantKey(Map<String, String> variants) { String variantKey = ""; if (variants != null) { variantKey = getVariantKey(variants, variants.keySet()); } return variantKey; }
java
public static String getVariantKey(Map<String, String> variants) { String variantKey = ""; if (variants != null) { variantKey = getVariantKey(variants, variants.keySet()); } return variantKey; }
[ "public", "static", "String", "getVariantKey", "(", "Map", "<", "String", ",", "String", ">", "variants", ")", "{", "String", "variantKey", "=", "\"\"", ";", "if", "(", "variants", "!=", "null", ")", "{", "variantKey", "=", "getVariantKey", "(", "variants"...
Returns the variant key from the variants given in parameter @param variants the variants @return the variant key
[ "Returns", "the", "variant", "key", "from", "the", "variants", "given", "in", "parameter" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/variant/VariantUtils.java#L191-L199
7,285
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/variant/VariantUtils.java
VariantUtils.getVariantKey
public static String getVariantKey(Map<String, String> curVariants, Set<String> variantTypes) { String variantKey = ""; if (curVariants != null && variantTypes != null) { Map<String, String> tempVariants = new TreeMap<>(curVariants); StringBuilder variantKeyBuf = new StringBuilder(); for (Entry<String, S...
java
public static String getVariantKey(Map<String, String> curVariants, Set<String> variantTypes) { String variantKey = ""; if (curVariants != null && variantTypes != null) { Map<String, String> tempVariants = new TreeMap<>(curVariants); StringBuilder variantKeyBuf = new StringBuilder(); for (Entry<String, S...
[ "public", "static", "String", "getVariantKey", "(", "Map", "<", "String", ",", "String", ">", "curVariants", ",", "Set", "<", "String", ">", "variantTypes", ")", "{", "String", "variantKey", "=", "\"\"", ";", "if", "(", "curVariants", "!=", "null", "&&", ...
Resolves a registered path from a locale key, using the same algorithm used to locate ResourceBundles. @param curVariants the current variant map @param variantTypes the list of variant types @return the variant key to use
[ "Resolves", "a", "registered", "path", "from", "a", "locale", "key", "using", "the", "same", "algorithm", "used", "to", "locate", "ResourceBundles", "." ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/variant/VariantUtils.java#L211-L236
7,286
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/variant/VariantUtils.java
VariantUtils.getVariantBundleName
public static String getVariantBundleName(String bundleName, String variantKey, boolean iGeneratedResource) { String newName = bundleName; if (StringUtils.isNotEmpty(variantKey)) { int idxSeparator = bundleName.lastIndexOf('.'); if (!iGeneratedResource && idxSeparator != -1) { newName = bundleName.substr...
java
public static String getVariantBundleName(String bundleName, String variantKey, boolean iGeneratedResource) { String newName = bundleName; if (StringUtils.isNotEmpty(variantKey)) { int idxSeparator = bundleName.lastIndexOf('.'); if (!iGeneratedResource && idxSeparator != -1) { newName = bundleName.substr...
[ "public", "static", "String", "getVariantBundleName", "(", "String", "bundleName", ",", "String", "variantKey", ",", "boolean", "iGeneratedResource", ")", "{", "String", "newName", "=", "bundleName", ";", "if", "(", "StringUtils", ".", "isNotEmpty", "(", "variantK...
Get the bundle name taking in account the variant key @param bundleName the bundle name @param variantKey the variant key @param iGeneratedResource the flag indicating if it's a generated resource @return the variant bundle name
[ "Get", "the", "bundle", "name", "taking", "in", "account", "the", "variant", "key" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/variant/VariantUtils.java#L249-L264
7,287
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/variant/VariantUtils.java
VariantUtils.getVariantBundleName
public static String getVariantBundleName(String bundleName, Map<String, String> variants, boolean isGeneratedResource) { String variantKey = getVariantKey(variants); return getVariantBundleName(bundleName, variantKey, isGeneratedResource); }
java
public static String getVariantBundleName(String bundleName, Map<String, String> variants, boolean isGeneratedResource) { String variantKey = getVariantKey(variants); return getVariantBundleName(bundleName, variantKey, isGeneratedResource); }
[ "public", "static", "String", "getVariantBundleName", "(", "String", "bundleName", ",", "Map", "<", "String", ",", "String", ">", "variants", ",", "boolean", "isGeneratedResource", ")", "{", "String", "variantKey", "=", "getVariantKey", "(", "variants", ")", ";"...
Returns the bundle name from the variants given in parameter @param bundleName the original bundle name @param variants the map of variant @param isGeneratedResource the flag indicating if it's a generated resource or not @return the variant bundle name
[ "Returns", "the", "bundle", "name", "from", "the", "variants", "given", "in", "parameter" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/variant/VariantUtils.java#L277-L282
7,288
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/variant/VariantUtils.java
VariantUtils.concatVariants
public static Map<String, VariantSet> concatVariants(Map<String, VariantSet> variantSet1, Map<String, VariantSet> variantSet2) { Map<String, VariantSet> result = new HashMap<>(); if (!isEmpty(variantSet1) && isEmpty(variantSet2)) { result.putAll(variantSet1); } else if (isEmpty(variantSet1) && !isEmpty(var...
java
public static Map<String, VariantSet> concatVariants(Map<String, VariantSet> variantSet1, Map<String, VariantSet> variantSet2) { Map<String, VariantSet> result = new HashMap<>(); if (!isEmpty(variantSet1) && isEmpty(variantSet2)) { result.putAll(variantSet1); } else if (isEmpty(variantSet1) && !isEmpty(var...
[ "public", "static", "Map", "<", "String", ",", "VariantSet", ">", "concatVariants", "(", "Map", "<", "String", ",", "VariantSet", ">", "variantSet1", ",", "Map", "<", "String", ",", "VariantSet", ">", "variantSet2", ")", "{", "Map", "<", "String", ",", "...
Concatenates 2 map of variant sets. @param variantSet1 the first map @param variantSet2 the second map @return the concatenated variant map
[ "Concatenates", "2", "map", "of", "variant", "sets", "." ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/variant/VariantUtils.java#L293-L332
7,289
j-a-w-r/jawr-main-repo
jawr-tools/jawr-ant/src/main/java/net/jawr/ant/BundleTask.java
BundleTask.cleanDirectory
public void cleanDirectory( final File directory ) throws IOException { if ( !directory.exists() ) { final String message = directory + " does not exist"; throw new IllegalArgumentException( message ); } if ( !directory.isDirectory() ) { ...
java
public void cleanDirectory( final File directory ) throws IOException { if ( !directory.exists() ) { final String message = directory + " does not exist"; throw new IllegalArgumentException( message ); } if ( !directory.isDirectory() ) { ...
[ "public", "void", "cleanDirectory", "(", "final", "File", "directory", ")", "throws", "IOException", "{", "if", "(", "!", "directory", ".", "exists", "(", ")", ")", "{", "final", "String", "message", "=", "directory", "+", "\" does not exist\"", ";", "throw"...
Clean a directory without deleting it.
[ "Clean", "a", "directory", "without", "deleting", "it", "." ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr-tools/jawr-ant/src/main/java/net/jawr/ant/BundleTask.java#L204-L227
7,290
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/global/postprocessor/google/closure/ClosureGlobalPostProcessor.java
ClosureGlobalPostProcessor.getClosureCompilerArgs
private String[] getClosureCompilerArgs(GlobalPostProcessingContext ctx, List<JoinableResourceBundle> tmpBundles, Map<String, String> resultBundlePathMapping) { List<String> args = new ArrayList<>(); JawrConfig config = ctx.getJawrConfig(); List<JoinableResourceBundle> bundles = new ArrayList<>(tmpBundles); ...
java
private String[] getClosureCompilerArgs(GlobalPostProcessingContext ctx, List<JoinableResourceBundle> tmpBundles, Map<String, String> resultBundlePathMapping) { List<String> args = new ArrayList<>(); JawrConfig config = ctx.getJawrConfig(); List<JoinableResourceBundle> bundles = new ArrayList<>(tmpBundles); ...
[ "private", "String", "[", "]", "getClosureCompilerArgs", "(", "GlobalPostProcessingContext", "ctx", ",", "List", "<", "JoinableResourceBundle", ">", "tmpBundles", ",", "Map", "<", "String", ",", "String", ">", "resultBundlePathMapping", ")", "{", "List", "<", "Str...
Returns the closure compiler arguments @param ctx the global processing context @param tmpBundles the bundles @param resultBundlePathMapping the object which defines the mapping between the bundle name and the bundle path @return
[ "Returns", "the", "closure", "compiler", "arguments" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/global/postprocessor/google/closure/ClosureGlobalPostProcessor.java#L244-L295
7,291
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/global/postprocessor/google/closure/ClosureGlobalPostProcessor.java
ClosureGlobalPostProcessor.getGlobalBundleDependencies
private List<String> getGlobalBundleDependencies(GlobalPostProcessingContext ctx, List<String> excludedBundles) { List<JoinableResourceBundle> globalBundles = getRsBundlesHandler(ctx).getGlobalBundles(); List<String> globalBundleDependencies = new ArrayList<>(); for (JoinableResourceBundle globalBundle : globalBu...
java
private List<String> getGlobalBundleDependencies(GlobalPostProcessingContext ctx, List<String> excludedBundles) { List<JoinableResourceBundle> globalBundles = getRsBundlesHandler(ctx).getGlobalBundles(); List<String> globalBundleDependencies = new ArrayList<>(); for (JoinableResourceBundle globalBundle : globalBu...
[ "private", "List", "<", "String", ">", "getGlobalBundleDependencies", "(", "GlobalPostProcessingContext", "ctx", ",", "List", "<", "String", ">", "excludedBundles", ")", "{", "List", "<", "JoinableResourceBundle", ">", "globalBundles", "=", "getRsBundlesHandler", "(",...
Returns the global bundle dependencies @param ctx the context @param excludedBundles the excluded bundles @return the global bundle dependencies
[ "Returns", "the", "global", "bundle", "dependencies" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/global/postprocessor/google/closure/ClosureGlobalPostProcessor.java#L306-L315
7,292
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/global/postprocessor/google/closure/ClosureGlobalPostProcessor.java
ClosureGlobalPostProcessor.initCompilerClosureArgumentsFromConfig
private void initCompilerClosureArgumentsFromConfig(List<String> args, JawrConfig config) { Set<Entry<Object, Object>> entrySet = config.getConfigProperties().entrySet(); for (Entry<Object, Object> propEntry : entrySet) { String key = (String) propEntry.getKey(); if (key.startsWith(JAWR_JS_CLOSURE_PREFIX) && ...
java
private void initCompilerClosureArgumentsFromConfig(List<String> args, JawrConfig config) { Set<Entry<Object, Object>> entrySet = config.getConfigProperties().entrySet(); for (Entry<Object, Object> propEntry : entrySet) { String key = (String) propEntry.getKey(); if (key.startsWith(JAWR_JS_CLOSURE_PREFIX) && ...
[ "private", "void", "initCompilerClosureArgumentsFromConfig", "(", "List", "<", "String", ">", "args", ",", "JawrConfig", "config", ")", "{", "Set", "<", "Entry", "<", "Object", ",", "Object", ">", ">", "entrySet", "=", "config", ".", "getConfigProperties", "("...
Initialize the closure argument from the Jawr config @param args the arguments @param config the Jawr config
[ "Initialize", "the", "closure", "argument", "from", "the", "Jawr", "config" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/global/postprocessor/google/closure/ClosureGlobalPostProcessor.java#L325-L351
7,293
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/global/postprocessor/google/closure/ClosureGlobalPostProcessor.java
ClosureGlobalPostProcessor.getCompilerArgValue
private String getCompilerArgValue(String compilerArgName, String compilerArgValue) { if (compilerArgName.equals(COMPILATION_LEVEL)) { if (!ADVANCED_OPTIMIZATIONS_COMPILATION_LEVEL.equalsIgnoreCase(compilerArgValue) && !WHITESPACE_ONLY_COMPILATION_LEVEL.equalsIgnoreCase(compilerArgValue) && !SIMPLE_OPTIM...
java
private String getCompilerArgValue(String compilerArgName, String compilerArgValue) { if (compilerArgName.equals(COMPILATION_LEVEL)) { if (!ADVANCED_OPTIMIZATIONS_COMPILATION_LEVEL.equalsIgnoreCase(compilerArgValue) && !WHITESPACE_ONLY_COMPILATION_LEVEL.equalsIgnoreCase(compilerArgValue) && !SIMPLE_OPTIM...
[ "private", "String", "getCompilerArgValue", "(", "String", "compilerArgName", ",", "String", "compilerArgValue", ")", "{", "if", "(", "compilerArgName", ".", "equals", "(", "COMPILATION_LEVEL", ")", ")", "{", "if", "(", "!", "ADVANCED_OPTIMIZATIONS_COMPILATION_LEVEL",...
Returns the compiler argument value @param compilerArgName the compiler argument name @param compilerArgValue the compiler argument name @return the compiler argument value
[ "Returns", "the", "compiler", "argument", "value" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/global/postprocessor/google/closure/ClosureGlobalPostProcessor.java#L436-L454
7,294
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/global/postprocessor/google/closure/ClosureGlobalPostProcessor.java
ClosureGlobalPostProcessor.generateBundleModuleArgs
private void generateBundleModuleArgs(List<String> args, Map<String, JoinableResourceBundle> bundleMap, Map<String, String> resultBundleMapping, JoinableResourceBundle bundle, List<String> dependencies) { Set<String> bundleDependencies = getClosureModuleDependencies(bundle, dependencies); // Generate a module ...
java
private void generateBundleModuleArgs(List<String> args, Map<String, JoinableResourceBundle> bundleMap, Map<String, String> resultBundleMapping, JoinableResourceBundle bundle, List<String> dependencies) { Set<String> bundleDependencies = getClosureModuleDependencies(bundle, dependencies); // Generate a module ...
[ "private", "void", "generateBundleModuleArgs", "(", "List", "<", "String", ">", "args", ",", "Map", "<", "String", ",", "JoinableResourceBundle", ">", "bundleMap", ",", "Map", "<", "String", ",", "String", ">", "resultBundleMapping", ",", "JoinableResourceBundle",...
Generates the bundle module arguments for the closure compiler @param args the current list of arguments @param bundleMap the bundle map @param resultBundleMapping the result bundle mapping @param bundle the current bundle @param dependencies the dependencies
[ "Generates", "the", "bundle", "module", "arguments", "for", "the", "closure", "compiler" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/global/postprocessor/google/closure/ClosureGlobalPostProcessor.java#L470-L512
7,295
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/global/postprocessor/google/closure/ClosureGlobalPostProcessor.java
ClosureGlobalPostProcessor.addModuleArg
protected void addModuleArg(String jsFile, String moduleName, List<String> args, StringBuilder moduleArg) { int argIdx = 0; for (Iterator<String> iterArg = args.iterator(); iterArg.hasNext(); argIdx++) { String arg = iterArg.next(); if (arg.equals(JS_ARG)) { iterArg.next(); arg = iterArg.next(); a...
java
protected void addModuleArg(String jsFile, String moduleName, List<String> args, StringBuilder moduleArg) { int argIdx = 0; for (Iterator<String> iterArg = args.iterator(); iterArg.hasNext(); argIdx++) { String arg = iterArg.next(); if (arg.equals(JS_ARG)) { iterArg.next(); arg = iterArg.next(); a...
[ "protected", "void", "addModuleArg", "(", "String", "jsFile", ",", "String", "moduleName", ",", "List", "<", "String", ">", "args", ",", "StringBuilder", "moduleArg", ")", "{", "int", "argIdx", "=", "0", ";", "for", "(", "Iterator", "<", "String", ">", "...
Adds the module argument taking in account the module dependencies @param jsFile the bundle js file @param moduleName the module name @param args the list of arguments to update @param moduleArg the module argument to add
[ "Adds", "the", "module", "argument", "taking", "in", "account", "the", "module", "dependencies" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/global/postprocessor/google/closure/ClosureGlobalPostProcessor.java#L526-L558
7,296
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/global/postprocessor/google/closure/ClosureGlobalPostProcessor.java
ClosureGlobalPostProcessor.getClosureModuleDependencies
private Set<String> getClosureModuleDependencies(JoinableResourceBundle bundle, List<String> dependencies) { Set<String> bundleDependencies = new HashSet<>(); if (bundle.getDependencies() != null) { for (JoinableResourceBundle depBundle : bundle.getDependencies()) { bundleDependencies.add(depBundle.getName(...
java
private Set<String> getClosureModuleDependencies(JoinableResourceBundle bundle, List<String> dependencies) { Set<String> bundleDependencies = new HashSet<>(); if (bundle.getDependencies() != null) { for (JoinableResourceBundle depBundle : bundle.getDependencies()) { bundleDependencies.add(depBundle.getName(...
[ "private", "Set", "<", "String", ">", "getClosureModuleDependencies", "(", "JoinableResourceBundle", "bundle", ",", "List", "<", "String", ">", "dependencies", ")", "{", "Set", "<", "String", ">", "bundleDependencies", "=", "new", "HashSet", "<>", "(", ")", ";...
Returns the module bundle dependency from the bundle dependency and the declared dependencies @param bundle the bundle @param dependencies the declared dependencies @return the list of the module dependency
[ "Returns", "the", "module", "bundle", "dependency", "from", "the", "bundle", "dependency", "and", "the", "declared", "dependencies" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/global/postprocessor/google/closure/ClosureGlobalPostProcessor.java#L570-L587
7,297
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/global/postprocessor/google/closure/ClosureGlobalPostProcessor.java
ClosureGlobalPostProcessor.checkBundleName
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 + "' define...
java
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 + "' define...
[ "private", "void", "checkBundleName", "(", "String", "bundleName", ",", "Map", "<", "String", ",", "JoinableResourceBundle", ">", "bundleMap", ")", "{", "if", "(", "!", "JAWR_ROOT_MODULE_NAME", ".", "equals", "(", "bundleName", ")", ")", "{", "boolean", "modul...
Checks the bundle name @param bundleName the bundle name @param bundleMap the bundle map
[ "Checks", "the", "bundle", "name" ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/global/postprocessor/google/closure/ClosureGlobalPostProcessor.java#L597-L605
7,298
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/IOUtils.java
IOUtils.copy
public static void copy(InputStream input, Writer writer) throws IOException { copy(new InputStreamReader(input), writer); }
java
public static void copy(InputStream input, Writer writer) throws IOException { copy(new InputStreamReader(input), writer); }
[ "public", "static", "void", "copy", "(", "InputStream", "input", ",", "Writer", "writer", ")", "throws", "IOException", "{", "copy", "(", "new", "InputStreamReader", "(", "input", ")", ",", "writer", ")", ";", "}" ]
Writes all the contents of an InputStream to a Writer. @param input the input stream to read from @param writer the writer to write to @throws java.io.IOException if an IOExcption occurs
[ "Writes", "all", "the", "contents", "of", "an", "InputStream", "to", "a", "Writer", "." ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/IOUtils.java#L104-L106
7,299
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/IOUtils.java
IOUtils.copy
public static void copy(InputStream input, OutputStream output, boolean closeStreams) throws IOException { try { copy(input, output); } finally { if (closeStreams) { close(input); close(output); } } }
java
public static void copy(InputStream input, OutputStream output, boolean closeStreams) throws IOException { try { copy(input, output); } finally { if (closeStreams) { close(input); close(output); } } }
[ "public", "static", "void", "copy", "(", "InputStream", "input", ",", "OutputStream", "output", ",", "boolean", "closeStreams", ")", "throws", "IOException", "{", "try", "{", "copy", "(", "input", ",", "output", ")", ";", "}", "finally", "{", "if", "(", ...
Writes all the contents of an InputStream to an OutputStream. @param input the input stream to read from @param output the output stream to write to @param closeStreams the flag indicating if the stream must be close at the end, even if an exception occurs @throws java.io.IOException if an IOExcption occurs
[ "Writes", "all", "the", "contents", "of", "an", "InputStream", "to", "an", "OutputStream", "." ]
5381f6acf461cd2502593c67a77bd6ef9eab848d
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/IOUtils.java#L121-L130