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 Integer
CACHE_CONCURRENCY_LEVEL
protected static Integer
CACHE_MAXIMUM_SIZE
protected static Integer
CACHE_TIMEOUT
static String
CONFIG_EP
protected 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 void
clearCache()
Clears the user profile cache.int
getApplicationStartedOrder()
The component notification order forComponent.applicationStarted(org.nuxeo.runtime.model.ComponentContext)
.ImporterConfig
getImporterConfig()
Get the user profile XMap descriptor for the importer configDocumentModel
getUserProfile(DocumentModel userModel, CoreSession session)
Get a DocumentModel containing both user and user profile schemasDocumentModel
getUserProfileDocument(String userName, CoreSession session)
Get the profile of a specific user.DocumentModel
getUserProfileDocument(CoreSession session)
Get the current user profile.void
registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
protected void
scheduleImport()
void
start(ComponentContext context)
Start the component.void
unregisterContribution(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:UserProfileService
Get the current user profile. It's stored in its user workspace.- Specified by:
getUserProfileDocument
in interfaceUserProfileService
- Parameters:
session
- the current CoreSession- Returns:
- the user profile DocumentModel
-
getUserProfileDocument
public DocumentModel getUserProfileDocument(String userName, CoreSession session)
Description copied from interface:UserProfileService
Get the profile of a specific user. It's stored in its user workspace.- Specified by:
getUserProfileDocument
in 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:UserProfileService
Get a DocumentModel containing both user and user profile schemas- Specified by:
getUserProfile
in interfaceUserProfileService
- Parameters:
userModel
- the user DocumentModelsession
- the current CoreSession- Returns:
- a SimpleDocumentModel with the two schemas
-
clearCache
public void clearCache()
Description copied from interface:UserProfileService
Clears the user profile cache.- Specified by:
clearCache
in interfaceUserProfileService
-
getImporterConfig
public ImporterConfig getImporterConfig()
Description copied from interface:UserProfileService
Get the user profile XMap descriptor for the importer config- Specified by:
getImporterConfig
in interfaceUserProfileService
- Returns:
- an XMap ImportConfig descriptor
-
getApplicationStartedOrder
public int getApplicationStartedOrder()
Description copied from interface:Component
The 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:
getApplicationStartedOrder
in interfaceComponent
- Returns:
- the order, 1000 by default
-
start
public void start(ComponentContext context)
Description copied from interface:Component
Start the component. This method is called after all the components were resolved and activated- Specified by:
start
in interfaceComponent
- Overrides:
start
in classDefaultComponent
-
scheduleImport
protected void scheduleImport()
-
registerContribution
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
- Overrides:
registerContribution
in classDefaultComponent
-
unregisterContribution
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
- Overrides:
unregisterContribution
in classDefaultComponent
-
-