Package org.ametys.web.source
Class SkinSource
- java.lang.Object
-
- org.ametys.core.util.path.PathSource
-
- org.ametys.web.source.SkinSource
-
- All Implemented Interfaces:
ModifiableSource
,ModifiableTraversableSource
,MoveableSource
,Source
,TraversableSource
public class SkinSource extends PathSource
A skin source is a path source that supports for inheritance
-
-
Field Summary
Fields Modifier and Type Field Description protected List<Path>
_files
The files and inherited filesPathSource._path
is the first existing one-
Fields inherited from class org.ametys.core.util.path.PathSource
_path, _scheme, _uri
-
-
Constructor Summary
Constructors Constructor Description SkinSource(String scheme, String uri, List<Path> files)
Builds a SkinSource, given an URI scheme, URI and a Path.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static Path
_getFirstExistingFile(List<Path> files)
Source
getChild(String name)
Collection
getChildren()
Source
getParent()
SourceValidity
getValidity()
-
Methods inherited from class org.ametys.core.util.path.PathSource
canCancel, cancel, copyTo, delete, exists, getContentLength, getFile, getInputStream, getLastModified, getMimeType, getName, getOutputStream, getScheme, getURI, isCollection, makeCollection, moveTo, refresh
-
-
-
-
Field Detail
-
_files
protected List<Path> _files
The files and inherited filesPathSource._path
is the first existing one
-
-
Constructor Detail
-
SkinSource
public SkinSource(String scheme, String uri, List<Path> files)
Builds a SkinSource, given an URI scheme, URI and a Path.- Parameters:
scheme
- The schemeuri
- the URIfiles
- The files (inheritance) Cannot be null nor empty
-
-
Method Detail
-
_getFirstExistingFile
private static Path _getFirstExistingFile(List<Path> files)
-
getChild
public Source getChild(String name) throws SourceException
- Specified by:
getChild
in interfaceTraversableSource
- Overrides:
getChild
in classPathSource
- Throws:
SourceException
-
getChildren
public Collection getChildren() throws SourceException
- Specified by:
getChildren
in interfaceTraversableSource
- Overrides:
getChildren
in classPathSource
- Throws:
SourceException
-
getParent
public Source getParent() throws SourceException
- Specified by:
getParent
in interfaceTraversableSource
- Overrides:
getParent
in classPathSource
- Throws:
SourceException
-
getValidity
public SourceValidity getValidity()
- Specified by:
getValidity
in interfaceSource
- Overrides:
getValidity
in classPathSource
-
-