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
Modifier and TypeFieldDescriptionprotected ContentTypesHelper
The content type helperprotected ContentTypeExtensionPoint
The content type extension pointprotected CurrentUserProvider
The current user providerprotected FOContentCreationHelper
Helper for FO content creationprotected I18nUtils
The I18n utilsprotected JSONUtils
The JSON Utilsprotected PageHelper
The page helperprotected AmetysObjectResolver
Ametys object resolver.protected UserManager
The user managerFields 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 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 String
Get the request URI.protected Site
_getSite
(WorkflowAwareContent content) Get the site nameprotected void
_sendMail
(UserIdentity adminUser, WorkflowAwareContent content) Send mail to inform that a content is createdact
(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) void
service
(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:
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
-
_sendMail
Send mail to inform that a content is created- Parameters:
adminUser
- the admin usercontent
- 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.
-