Class SynchronizedRootContentHelper
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.contentio.synchronize.rights.SynchronizedRootContentHelper
-
- All Implemented Interfaces:
LogEnabled
,Component
,Serviceable
public class SynchronizedRootContentHelper extends AbstractLogEnabled implements Component, Serviceable
Helper for retrieving root of synchronized contents
-
-
Field Summary
Fields Modifier and Type Field Description protected AmetysObjectResolver
_resolver
Ametys object resolverstatic String
CONTENTIO_ROOT_NODE
The root node name of the pluginstatic String
IMPORTED_CONTENTS_ROOT_NODE
The root node name of the imported contentsstatic String
ROLE
The component role.
-
Constructor Summary
Constructors Constructor Description SynchronizedRootContentHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AmetysObjectCollection
getRootContent(boolean create)
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)
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
CONTENTIO_ROOT_NODE
public static final String CONTENTIO_ROOT_NODE
The root node name of the plugin- See Also:
- Constant Field Values
-
IMPORTED_CONTENTS_ROOT_NODE
public static final String IMPORTED_CONTENTS_ROOT_NODE
The root node name of the imported contents- See Also:
- Constant Field Values
-
_resolver
protected AmetysObjectResolver _resolver
Ametys object resolver
-
-
Constructor Detail
-
SynchronizedRootContentHelper
public SynchronizedRootContentHelper()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getRootContent
public AmetysObjectCollection getRootContent(boolean create)
Gets the root of contents- Parameters:
create
-true
to create automatically the root when missing.- Returns:
- the root of contents
- Throws:
UnknownAmetysObjectException
- If root node does not exist
-
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
-
-