Package org.ametys.cms.content
Class RootContentHelper
- java.lang.Object
-
- org.ametys.cms.content.RootContentHelper
-
- All Implemented Interfaces:
Component
,Serviceable
- Direct Known Subclasses:
RootContentHelper
public class RootContentHelper extends Object implements Component, Serviceable
Helper for retrieving root of contents
-
-
Field Summary
Fields Modifier and Type Field Description protected AmetysObjectResolver
_resolver
Ametys object resolverstatic String
ROLE
The component role.
-
Constructor Summary
Constructors Constructor Description RootContentHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AmetysObjectCollection
getRootContent()
Gets the root of contentsboolean
isChildOfRootContent(Content content)
Tests if the given content is child of the root of contents, i.e.void
service(ServiceManager manager)
-
-
-
Field Detail
-
_resolver
protected AmetysObjectResolver _resolver
Ametys object resolver
-
-
Constructor Detail
-
RootContentHelper
public RootContentHelper()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getRootContent
public AmetysObjectCollection getRootContent()
Gets the root of contents- Returns:
- the root of contents
-
isChildOfRootContent
public boolean isChildOfRootContent(Content content)
Tests if the given content is child of the root of contents, i.e. the given content is managed by the CMS workspace- Parameters:
content
- The content to test- Returns:
- true if the given content is child of the root of contents
-
-