Package org.ametys.cms.source
Class DefaultViewSelector
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.cms.source.DefaultViewSelector
- All Implemented Interfaces:
ViewSelector
,LogEnabled
,Serviceable
- Direct Known Subclasses:
WebViewSelector
Default implementation of
ViewSelector
.
First looks the wanted file in context://WEB-INF/param/view/path_to_file
If it's not present, it will look in the cms plugin.-
Field Summary
Fields inherited from interface org.ametys.cms.source.ViewSelector
ROLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription_getDefaultSourceURIs
(String pluginName, String filePath) Get the default URIsgetLocations
(String pluginName, String filePath) Returns the ordered list of URI to be tested to find the corresponding view.Get the file source for the requested location.void
service
(ServiceManager manager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
_resolver
The source resolver
-
-
Constructor Details
-
DefaultViewSelector
public DefaultViewSelector()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getSource
Description copied from interface:ViewSelector
Get the file source for the requested location.- Specified by:
getSource
in interfaceViewSelector
- Parameters:
pluginName
- The current plugin name. Can be null.fileLocation
- the requested location.- Returns:
- the file source.
- Throws:
IOException
- if the Source cannot be resolved.
-
getLocations
Returns the ordered list of URI to be tested to find the corresponding view.- Parameters:
pluginName
- The current plugin namefilePath
- the requested location.- Returns:
- a list of possible URIs for the resource.
-
_getDefaultSourceURIs
Get the default URIs- Parameters:
pluginName
- The current plugin namefilePath
- the requested location.- Returns:
- a list of URIs
-