Class UserProfileServiceImpl
- java.lang.Object
-
- org.nuxeo.runtime.model.DefaultComponent
-
- org.nuxeo.ecm.user.center.profile.UserProfileServiceImpl
-
- All Implemented Interfaces:
UserProfileService,Adaptable,Component,Extensible,TimestampedService
public class UserProfileServiceImpl extends DefaultComponent implements UserProfileService
Implementation ofUserProfileService.- Since:
- 5.5
- Author:
- Quentin Lamerand
- See Also:
UserProfileService
-
-
Field Summary
Fields Modifier and Type Field Description protected static IntegerCACHE_CONCURRENCY_LEVELprotected static IntegerCACHE_MAXIMUM_SIZEprotected static IntegerCACHE_TIMEOUTstatic StringCONFIG_EPprotected com.google.common.cache.Cache<String,String>profileUidCache-
Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name
-
-
Constructor Summary
Constructors Constructor Description UserProfileServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearCache()Clears the user profile cache.intgetApplicationStartedOrder()The component notification order forComponent.applicationStarted(org.nuxeo.runtime.model.ComponentContext).ImporterConfiggetImporterConfig()Get the user profile XMap descriptor for the importer configDocumentModelgetUserProfile(DocumentModel userModel, CoreSession session)Get a DocumentModel containing both user and user profile schemasDocumentModelgetUserProfileDocument(String userName, CoreSession session)Get the profile of a specific user.DocumentModelgetUserProfileDocument(CoreSession session)Get the current user profile.voidregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)protected voidscheduleImport()voidstart(ComponentContext context)Start the component.voidunregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)-
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
activate, addRuntimeMessage, addRuntimeMessage, deactivate, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerExtension, setLastModified, setModifiedNow, setName, stop, unregister, unregisterExtension
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nuxeo.runtime.model.Component
applicationStarted
-
-
-
-
Field Detail
-
CACHE_CONCURRENCY_LEVEL
protected static final Integer CACHE_CONCURRENCY_LEVEL
-
CACHE_TIMEOUT
protected static final Integer CACHE_TIMEOUT
-
CACHE_MAXIMUM_SIZE
protected static final Integer CACHE_MAXIMUM_SIZE
-
CONFIG_EP
public static final String CONFIG_EP
- See Also:
- Constant Field Values
-
-
Method Detail
-
getUserProfileDocument
public DocumentModel getUserProfileDocument(CoreSession session)
Description copied from interface:UserProfileServiceGet the current user profile. It's stored in its user workspace.- Specified by:
getUserProfileDocumentin interfaceUserProfileService- Parameters:
session- the current CoreSession- Returns:
- the user profile DocumentModel
-
getUserProfileDocument
public DocumentModel getUserProfileDocument(String userName, CoreSession session)
Description copied from interface:UserProfileServiceGet the profile of a specific user. It's stored in its user workspace.- Specified by:
getUserProfileDocumentin interfaceUserProfileService- Parameters:
userName- the user namesession- the current CoreSession- Returns:
- the user profile DocumentModel
-
getUserProfile
public DocumentModel getUserProfile(DocumentModel userModel, CoreSession session)
Description copied from interface:UserProfileServiceGet a DocumentModel containing both user and user profile schemas- Specified by:
getUserProfilein interfaceUserProfileService- Parameters:
userModel- the user DocumentModelsession- the current CoreSession- Returns:
- a SimpleDocumentModel with the two schemas
-
clearCache
public void clearCache()
Description copied from interface:UserProfileServiceClears the user profile cache.- Specified by:
clearCachein interfaceUserProfileService
-
getImporterConfig
public ImporterConfig getImporterConfig()
Description copied from interface:UserProfileServiceGet the user profile XMap descriptor for the importer config- Specified by:
getImporterConfigin interfaceUserProfileService- Returns:
- an XMap ImportConfig descriptor
-
getApplicationStartedOrder
public int getApplicationStartedOrder()
Description copied from interface:ComponentThe component notification order forComponent.applicationStarted(org.nuxeo.runtime.model.ComponentContext).Components are notified in increasing order. Order 1000 is the default order for components that don't care. Order 100 is the repository initialization.
- Specified by:
getApplicationStartedOrderin interfaceComponent- Returns:
- the order, 1000 by default
-
start
public void start(ComponentContext context)
Description copied from interface:ComponentStart the component. This method is called after all the components were resolved and activated- Specified by:
startin interfaceComponent- Overrides:
startin classDefaultComponent
-
scheduleImport
protected void scheduleImport()
-
registerContribution
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
- Overrides:
registerContributionin classDefaultComponent
-
unregisterContribution
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
- Overrides:
unregisterContributionin classDefaultComponent
-
-