Package org.ametys.web.source
Class ServiceSourceFactory
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.web.source.ServiceSourceFactory
- All Implemented Interfaces:
LogEnabled
,Component
,Contextualizable
,Serviceable
,SourceFactory
public class ServiceSourceFactory
extends AbstractLogEnabled
implements SourceFactory, Serviceable, Contextualizable
This factory looks for files in the current skin and fallback in the current plugin dir.<br>
Use: service://path_to_file<br>
Will first loon in the current template in the <i>stylesheets/services/{pluginName}</i> sub-directory => skins/{skin}/templates/{template}/stylesheets/services/{pluginName}/path_to_file<br>
If not found, then it will look in the skin of the current site in the sub-directory services/{pluginName} => skins/{skin}/services/{currentPluginName}/path_to_file<br>
And if the file does not exist will search in plugin:{currentPluginName}://path_to_file
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
A wrapping source to know real locationstatic enum
The enum of existing types of servicesources -
Field Summary
Fields inherited from interface org.apache.excalibur.source.SourceFactory
ROLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
contextualize
(Context context) protected Map<ServiceSourceFactory.SourceType,
String> getLocations
(String pluginName, String uri) Returns the ordered list of URIs to be tested to find the service stylesheet.void
void
service
(ServiceManager manager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Constructor Details
-
ServiceSourceFactory
public ServiceSourceFactory()
-
-
Method Details
-
contextualize
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getSource
- Specified by:
getSource
in interfaceSourceFactory
- Throws:
IOException
MalformedURLException
-
getLocations
Returns the ordered list of URIs to be tested to find the service stylesheet.- Parameters:
pluginName
- the service plugin name.uri
- the service stylesheet.- Returns:
- a list of possible URIs (id is the source type associated).
-
release
- Specified by:
release
in interfaceSourceFactory
-