Package org.ametys.odf.source
Class DefaultODFView
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.odf.source.DefaultODFView
-
- All Implemented Interfaces:
ODFViewSelector,LogEnabled,Serviceable
- Direct Known Subclasses:
ODFWebView
public class DefaultODFView extends AbstractLogEnabled implements ODFViewSelector, Serviceable
Default implementation ofODFViewSelector. First looks the wanted file in context://WEB-INF/stylesheets/path_to_file If it's not present, it will look in the ODF plugin.
-
-
Field Summary
Fields Modifier and Type Field Description protected SourceResolver_resolverThe source resolver-
Fields inherited from interface org.ametys.odf.source.ODFViewSelector
ROLE
-
-
Constructor Summary
Constructors Constructor Description DefaultODFView()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<String>_getDefaultSourceURIs(String pluginName, String filePath)Get the default URIsprotected List<String>getLocations(String pluginName, String filePath)Returns the ordered list of URI to be tested to find the corresponding view.SourcegetSource(String pluginName, String filePath)Get the file source for rendering a contentvoidservice(ServiceManager manager)-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_resolver
protected SourceResolver _resolver
The source resolver
-
-
Constructor Detail
-
DefaultODFView
public DefaultODFView()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
getSource
public Source getSource(String pluginName, String filePath) throws IOException
Description copied from interface:ODFViewSelectorGet the file source for rendering a content- Specified by:
getSourcein interfaceODFViewSelector- Parameters:
pluginName- the plugin namefilePath- the path of the file to retrieve- Returns:
- the file source
- Throws:
IOException- if the Source cannot be resolved
-
getLocations
protected List<String> getLocations(String pluginName, String filePath)
Returns the ordered list of URI to be tested to find the corresponding view.- Parameters:
pluginName- the plugin namefilePath- the requested location.- Returns:
- a list of possible URIs for the resource.
-
_getDefaultSourceURIs
protected List<String> _getDefaultSourceURIs(String pluginName, String filePath)
Get the default URIs- Parameters:
pluginName- The current plugin namefilePath- the requested location.- Returns:
- a list of URIs
-
-