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
Modifier and TypeFieldDescriptionprotected AmetysObjectResolver
Ametys object resolverstatic final String
The root node name of the pluginstatic final String
The root node name of the imported contentsstatic final String
The component role. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetRootContent
(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 Details
-
ROLE
The component role. -
CONTENTIO_ROOT_NODE
The root node name of the plugin- See Also:
-
IMPORTED_CONTENTS_ROOT_NODE
The root node name of the imported contents- See Also:
-
_resolver
Ametys object resolver
-
-
Constructor Details
-
SynchronizedRootContentHelper
public SynchronizedRootContentHelper()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getRootContent
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
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
-