Package org.ametys.cms.contenttype
Class GetContentTypesListAction
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.apache.cocoon.acting.AbstractAction
-
- org.apache.cocoon.acting.ServiceableAction
-
- org.ametys.cms.contenttype.GetContentTypesListAction
-
- All Implemented Interfaces:
Component
,LogEnabled
,Serviceable
,Action
public class GetContentTypesListAction extends ServiceableAction
Get information on content types.
If "inherited" request parameter is set to true, the sub-types will be also returned.
If "checkRights" request parameter is set to true, only content types allowed for creation will be returned
-
-
Field Summary
Fields Modifier and Type Field Description protected ContentTypeExtensionPoint
_contentTypeExtensionPoint
Content type extension point.protected RightManager
_rightManager
The rights managerprotected RootContentHelper
_rootContentHelper
Helper for root contentprotected CurrentUserProvider
_userProvider
The current user provider-
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 GetContentTypesListAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
_addIfNotPresent(Collection<String> collection, String value)
protected boolean
_hasRight(ContentType contentType)
Test if the current user has the right needed by the content type to create a content.Map
act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters)
protected Map<String,Object>
getContentTypeProperties(ContentType contentType)
Get the content type propertiesvoid
service(ServiceManager smanager)
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
_contentTypeExtensionPoint
protected ContentTypeExtensionPoint _contentTypeExtensionPoint
Content type extension point.
-
_userProvider
protected CurrentUserProvider _userProvider
The current user provider
-
_rightManager
protected RightManager _rightManager
The rights manager
-
_rootContentHelper
protected RootContentHelper _rootContentHelper
Helper for root content
-
-
Constructor Detail
-
GetContentTypesListAction
public GetContentTypesListAction()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) 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
-
getContentTypeProperties
protected Map<String,Object> getContentTypeProperties(ContentType contentType)
Get the content type properties- Parameters:
contentType
- The content type- Returns:
- The content type properties
-
_hasRight
protected boolean _hasRight(ContentType contentType)
Test if the current user has the right needed by the content type to create a content.- Parameters:
contentType
- The content type- Returns:
- true if the user has the right needed, false otherwise.
-
_addIfNotPresent
private void _addIfNotPresent(Collection<String> collection, String value)
-
-