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_resolverAmetys object resolverstatic StringCONTENTIO_ROOT_NODEThe root node name of the pluginstatic StringIMPORTED_CONTENTS_ROOT_NODEThe root node name of the imported contentsstatic StringROLEThe component role.
-
Constructor Summary
Constructors Constructor Description SynchronizedRootContentHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AmetysObjectCollectiongetRootContent(boolean create)Gets the root of contentsbooleanisChildOfRootContent(Content content)Tests if the given content is child of the root of contents, i.e.voidservice(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:
servicein interfaceServiceable- Throws:
ServiceException
-
getRootContent
public AmetysObjectCollection getRootContent(boolean create)
Gets the root of contents- Parameters:
create-trueto 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
-
-