Package org.ametys.cms.source
Class ViewSourceFactory
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.cms.source.ViewSourceFactory
-
- All Implemented Interfaces:
Component
,Contextualizable
,LogEnabled
,Serviceable
,SourceFactory
public class ViewSourceFactory extends AbstractLogEnabled implements SourceFactory, Serviceable, Contextualizable
This source factory defines an overridable way to retrieve resources (mainly XSL files). Use: view://path_to_file
-
-
Field Summary
Fields Modifier and Type Field Description private static Pattern
__SOURCE_PATTERN
protected Context
_context
The contextprotected ViewSelector
_viewSelector
The view selector.-
Fields inherited from interface org.apache.excalibur.source.SourceFactory
ROLE
-
-
Constructor Summary
Constructors Constructor Description ViewSourceFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
contextualize(Context context)
Source
getSource(String location, Map parameters)
void
release(Source source)
void
service(ServiceManager manager)
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
__SOURCE_PATTERN
private static final Pattern __SOURCE_PATTERN
-
_viewSelector
protected ViewSelector _viewSelector
The view selector.
-
-
Constructor Detail
-
ViewSourceFactory
public ViewSourceFactory()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
contextualize
public void contextualize(Context context) throws ContextException
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
getSource
public Source getSource(String location, Map parameters) throws IOException, MalformedURLException
- Specified by:
getSource
in interfaceSourceFactory
- Throws:
IOException
MalformedURLException
-
release
public void release(Source source)
- Specified by:
release
in interfaceSourceFactory
-
-