Class CssDependenciesList
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.core.ui.resources.css.CssDependenciesList
-
- All Implemented Interfaces:
ResourceDependenciesList
,LogEnabled
,Serviceable
- Direct Known Subclasses:
WebCssDependenciesList
public class CssDependenciesList extends AbstractLogEnabled implements ResourceDependenciesList, Serviceable
Dependencies list for css files
-
-
Field Summary
Fields Modifier and Type Field Description private static Pattern
__EXTERNAL_URL
private Map<String,Pair<List<String>,Long>>
_dependenciesCache
private ProxiedContextPathProvider
_proxiedContextPathProvider
protected RequestAttributesHelper
_requestAttributesHelper
RequestAttributesHelperprivate SourceResolver
_sourceResolver
-
Constructor Summary
Constructors Constructor Description CssDependenciesList()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private List<HashCache.UriData>
_getCssFileDependencies(String uri, Source cssSource)
private Set<HashCache.UriData>
_getFileDependencies(String cssUri, String media, boolean firstLevel)
private Source
_getFileSource(String cssUri, Map<String,Object> resolveParameters)
Set<HashCache.UriData>
getDependenciesList(String uri, Map<String,String> data)
Get the list of dependenciesint
getPriority()
Get the priority of this FileDependenciesList if multiple are supportedboolean
isSupported(String uri)
Is the uri supported to get the list of dependenciesvoid
service(ServiceManager manager)
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
__EXTERNAL_URL
private static final Pattern __EXTERNAL_URL
-
_requestAttributesHelper
protected RequestAttributesHelper _requestAttributesHelper
RequestAttributesHelper
-
_sourceResolver
private SourceResolver _sourceResolver
-
_proxiedContextPathProvider
private ProxiedContextPathProvider _proxiedContextPathProvider
-
-
Constructor Detail
-
CssDependenciesList
public CssDependenciesList()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
isSupported
public boolean isSupported(String uri)
Description copied from interface:ResourceDependenciesList
Is the uri supported to get the list of dependencies- Specified by:
isSupported
in interfaceResourceDependenciesList
- Parameters:
uri
- The uri- Returns:
- True if the uri is supported
-
getPriority
public int getPriority()
Description copied from interface:ResourceDependenciesList
Get the priority of this FileDependenciesList if multiple are supported- Specified by:
getPriority
in interfaceResourceDependenciesList
- Returns:
- The priority. The highest value will be used
-
getDependenciesList
public Set<HashCache.UriData> getDependenciesList(String uri, Map<String,String> data)
Description copied from interface:ResourceDependenciesList
Get the list of dependencies- Specified by:
getDependenciesList
in interfaceResourceDependenciesList
- Parameters:
uri
- The input sourcedata
- Additional data, specific per ResourceDependenciesList implementations- Returns:
- The list of dependencies URIs
-
_getFileDependencies
private Set<HashCache.UriData> _getFileDependencies(String cssUri, String media, boolean firstLevel) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
_getCssFileDependencies
private List<HashCache.UriData> _getCssFileDependencies(String uri, Source cssSource) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
-