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
FieldsModifier and TypeFieldDescriptionprotected ContentTypesAssignmentHandlerThe content types assignment handler.protected AmetysObjectResolverAmetys object resolverprotected SharedContentManagerThe shared content manager.Fields inherited from class org.ametys.core.observation.AbstractNotifierAction
_observationManagerFields inherited from class org.apache.cocoon.acting.ServiceableAction
managerFields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionact(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) protected ContentaddContentReference(ModifiableZone zone, Content content, String viewName) Add the given content as a zone item in the given zone.protected ContentcreateSharedContent(ModifiableZone zone, DefaultContent originalContent, String viewName) Create a shared content referencing the given content and add the shared one to the zone.voidservice(ServiceManager serviceManager) Methods inherited from class org.ametys.core.util.cocoon.AbstractCurrentUserProviderServiceableAction
_getCurrentUserMethods 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:
servicein interfaceServiceable- Overrides:
servicein 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.
-