public class DefaultViewSelector extends AbstractLogEnabled implements ViewSelector, Serviceable
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.Modifier and Type | Field and Description |
---|---|
protected SourceResolver |
_resolver
The source resolver
|
ROLE
Constructor and Description |
---|
DefaultViewSelector() |
Modifier and Type | Method and Description |
---|---|
protected List<String> |
_getDefaultSourceURIs(String pluginName,
String filePath)
Get the default URIs
|
protected List<String> |
getLocations(String pluginName,
String filePath)
Returns the ordered list of URI to be tested to find the corresponding view.
|
Source |
getSource(String pluginName,
String fileLocation)
Get the file source for the requested location.
|
void |
service(ServiceManager manager) |
getLogger, setLogger
protected SourceResolver _resolver
public DefaultViewSelector()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public Source getSource(String pluginName, String fileLocation) throws IOException
ViewSelector
getSource
in interface ViewSelector
pluginName
- The current plugin name. Can be null.fileLocation
- the requested location.IOException
- if the Source cannot be resolved.protected List<String> getLocations(String pluginName, String filePath)
pluginName
- The current plugin namefilePath
- the requested location.protected List<String> _getDefaultSourceURIs(String pluginName, String filePath)
pluginName
- The current plugin namefilePath
- the requested location.