Class SassImportHelper
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.core.ui.resources.css.sass.SassImportHelper
-
- All Implemented Interfaces:
LogEnabled
,Component
,Serviceable
public class SassImportHelper extends AbstractLogEnabled implements Serviceable, Component
Helper component for sass contents
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SassImportHelper.SassImportInfo
Informations about sass import, such as real URI and real last modified
-
Field Summary
Fields Modifier and Type Field Description protected JSASSResourceURIExtensionPoint
_jsassResourceURIExtensionPoint
JsassResourceURIExtensionPointprotected SourceResolver
_resolver
The source resolverstatic String
ROLE
The avalon ROLE
-
Constructor Summary
Constructors Constructor Description SassImportHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SassImportHelper.SassImportInfo
findExistingImportSource(List<String> uriMatching)
Find the first existing import source from a list of URIs to tryMap<String,SassImportHelper.SassImportInfo>
getDependenciesList(Source inputSource)
Get the list of direct dependencies of a sass sourceSassImportHelper.SassImportInfo
getImportSource(String currentUri)
Get the Sass source from the current Urivoid
service(ServiceManager manager)
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_resolver
protected SourceResolver _resolver
The source resolver
-
_jsassResourceURIExtensionPoint
protected JSASSResourceURIExtensionPoint _jsassResourceURIExtensionPoint
JsassResourceURIExtensionPoint
-
-
Constructor Detail
-
SassImportHelper
public SassImportHelper()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getDependenciesList
public Map<String,SassImportHelper.SassImportInfo> getDependenciesList(Source inputSource)
Get the list of direct dependencies of a sass source- Parameters:
inputSource
- The sass source- Returns:
- The list of dependencies, mapped by URI
-
getImportSource
public SassImportHelper.SassImportInfo getImportSource(String currentUri)
Get the Sass source from the current Uri- Parameters:
currentUri
- The URI- Returns:
- The real URI, the Sass source and its last modified
-
findExistingImportSource
public SassImportHelper.SassImportInfo findExistingImportSource(List<String> uriMatching)
Find the first existing import source from a list of URIs to try- Parameters:
uriMatching
- The list of URIs to try- Returns:
- the first matching source, or null if no source matches
-
-