Class AddSharedContentAction
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.acting.AbstractAction
org.apache.cocoon.acting.ServiceableAction
org.ametys.core.util.cocoon.AbstractCurrentUserProviderServiceableAction
org.ametys.core.observation.AbstractNotifierAction
org.ametys.web.repository.page.actions.AddSharedContentAction
- All Implemented Interfaces:
Component
,LogEnabled
,Serviceable
,ThreadSafe
,Action
This action add an existing content to a zone of a page
-
Field Summary
Modifier and TypeFieldDescriptionprotected ContentTypesAssignmentHandler
The content types assignment handler.protected AmetysObjectResolver
Ametys object resolverprotected SharedContentManager
The shared content manager.Fields inherited from class org.ametys.core.observation.AbstractNotifierAction
_observationManager
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) protected Content
addContentReference
(ModifiableZone zone, Content content, String viewName) Add the given content as a zone item in the given zone.protected Content
createSharedContent
(ModifiableZone zone, DefaultContent originalContent, String viewName) Create a shared content referencing the given content and add the shared one to the zone.void
service
(ServiceManager serviceManager) Methods inherited from class org.ametys.core.util.cocoon.AbstractCurrentUserProviderServiceableAction
_getCurrentUser
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
_cTypesAssignmentHandler
The content types assignment handler. -
_resolver
Ametys object resolver
-
Constructor Details
-
AddSharedContentAction
public AddSharedContentAction()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractNotifierAction
- Throws:
ServiceException
-
act
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception - Throws:
Exception
-
addContentReference
Add the given content as a zone item in the given zone.- Parameters:
zone
- the zone to add the content in.content
- the content to add.viewName
- the view name.- Returns:
- the same content.
-