public final class CSSFileHelper extends Object
Modifier and Type | Field and Description |
---|---|
private static Pattern |
CSS_URL_PATTERN_IMPORT |
private static Pattern |
CSS_URL_PATTERN_IMPORT_URL |
private static Pattern |
CSS_URL_PATTERN_NOTIMPORT_URL |
private static Pattern |
CSS_URL_PATTERN_SRC |
Modifier | Constructor and Description |
---|---|
private |
CSSFileHelper() |
Modifier and Type | Method and Description |
---|---|
private static String |
_replaceRelativeUri(String content,
String contextPath,
String fileUri,
Pattern pattern,
JSASSResourceURIExtensionPoint jsassResourceURIExtensionPoint) |
static String |
replaceRelativeResourcesUri(String content,
String fileUri,
JSASSResourceURIExtensionPoint jsassResourceURIExtensionPoint,
String externalContextPath)
Replace the relative URI inside a css file with the new context path
|
static String |
replaceRelativeUri(String content,
String fileUri,
JSASSResourceURIExtensionPoint jsassResourceURIExtensionPoint,
String internalContextPath,
String externalContextPath)
Replace the relative URI inside a css file with the new context path
|
private static final Pattern CSS_URL_PATTERN_SRC
private static final Pattern CSS_URL_PATTERN_NOTIMPORT_URL
private static final Pattern CSS_URL_PATTERN_IMPORT_URL
private static final Pattern CSS_URL_PATTERN_IMPORT
private CSSFileHelper()
public static String replaceRelativeUri(String content, String fileUri, JSASSResourceURIExtensionPoint jsassResourceURIExtensionPoint, String internalContextPath, String externalContextPath) throws URISyntaxException
content
- The file contentfileUri
- The file UrijsassResourceURIExtensionPoint
- The JSASS Resource URI extension pointinternalContextPath
- The internal context path of the applicationexternalContextPath
- The external context path of the applicationURISyntaxException
- If an exception occurredpublic static String replaceRelativeResourcesUri(String content, String fileUri, JSASSResourceURIExtensionPoint jsassResourceURIExtensionPoint, String externalContextPath) throws URISyntaxException
content
- The file contentfileUri
- The file Uri, without context path, for example "/plugins/pluginName/resources/style.css" or "/skins/skinName/resources/style.scss"jsassResourceURIExtensionPoint
- The JSASS Resource URI extension pointexternalContextPath
- The external context path of the applicationURISyntaxException
- If an exception occurredprivate static String _replaceRelativeUri(String content, String contextPath, String fileUri, Pattern pattern, JSASSResourceURIExtensionPoint jsassResourceURIExtensionPoint)