public class DefaultContentView extends AbstractLogEnabled implements ContentView, Serviceable, Contextualizable
ContentView
Will first look in directory context://WEB-INF/stylesheets/content/article/article-[view].xsl
And if the file does not exist will search in plugin:[currentPluginName]://stylesheets/content/article/article-[view].xsl| Modifier and Type | Field and Description |
|---|---|
protected ContentTypeExtensionPoint |
_contentTypeEP
The content types extension point
|
protected ContentTypesHelper |
_contentTypesHelper
Helper for content types
|
protected Context |
_context
Context to get full content type ID from request
|
protected DynamicContentTypeDescriptorExtentionPoint |
_dynamicContentTypeDescriptorEP
The dynamic content type descriptior extension point
|
protected SourceResolver |
_resolver
The source resolver
|
ROLE| Constructor and Description |
|---|
DefaultContentView() |
| Modifier and Type | Method and Description |
|---|---|
protected List<String> |
_getDefaultSourceURIs(String pluginName,
String formatSuffix)
Get the URIs of default stylesheets
|
protected List<String> |
_getDefaultSourceURIsForContentType(ContentTypeDescriptor contentType,
String pluginName,
String formatSuffix)
Get the URIs of default stylesheets
|
protected List<String> |
_getSourceURIs(String contentTypeAlias,
String contentTypeId,
String view,
String format,
String pluginName)
Returns the ordered list of URI to be tested to find a stylesheet to render the Content.
|
protected List<String> |
_getSourceURIsForContentType(String contentTypeAlias,
String contentTypeId,
String view,
String formatSuffix)
get source for a non dynamic content type
|
protected List<String> |
_getSourceURIsForDynamicContentType(String contentTypeAlias,
String view,
String formatSuffix,
String pluginName)
get source for a dynamic content type
|
protected List<String> |
_getSourceURIsForSuperTypes(String contentTypeAlias,
String contentTypeId,
String view,
String formatSuffix)
Get source for a given content type
|
void |
contextualize(Context context) |
Source |
getSource(String location,
String contentType,
String view,
String format,
String pluginName)
Get the file source for rendering a content
|
void |
service(ServiceManager manager) |
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerprotected SourceResolver _resolver
protected ContentTypesHelper _contentTypesHelper
protected ContentTypeExtensionPoint _contentTypeEP
protected DynamicContentTypeDescriptorExtentionPoint _dynamicContentTypeDescriptorEP
public DefaultContentView()
public void contextualize(Context context) throws ContextException
contextualize in interface ContextualizableContextExceptionpublic void service(ServiceManager manager) throws ServiceException
service in interface ServiceableServiceExceptionpublic Source getSource(String location, String contentType, String view, String format, String pluginName) throws IOException
ContentViewgetSource in interface ContentViewlocation - the requested locationcontentType - the type of the current Contentview - the content viewformat - the format of the output (html, pdf, ...)pluginName - the current plugin nameIOException - if the Source cannot be resolvedprotected List<String> _getSourceURIs(String contentTypeAlias, String contentTypeId, String view, String format, String pluginName)
contentTypeAlias - the content type alias for renderingcontentTypeId - the content type full IDview - the content viewformat - the format of the output (html, pdf, ...)pluginName - the current plugin nameprotected List<String> _getDefaultSourceURIsForContentType(ContentTypeDescriptor contentType, String pluginName, String formatSuffix)
contentType - The content typepluginName - The current plugin nameformatSuffix - the format of the output (html, pdf, ...)protected List<String> _getDefaultSourceURIs(String pluginName, String formatSuffix)
pluginName - The current plugin nameformatSuffix - the format of the output (html, pdf, ...)protected List<String> _getSourceURIsForSuperTypes(String contentTypeAlias, String contentTypeId, String view, String formatSuffix)
contentTypeAlias - the content type alias for renderingcontentTypeId - the content type full IDview - the content viewformatSuffix - the format of the output (html, pdf, ...)protected List<String> _getSourceURIsForDynamicContentType(String contentTypeAlias, String view, String formatSuffix, String pluginName)
contentTypeAlias - the content type alias for renderingview - the content viewformatSuffix - the format of the output (html, pdf, ...)pluginName - the plugin nameprotected List<String> _getSourceURIsForContentType(String contentTypeAlias, String contentTypeId, String view, String formatSuffix)
contentTypeAlias - the content type alias for renderingcontentTypeId - the content type full IDview - the content viewformatSuffix - the format of the output (html, pdf, ...)