Package org.ametys.cms.source
Class ContentViewSourceFactory
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.cms.source.ContentViewSourceFactory
-
- All Implemented Interfaces:
Component
,Contextualizable
,LogEnabled
,Serviceable
,SourceFactory
public class ContentViewSourceFactory extends AbstractLogEnabled implements SourceFactory, Contextualizable, Serviceable
This factory looks for files in the current skin and fallback in the current plugin dir. Use: content-view:[view]://path_to_file Will first look in the skin of the current site in the sub-directory stylesheet/{contenttype} => skins/{skin}/stylesheets/{contenttype}/path_to_file And if the file does not exist will search in plugin:{currentPluginName}://path_to_file
-
-
Field Summary
Fields Modifier and Type Field Description private static Pattern
__SOURCE_PATTERN
private ContentView
_contentView
private Context
_context
private ServiceManager
_manager
-
Fields inherited from interface org.apache.excalibur.source.SourceFactory
ROLE
-
-
Constructor Summary
Constructors Constructor Description ContentViewSourceFactory()
-
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
-
_contentView
private ContentView _contentView
-
_manager
private ServiceManager _manager
-
-
Constructor Detail
-
ContentViewSourceFactory
public ContentViewSourceFactory()
-
-
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
-
-