public class UserMapperComponent extends DefaultComponent implements UserMapperService
UserMapperService
interface.Modifier and Type | Field and Description |
---|---|
protected List<UserMapperDescriptor> |
descriptors |
protected static org.apache.commons.logging.Log |
log |
static String |
MAPPER_EP |
protected Map<String,UserMapper> |
mappers |
lastModified
Constructor and Description |
---|
UserMapperComponent() |
Modifier and Type | Method and Description |
---|---|
void |
applicationStarted(ComponentContext context)
Notify the component that Nuxeo Framework finished starting all Nuxeo bundles.
|
void |
deactivate(ComponentContext context)
Deactivates the component.
|
Set<String> |
getAvailableMappings()
Gives access to the contributed Mapping names
|
UserMapper |
getMapper(String mappingName)
returns the named mapper is any
|
NuxeoPrincipal |
getOrCreateAndUpdateNuxeoPrincipal(String mappingName,
Object userObject)
Should retrieve (create if needed) and update the NuxeoPrincipal according to the given userObject
|
NuxeoPrincipal |
getOrCreateAndUpdateNuxeoPrincipal(String mappingName,
Object userObject,
boolean createIfNeeded,
boolean update,
Map<String,Serializable> params)
Should retrieve (create if needed) and update the NuxeoPrincipal according to the given userObject
|
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
void |
unregisterContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
Object |
wrapNuxeoPrincipal(String mappingName,
NuxeoPrincipal principal,
Object nativePrincipal,
Map<String,Serializable> params)
Wrap the
NuxeoPrincipal as the userObject used in the external authentication system * |
activate, getAdapter, getApplicationStartedOrder, getLastModified, registerExtension, setLastModified, setModifiedNow, unregisterExtension
protected static final org.apache.commons.logging.Log log
protected Map<String,UserMapper> mappers
protected List<UserMapperDescriptor> descriptors
public static final String MAPPER_EP
public UserMapperComponent()
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution
in class DefaultComponent
public void applicationStarted(ComponentContext context)
Component
applicationStarted
in interface Component
applicationStarted
in class DefaultComponent
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution
in class DefaultComponent
public void deactivate(ComponentContext context)
Component
This method is called by the runtime when a component is deactivated.
deactivate
in interface Component
deactivate
in class DefaultComponent
context
- the runtime contextpublic UserMapper getMapper(String mappingName) throws NuxeoException
UserMapperService
getMapper
in interface UserMapperService
NuxeoException
public NuxeoPrincipal getOrCreateAndUpdateNuxeoPrincipal(String mappingName, Object userObject) throws NuxeoException
UserMapperService
getOrCreateAndUpdateNuxeoPrincipal
in interface UserMapperService
mappingName
- the name of the contributed mapping to useuserObject
- the native userObjectNuxeoPrincipal
NuxeoException
public NuxeoPrincipal getOrCreateAndUpdateNuxeoPrincipal(String mappingName, Object userObject, boolean createIfNeeded, boolean update, Map<String,Serializable> params) throws NuxeoException
UserMapperService
getOrCreateAndUpdateNuxeoPrincipal
in interface UserMapperService
mappingName
- the name of the contributed mapping to useuserObject
- the native userObjectcreateIfNeeded
- flag to allow creation (default is true)update
- flag to run update (default is true)NuxeoPrincipal
NuxeoException
public Object wrapNuxeoPrincipal(String mappingName, NuxeoPrincipal principal, Object nativePrincipal, Map<String,Serializable> params) throws NuxeoException
UserMapperService
NuxeoPrincipal
as the userObject used in the external authentication system *wrapNuxeoPrincipal
in interface UserMapperService
mappingName
- the name of the contributed mapping to useprincipal
- the NuxeoPrincipal
to wrapnativePrincipal
- the principal Object in the target system (can be null)NuxeoException
public Set<String> getAvailableMappings()
UserMapperService
getAvailableMappings
in interface UserMapperService
Copyright © 2015 Nuxeo SA. All rights reserved.