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 |
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 |
start(ComponentContext context)
Start the component.
|
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, getLastModified, registerExtension, setLastModified, setModifiedNow, stop, unregisterExtension
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applicationStarted, getApplicationStartedOrder
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 unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution
in class DefaultComponent
public void start(ComponentContext context)
Component
start
in interface Component
start
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 © 2017 Nuxeo. All rights reserved.