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, name| 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, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerExtension, setLastModified, setModifiedNow, setName, stop, unregister, unregisterExtensionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplicationStarted, getApplicationStartedOrderprotected 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 DefaultComponentpublic void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution in class DefaultComponentpublic void start(ComponentContext context)
Componentstart in interface Componentstart in class DefaultComponentpublic void deactivate(ComponentContext context)
ComponentThis method is called by the runtime when a component is deactivated.
deactivate in interface Componentdeactivate in class DefaultComponentcontext - the runtime contextpublic UserMapper getMapper(String mappingName) throws NuxeoException
UserMapperServicegetMapper in interface UserMapperServiceNuxeoExceptionpublic NuxeoPrincipal getOrCreateAndUpdateNuxeoPrincipal(String mappingName, Object userObject) throws NuxeoException
UserMapperServicegetOrCreateAndUpdateNuxeoPrincipal in interface UserMapperServicemappingName - the name of the contributed mapping to useuserObject - the native userObjectNuxeoPrincipalNuxeoExceptionpublic NuxeoPrincipal getOrCreateAndUpdateNuxeoPrincipal(String mappingName, Object userObject, boolean createIfNeeded, boolean update, Map<String,Serializable> params) throws NuxeoException
UserMapperServicegetOrCreateAndUpdateNuxeoPrincipal in interface UserMapperServicemappingName - 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)NuxeoPrincipalNuxeoExceptionpublic Object wrapNuxeoPrincipal(String mappingName, NuxeoPrincipal principal, Object nativePrincipal, Map<String,Serializable> params) throws NuxeoException
UserMapperServiceNuxeoPrincipal as the userObject used in the external authentication system *wrapNuxeoPrincipal in interface UserMapperServicemappingName - the name of the contributed mapping to useprincipal - the NuxeoPrincipal to wrapnativePrincipal - the principal Object in the target system (can be null)NuxeoExceptionpublic Set<String> getAvailableMappings()
UserMapperServicegetAvailableMappings in interface UserMapperServiceCopyright © 2019 Nuxeo. All rights reserved.