Package org.ametys.plugins.userdirectory
Class UserDirectoryHelper
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.userdirectory.UserDirectoryHelper
-
- All Implemented Interfaces:
LogEnabled,Component,Serviceable
public class UserDirectoryHelper extends AbstractLogEnabled implements Component, Serviceable
Helper for user directory.
-
-
Field Summary
Fields Modifier and Type Field Description protected ContentTypeExtensionPoint_cTypeEPThe content type extension pointprotected AmetysObjectResolver_resolverThe ametys object resolverstatic StringORGUNITS_METADATAThe orgUnit parent metadatastatic StringROLEThe avalon role.static StringUSER_DIRECTORY_ROOT_NODEThe root node name of the plugin
-
Constructor Summary
Constructors Constructor Description UserDirectoryHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Content>getOrgUnits(Content user)Get the list of orgunits contentContentgetUserContent(UserIdentity user, String lang)Get user content from user identityAmetysObjectCollectiongetUserDirectoryRootContent()Gets the root of user directory contentsAmetysObjectCollectiongetUserDirectoryRootContent(boolean create)Gets the root of user directory contentsvoidservice(ServiceManager manager)-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
USER_DIRECTORY_ROOT_NODE
public static final String USER_DIRECTORY_ROOT_NODE
The root node name of the plugin- See Also:
- Constant Field Values
-
ORGUNITS_METADATA
public static final String ORGUNITS_METADATA
The orgUnit parent metadata- See Also:
- Constant Field Values
-
_resolver
protected AmetysObjectResolver _resolver
The ametys object resolver
-
_cTypeEP
protected ContentTypeExtensionPoint _cTypeEP
The content type extension point
-
-
Constructor Detail
-
UserDirectoryHelper
public UserDirectoryHelper()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
getUserDirectoryRootContent
public AmetysObjectCollection getUserDirectoryRootContent()
Gets the root of user directory contents- Returns:
- the root of user directory contents
-
getUserDirectoryRootContent
public AmetysObjectCollection getUserDirectoryRootContent(boolean create)
Gets the root of user directory contents- Parameters:
create-trueto create automatically the root when missing.- Returns:
- the root of user directory contents
-
getOrgUnits
public List<Content> getOrgUnits(Content user)
Get the list of orgunits content- Parameters:
user- the user content- Returns:
- the list of orgunits
-
getUserContent
public Content getUserContent(UserIdentity user, String lang)
Get user content from user identity- Parameters:
user- the user identitylang- the lang- Returns:
- the user content (null if it not exist)
-
-