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
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
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
Modifier and TypeFieldDescriptionprotected ContentTypeExtensionPoint
Content type extension point.protected RightManager
The rights managerprotected RootContentHelper
Helper for root contentprotected CurrentUserProvider
The current user providerFields 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 boolean
_hasRight
(ContentType contentType) Test if the current user has the right needed by the content type to create a content.act
(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) 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 Details
-
_contentTypeExtensionPoint
Content type extension point. -
_userProvider
The current user provider -
_rightManager
The rights manager -
_rootContentHelper
Helper for root content
-
-
Constructor Details
-
GetContentTypesListAction
public GetContentTypesListAction()
-
-
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
-
getContentTypeProperties
Get the content type properties- Parameters:
contentType
- The content type- Returns:
- The content type properties
-
_hasRight
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.
-