Package org.ametys.plugins.ugc.actions
Class ProposeContentAction
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.acting.AbstractAction
org.apache.cocoon.acting.ServiceableAction
org.ametys.plugins.ugc.actions.ProposeContentAction
- All Implemented Interfaces:
Component,LogEnabled,Serviceable,Action
Create content action
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ContentTypesHelperThe content type helperprotected ContentTypeExtensionPointThe content type extension pointprotected CurrentUserProviderThe current user providerprotected FOContentCreationHelperHelper for FO content creationprotected I18nUtilsThe I18n utilsprotected JSONUtilsThe JSON Utilsprotected PageHelperThe page helperprotected AmetysObjectResolverAmetys object resolver.protected UserManagerThe user managerFields 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 TypeMethodDescriptionprotected String_getContentUri(WorkflowAwareContent content, Site site) Get the content uriprotected I18nizableText_getI18nBody(WorkflowAwareContent content, String creatorFullName, Site site) Get the i18n bodyprotected I18nizableText_getI18nSubject(Site site) Get the i18n subjectprotected StringGet the request URI.protected Site_getSite(WorkflowAwareContent content) Get the site nameprotected void_sendMail(UserIdentity[] adminUsers, WorkflowAwareContent content) Send mail to inform that a content is createdact(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) voidservice(ServiceManager serviceManager) Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
_resolver
Ametys object resolver. -
_cTypeEP
The content type extension point -
_contentTypeHelper
The content type helper -
_jsonUtils
The JSON Utils -
_currentUserProvider
The current user provider -
_i18nUtils
The I18n utils -
_userManager
The user manager -
_foContentCreationHelper
Helper for FO content creation -
_pageHelper
The page helper
-
-
Constructor Details
-
ProposeContentAction
public ProposeContentAction()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classServiceableAction- Throws:
ServiceException
-
act
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception - Throws:
Exception
-
_sendMail
Send mail to inform that a content is created- Parameters:
adminUsers- the admin userscontent- the created content
-
_getI18nBody
protected I18nizableText _getI18nBody(WorkflowAwareContent content, String creatorFullName, Site site) Get the i18n body- Parameters:
content- the contentcreatorFullName- the creator full namesite- the site- Returns:
- The i18n body
-
_getI18nSubject
Get the i18n subject- Parameters:
site- the site- Returns:
- The i18n subject
-
_getSite
Get the site name- Parameters:
content- The content- Returns:
- the site name
-
_getContentUri
Get the content uri- Parameters:
content- the contentsite- The site- Returns:
- the content uri
-
_getRequestUri
Get the request URI.- Returns:
- the full request URI.
-