Class DefaultMappingManager
java.lang.Object
org.apache.syncope.core.provisioning.java.DefaultMappingManager
- All Implemented Interfaces:
MappingManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AnyObjectDAOprotected final AnyTypeDAOprotected final DerAttrHandlerprotected final EncryptorManagerprotected final GroupDAOprotected final ImplementationDAOprotected final IntAttrNameParserprotected static final Loggerprotected final RealmSearchDAOprotected final RelationshipTypeDAOprotected final UserDAO -
Constructor Summary
ConstructorsConstructorDescriptionDefaultMappingManager(AnyTypeDAO anyTypeDAO, UserDAO userDAO, AnyObjectDAO anyObjectDAO, GroupDAO groupDAO, RelationshipTypeDAO relationshipTypeDAO, RealmSearchDAO realmSearchDAO, ImplementationDAO implementationDAO, DerAttrHandler derAttrHandler, IntAttrNameParser intAttrNameParser, EncryptorManager encryptorManager) -
Method Summary
Modifier and TypeMethodDescriptionprotected static PlainAttrValuedecodePassword(Account account) protected NameevaluateNAME(Any any, Provision provision, String connObjectKey) Build __NAME__ for propagation.protected NameevaluateNAME(Realm realm, OrgUnit orgUnit, String connObjectKey) Build __NAME__ for propagation.getConnObjectKeyValue(Any any, ExternalResource resource, Provision provision) Get connObjectKey internal value.getConnObjectKeyValue(Realm realm, ExternalResource resource) Get connObjectKey internal value.protected StringgetGroupOwnerValue(ExternalResource resource, Provision provision, Any any) getIntValues(ExternalResource resource, Item item, IntAttrName intAttrName, AttrSchemaType schemaType, Realm realm) Get attribute values for the givenItemand realm.getIntValues(ExternalResource resource, Provision provision, Item item, IntAttrName intAttrName, AttrSchemaType schemaType, Any any, AccountGetter usernameAccountGetter, PlainAttrGetter plainAttrGetter) Get attribute values for the givenItemand any object.protected static NamegetPasswordAttrValue(Account account, String defaultValue) protected List<Implementation> getTransformers(Item item) booleanhasMustChangePassword(Provision provision) Checks if there is a mapping item in the givenProvisionformustChangePassword.prepareAttr(ExternalResource resource, Item item, Realm realm) Prepare attribute for sending to a connector instance.prepareAttr(ExternalResource resource, Provision provision, Item item, Any any, String password, AccountGetter usernameAccountGetter, AccountGetter passwordAccountGetter, PlainAttrGetter plainAttrGetter) Prepare attribute for sending to a connector instance.prepareAttrsFromAny(Any any, String password, boolean changePwd, Boolean enable, ExternalResource resource, Provision provision) Prepare attributes for sending to a connector instance.prepareAttrsFromLinkedAccount(User user, LinkedAccount account, String password, boolean changePwd, Provision provision) Prepare attributes for sending to a connector instance.prepareAttrsFromRealm(Realm realm, ExternalResource resource) Prepare attributes for sending to a connector instance.voidsetIntValues(Item item, Attribute attr, AnyTO anyTO) Set attribute values, according to the givenItem, to any object from attribute received from connector.voidsetIntValues(Item item, Attribute attr, RealmTO realmTO) Set attribute values, according to the givenItem, to realm from attribute received from connector.
-
Field Details
-
LOG
-
anyTypeDAO
-
userDAO
-
anyObjectDAO
-
groupDAO
-
relationshipTypeDAO
-
realmSearchDAO
-
implementationDAO
-
derAttrHandler
-
intAttrNameParser
-
encryptorManager
-
-
Constructor Details
-
DefaultMappingManager
public DefaultMappingManager(AnyTypeDAO anyTypeDAO, UserDAO userDAO, AnyObjectDAO anyObjectDAO, GroupDAO groupDAO, RelationshipTypeDAO relationshipTypeDAO, RealmSearchDAO realmSearchDAO, ImplementationDAO implementationDAO, DerAttrHandler derAttrHandler, IntAttrNameParser intAttrNameParser, EncryptorManager encryptorManager)
-
-
Method Details
-
processPreparedAttr
-
getName
-
clonePlainAttrValue
-
getTransformers
-
evaluateNAME
Build __NAME__ for propagation. First look if there is a defined connObjectLink for the given resource (and in this case evaluate as JEXL); otherwise, take given connObjectKey.- Parameters:
any- given any objectprovision- external resourceconnObjectKey- connector object key- Returns:
- the value to be propagated as __NAME__
-
evaluateNAME
Build __NAME__ for propagation. First look if there is a defined connObjectLink for the given resource (and in this case evaluate as JEXL); otherwise, take given connObjectKey.- Parameters:
realm- given any objectorgUnit- external resourceconnObjectKey- connector object key- Returns:
- the value to be propagated as __NAME__
-
prepareAttrsFromAny
@Transactional(readOnly=true) public Pair<String,Set<Attribute>> prepareAttrsFromAny(Any any, String password, boolean changePwd, Boolean enable, ExternalResource resource, Provision provision) Description copied from interface:MappingManagerPrepare attributes for sending to a connector instance.- Specified by:
prepareAttrsFromAnyin interfaceMappingManager- Parameters:
any- given any objectpassword- clear-text passwordchangePwd- whether password should be included for propagation attributes or notenable- whether any object must be enabled or notresource- resource informationprovision- provision information- Returns:
- connObjectLink + prepared attributes
-
prepareAttrsFromLinkedAccount
@Transactional(readOnly=true) public Set<Attribute> prepareAttrsFromLinkedAccount(User user, LinkedAccount account, String password, boolean changePwd, Provision provision) Description copied from interface:MappingManagerPrepare attributes for sending to a connector instance.- Specified by:
prepareAttrsFromLinkedAccountin interfaceMappingManager- Parameters:
user- given useraccount- linked accountpassword- user's clear-text password, to use as default value in casechangePwd- whether password should be included for propagation attributes or notprovision- provision information- Returns:
- prepared attributes
-
prepareAttrsFromRealm
Description copied from interface:MappingManagerPrepare attributes for sending to a connector instance.- Specified by:
prepareAttrsFromRealmin interfaceMappingManager- Parameters:
realm- Realmresource- resource information- Returns:
- connObjectLink + prepared attributes
-
decodePassword
-
getPasswordAttrValue
-
prepareAttr
public Pair<String,Attribute> prepareAttr(ExternalResource resource, Provision provision, Item item, Any any, String password, AccountGetter usernameAccountGetter, AccountGetter passwordAccountGetter, PlainAttrGetter plainAttrGetter) Description copied from interface:MappingManagerPrepare attribute for sending to a connector instance.- Specified by:
prepareAttrin interfaceMappingManager- Parameters:
resource- resource informationprovision- provision informationitem- mapping itemany- given any objectpassword- clear-text passwordusernameAccountGetter- function to get actual account instance for usernamepasswordAccountGetter- function to get actual account instance for passwordplainAttrGetter- function to get PlainAttr instances- Returns:
- connObjectLink (if it is the case) + prepared attribute
-
prepareAttr
Description copied from interface:MappingManagerPrepare attribute for sending to a connector instance.- Specified by:
prepareAttrin interfaceMappingManager- Parameters:
resource- resource informationitem- mapping itemrealm- given realm- Returns:
- connObjectLink (if it is the case) + prepared attribute
-
getIntValues
@Transactional(readOnly=true) public Pair<AttrSchemaType,List<PlainAttrValue>> getIntValues(ExternalResource resource, Provision provision, Item item, IntAttrName intAttrName, AttrSchemaType schemaType, Any any, AccountGetter usernameAccountGetter, PlainAttrGetter plainAttrGetter) Description copied from interface:MappingManagerGet attribute values for the givenItemand any object.- Specified by:
getIntValuesin interfaceMappingManager- Parameters:
resource- resource informationprovision- provision informationitem- mapping itemintAttrName- int attr nameschemaType- schema typeany- any objectusernameAccountGetter- function to get actual account instance for usernameplainAttrGetter- function to get PlainAttr instances- Returns:
- attribute values and their type
-
getIntValues
@Transactional(readOnly=true) public Pair<AttrSchemaType,List<PlainAttrValue>> getIntValues(ExternalResource resource, Item item, IntAttrName intAttrName, AttrSchemaType schemaType, Realm realm) Description copied from interface:MappingManagerGet attribute values for the givenItemand realm.- Specified by:
getIntValuesin interfaceMappingManager- Parameters:
resource- resource informationitem- mapping itemintAttrName- int attr nameschemaType- schema typerealm- realm- Returns:
- attribute values and their type
-
getGroupOwnerValue
-
getConnObjectKeyValue
@Transactional(readOnly=true) public Optional<String> getConnObjectKeyValue(Any any, ExternalResource resource, Provision provision) Description copied from interface:MappingManagerGet connObjectKey internal value.- Specified by:
getConnObjectKeyValuein interfaceMappingManager- Parameters:
any- any objectresource- resource informationprovision- provision information- Returns:
- connObjectKey internal value
-
getConnObjectKeyValue
@Transactional(readOnly=true) public Optional<String> getConnObjectKeyValue(Realm realm, ExternalResource resource) Description copied from interface:MappingManagerGet connObjectKey internal value.- Specified by:
getConnObjectKeyValuein interfaceMappingManager- Parameters:
realm- realmresource- resource information- Returns:
- connObjectKey internal value
-
setIntValues
Description copied from interface:MappingManagerSet attribute values, according to the givenItem, to any object from attribute received from connector.- Specified by:
setIntValuesin interfaceMappingManager- Parameters:
item- mapping itemattr- attribute received from connectoranyTO- any object
-
setIntValues
Description copied from interface:MappingManagerSet attribute values, according to the givenItem, to realm from attribute received from connector.- Specified by:
setIntValuesin interfaceMappingManager- Parameters:
item- mapping itemattr- attribute received from connectorrealmTO- realm
-
hasMustChangePassword
Description copied from interface:MappingManagerChecks if there is a mapping item in the givenProvisionformustChangePassword.- Specified by:
hasMustChangePasswordin interfaceMappingManager- Parameters:
provision- provision- Returns:
- if there is a mapping item in the given provision for
mustChangePassword
-