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
_cTypeEP
The content type extension pointprotected AmetysObjectResolver
_resolver
The ametys object resolverstatic String
ORGUNITS_METADATA
The orgUnit parent metadatastatic String
ROLE
The avalon role.static String
USER_DIRECTORY_ROOT_NODE
The 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 contentContent
getUserContent(UserIdentity user, String lang)
Get user content from user identityAmetysObjectCollection
getUserDirectoryRootContent()
Gets the root of user directory contentsAmetysObjectCollection
getUserDirectoryRootContent(boolean create)
Gets the root of user directory contentsvoid
service(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:
service
in 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
-true
to 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)
-
-