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
Nested ClassesModifier and TypeClassDescriptionclassA wrapping source to know real locationstatic enumThe enum of existing types of servicesources -
Field Summary
Fields inherited from interface org.apache.excalibur.source.SourceFactory
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcontextualize(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.voidvoidservice(ServiceManager manager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Constructor Details
-
ServiceSourceFactory
public ServiceSourceFactory()
-
-
Method Details
-
contextualize
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
getSource
- Specified by:
getSourcein interfaceSourceFactory- Throws:
IOExceptionMalformedURLException
-
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:
releasein interfaceSourceFactory
-