Package org.ametys.cms.content
Class GetWrapperContextAction
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.apache.cocoon.acting.AbstractAction
-
- org.ametys.cms.content.GetWrapperContextAction
-
- All Implemented Interfaces:
Component
,LogEnabled
,Serviceable
,Action
- Direct Known Subclasses:
GetWrapperContextAction
public class GetWrapperContextAction extends AbstractAction implements Serviceable
This action export the wrapping XSLT URI.
Content negociation will be performed with the given URI: if content.xsl is asked, content-[contentType].xsl will be looked up first. This action needs the parameterpath
pointing the default path to the XSL.
-
-
Field Summary
Fields Modifier and Type Field Description protected ContentTypesHelper
_contentTypesHelper
The content types helperprotected SourceResolver
_srcResolver
The source resolver-
Fields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP
-
-
Constructor Summary
Constructors Constructor Description GetWrapperContextAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>
act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters)
protected List<String>
getSourceURIs(Request request, String requestedURI)
Get the source URI for wrapped contentprotected String
getWrapperURI(Request request, String uri)
Compute the wrapping URI for the current Content.void
service(ServiceManager manager)
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
_srcResolver
protected SourceResolver _srcResolver
The source resolver
-
_contentTypesHelper
protected ContentTypesHelper _contentTypesHelper
The content types helper
-
-
Constructor Detail
-
GetWrapperContextAction
public GetWrapperContextAction()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
act
public Map<String,String> act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception
-
getWrapperURI
protected String getWrapperURI(Request request, String uri) throws IOException
Compute the wrapping URI for the current Content.- Parameters:
request
- the current Request.uri
- the default uri.- Returns:
- the wrapper XSLT URI.
- Throws:
IOException
- if an error occurs whuile resolving Sources.
-
getSourceURIs
protected List<String> getSourceURIs(Request request, String requestedURI)
Get the source URI for wrapped content- Parameters:
request
- The requestrequestedURI
- The requested URI- Returns:
- the wrapped URI
-
-