Package org.ametys.web.content
Class GetPageAttachmentAction
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.acting.AbstractAction
org.apache.cocoon.acting.ServiceableAction
org.ametys.web.content.GetPageAttachmentAction
- All Implemented Interfaces:
Component
,LogEnabled
,Serviceable
,Action
Get the page attachment uri from the id of a resource.
Tests if the current asked resource exists and it is an resource of a page.
- If the resource does not exist, an
ResourceNotFoundException
is thrown. - If the resource is not an resource of a page, an
AccessDeniedException
is thrown. - If the resource exists and is a page's attachment, redirect to the page attachment uri.
-
Field Summary
Fields inherited from class org.apache.cocoon.acting.ServiceableAction
manager
Fields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionact
(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) void
service
(ServiceManager smanager) Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Constructor Details
-
GetPageAttachmentAction
public GetPageAttachmentAction()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classServiceableAction
- Throws:
ServiceException
-
act
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception - Throws:
Exception
-