Package org.nuxeo.usermapper.service
Class UserMapperComponent
java.lang.Object
org.nuxeo.runtime.model.DefaultComponent
org.nuxeo.usermapper.service.UserMapperComponent
- All Implemented Interfaces:
Adaptable,Component,Extensible,TimestampedService,UserMapperService
Component to manage extension point and expose the
UserMapperService interface.- Since:
- 7.4
- Author:
- tiry
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<UserMapperDescriptor>static final Stringprotected Map<String,UserMapper> Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeactivate(ComponentContext context) Deactivates the component.Gives access to the contributed Mapping namesreturns the named mapper is anygetOrCreateAndUpdateNuxeoPrincipal(String mappingName, Object userObject) Should retrieve (create if needed) and update the NuxeoPrincipal according to the given userObjectgetOrCreateAndUpdateNuxeoPrincipal(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 userObjectvoidregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) voidstart(ComponentContext context) Start the component.voidunregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) wrapNuxeoPrincipal(String mappingName, NuxeoPrincipal principal, Object nativePrincipal, Map<String, Serializable> params) Wrap theNuxeoPrincipalas the userObject used in the external authentication system *Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
activate, addRuntimeMessage, addRuntimeMessage, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerExtension, setLastModified, setModifiedNow, setName, stop, unregister, unregisterExtensionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.nuxeo.runtime.model.Component
getApplicationStartedOrder
-
Field Details
-
mappers
-
descriptors
-
MAPPER_EP
- See Also:
-
-
Constructor Details
-
UserMapperComponent
public UserMapperComponent()
-
-
Method Details
-
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
-
start
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
-
deactivate
Description copied from interface:ComponentDeactivates the component.This method is called by the runtime when a component is deactivated.
- Specified by:
deactivatein interfaceComponent- Overrides:
deactivatein classDefaultComponent- Parameters:
context- the runtime context
-
getMapper
Description copied from interface:UserMapperServicereturns the named mapper is any- Specified by:
getMapperin interfaceUserMapperService- Throws:
NuxeoException
-
getOrCreateAndUpdateNuxeoPrincipal
public NuxeoPrincipal getOrCreateAndUpdateNuxeoPrincipal(String mappingName, Object userObject) throws NuxeoException Description copied from interface:UserMapperServiceShould retrieve (create if needed) and update the NuxeoPrincipal according to the given userObject- Specified by:
getOrCreateAndUpdateNuxeoPrincipalin interfaceUserMapperService- Parameters:
mappingName- the name of the contributed mapping to useuserObject- the native userObject- Returns:
- the matching
NuxeoPrincipal - Throws:
NuxeoException
-
getOrCreateAndUpdateNuxeoPrincipal
public NuxeoPrincipal getOrCreateAndUpdateNuxeoPrincipal(String mappingName, Object userObject, boolean createIfNeeded, boolean update, Map<String, Serializable> params) throws NuxeoExceptionDescription copied from interface:UserMapperServiceShould retrieve (create if needed) and update the NuxeoPrincipal according to the given userObject- Specified by:
getOrCreateAndUpdateNuxeoPrincipalin interfaceUserMapperService- Parameters:
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)- Returns:
- the matching
NuxeoPrincipal - Throws:
NuxeoException
-
wrapNuxeoPrincipal
public Object wrapNuxeoPrincipal(String mappingName, NuxeoPrincipal principal, Object nativePrincipal, Map<String, Serializable> params) throws NuxeoExceptionDescription copied from interface:UserMapperServiceWrap theNuxeoPrincipalas the userObject used in the external authentication system *- Specified by:
wrapNuxeoPrincipalin interfaceUserMapperService- Parameters:
mappingName- the name of the contributed mapping to useprincipal- theNuxeoPrincipalto wrapnativePrincipal- the principal Object in the target system (can be null)- Throws:
NuxeoException
-
getAvailableMappings
Description copied from interface:UserMapperServiceGives access to the contributed Mapping names- Specified by:
getAvailableMappingsin interfaceUserMapperService
-