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,Initializable,Component,Contextualizable,Serviceable
public class UserDirectoryHelper
extends AbstractLogEnabled
implements Component, Serviceable, Initializable, Contextualizable
Helper for user directory.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AbstractCacheManagerThe cache managerprotected ContextThe contextprotected ContentTypeExtensionPointThe content type extension pointprotected LanguagesManagerThe languages managerprotected AmetysObjectResolverThe ametys object resolverstatic final StringThe parent content type idstatic final StringThe orgUnit content typestatic final StringThe orgUnit parent attributestatic final StringThe avalon role.static final StringThe root node name of the plugin -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription_requestUserContentIds(UserIdentity user, String lang) Request the list of user content idvoidcontextualize(Context context) getOrgUnits(Content user) Get the list of orgunits contentgetUserContent(UserIdentity user, String givenLanguage) Get user content from user identitygetUserContents(UserIdentity user, String givenLanguage) Get user contents from user identityGets the root of user directory contentsgetUserDirectoryRootContent(boolean create) Gets the root of user directory contentsvoidvoidInvalidate the user content cache for one language.voidservice(ServiceManager manager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
The avalon role. -
USER_DIRECTORY_ROOT_NODE
The root node name of the plugin- See Also:
-
ORGUNITS_ATTRIBUTE
The orgUnit parent attribute- See Also:
-
ORGUNIT_CONTENT_TYPE
The orgUnit content type- See Also:
-
ABSTRACT_USER_CONTENT_TYPE
The parent content type id- See Also:
-
_resolver
The ametys object resolver -
_cTypeEP
The content type extension point -
_cacheManager
The cache manager -
_languagesManager
The languages manager -
_context
The context
-
-
Constructor Details
-
UserDirectoryHelper
public UserDirectoryHelper()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
initialize
- Specified by:
initializein interfaceInitializable- Throws:
Exception
-
contextualize
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
getUserDirectoryRootContent
Gets the root of user directory contents- Returns:
- the root of user directory contents
-
getUserDirectoryRootContent
Gets the root of user directory contents- Parameters:
create-trueto create automatically the root when missing.- Returns:
- the root of user directory contents
-
getOrgUnits
Get the list of orgunits content- Parameters:
user- the user content- Returns:
- the list of orgunits
-
getUserContents
Get user contents from user identity- Parameters:
user- the user identitygivenLanguage- the given language- Returns:
- the user contents
-
getUserContent
Get user content from user identity- Parameters:
user- the user identitygivenLanguage- the given language- Returns:
- the user content (null if it not exist)
-
_requestUserContentIds
Request the list of user content id- Parameters:
user- the user identitylang- the lang- Returns:
- the list of user content id (empty if it not exist)
-
invalidateUserContentCache
Invalidate the user content cache for one language. If lang isnull, invalidate all- Parameters:
lang- the lang. Can benull
-