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
public class ProposeContentAction extends ServiceableAction
Create content action
-
-
Field Summary
Fields Modifier and Type Field Description protected ContentTypesHelper
_contentTypeHelper
The content type helperprotected ContentTypeExtensionPoint
_cTypeEP
The content type extension pointprotected CurrentUserProvider
_currentUserProvider
The current user providerprotected FOContentCreationHelper
_foContentCreationHelper
Helper for FO content creationprotected I18nUtils
_i18nUtils
The I18n utilsprotected JSONUtils
_jsonUtils
The JSON Utilsprotected PageHelper
_pageHelper
The page helperprotected AmetysObjectResolver
_resolver
Ametys object resolver.protected UserManager
_userManager
The user manager-
Fields inherited from class org.apache.cocoon.acting.ServiceableAction
manager
-
Fields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP
-
-
Constructor Summary
Constructors Constructor Description ProposeContentAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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
_getRequestUri()
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 createdMap
act(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 Detail
-
_resolver
protected AmetysObjectResolver _resolver
Ametys object resolver.
-
_cTypeEP
protected ContentTypeExtensionPoint _cTypeEP
The content type extension point
-
_contentTypeHelper
protected ContentTypesHelper _contentTypeHelper
The content type helper
-
_jsonUtils
protected JSONUtils _jsonUtils
The JSON Utils
-
_currentUserProvider
protected CurrentUserProvider _currentUserProvider
The current user provider
-
_i18nUtils
protected I18nUtils _i18nUtils
The I18n utils
-
_userManager
protected UserManager _userManager
The user manager
-
_foContentCreationHelper
protected FOContentCreationHelper _foContentCreationHelper
Helper for FO content creation
-
_pageHelper
protected PageHelper _pageHelper
The page helper
-
-
Constructor Detail
-
ProposeContentAction
public ProposeContentAction()
-
-
Method Detail
-
service
public void service(ServiceManager serviceManager) throws ServiceException
- 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
protected void _sendMail(UserIdentity adminUser, WorkflowAwareContent content)
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
protected I18nizableText _getI18nSubject(Site site)
Get the i18n subject- Parameters:
site
- the site- Returns:
- The i18n subject
-
_getSite
protected Site _getSite(WorkflowAwareContent content)
Get the site name- Parameters:
content
- The content- Returns:
- the site name
-
_getContentUri
protected String _getContentUri(WorkflowAwareContent content, Site site)
Get the content uri- Parameters:
content
- the contentsite
- The site- Returns:
- the content uri
-
_getRequestUri
protected String _getRequestUri()
Get the request URI.- Returns:
- the full request URI.
-
-