Class ConnObjectUtils
- java.lang.Object
-
- org.apache.syncope.core.provisioning.java.utils.ConnObjectUtils
-
public class ConnObjectUtils extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected AnyUtilsFactory
anyUtilsFactory
protected static Encryptor
ENCRYPTOR
protected static Logger
LOG
protected MappingManager
mappingManager
protected PasswordGenerator
passwordGenerator
protected RealmDAO
realmDAO
protected ExternalResourceDAO
resourceDAO
protected TemplateUtils
templateUtils
protected UserDAO
userDAO
-
Constructor Summary
Constructors Constructor Description ConnObjectUtils(TemplateUtils templateUtils, RealmDAO realmDAO, UserDAO userDAO, ExternalResourceDAO resourceDAO, PasswordGenerator passwordGenerator, MappingManager mappingManager, AnyUtilsFactory anyUtilsFactory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <C extends AnyCR>
CgetAnyCR(ConnectorObject obj, PullTask pullTask, AnyTypeKind anyTypeKind, Provision provision, boolean generatePassword)
Build a UserCR / GroupCR / AnyObjectCR out of connector object attributes and schema mapping.protected <T extends AnyTO>
TgetAnyTOFromConnObject(ConnectorObject obj, PullTask pullTask, AnyTypeKind anyTypeKind, Provision provision)
<U extends AnyUR>
UgetAnyUR(String key, ConnectorObject obj, AnyTO original, PullTask pullTask, AnyTypeKind anyTypeKind, Provision provision)
BuildAnyUR
out of connector object attributes and schema mapping.static ConnObject
getConnObjectTO(String fiql, Set<Attribute> attrs)
BuildsConnObject
out of a collection ofAttribute
instances.static String
getPassword(Object pwd)
Extract password value from passed value (if instance of GuardedString or GuardedByteArray).RealmTO
getRealmTO(ConnectorObject obj, OrgUnit orgUnit)
static String
toString(SyncToken syncToken)
static SyncToken
toSyncToken(String syncToken)
-
-
-
Field Detail
-
LOG
protected static final Logger LOG
-
ENCRYPTOR
protected static final Encryptor ENCRYPTOR
-
templateUtils
protected final TemplateUtils templateUtils
-
realmDAO
protected final RealmDAO realmDAO
-
userDAO
protected final UserDAO userDAO
-
resourceDAO
protected final ExternalResourceDAO resourceDAO
-
passwordGenerator
protected final PasswordGenerator passwordGenerator
-
mappingManager
protected final MappingManager mappingManager
-
anyUtilsFactory
protected final AnyUtilsFactory anyUtilsFactory
-
-
Constructor Detail
-
ConnObjectUtils
public ConnObjectUtils(TemplateUtils templateUtils, RealmDAO realmDAO, UserDAO userDAO, ExternalResourceDAO resourceDAO, PasswordGenerator passwordGenerator, MappingManager mappingManager, AnyUtilsFactory anyUtilsFactory)
-
-
Method Detail
-
getPassword
public static String getPassword(Object pwd)
Extract password value from passed value (if instance of GuardedString or GuardedByteArray).- Parameters:
pwd
- received from the underlying connector- Returns:
- password value
-
getConnObjectTO
public static ConnObject getConnObjectTO(String fiql, Set<Attribute> attrs)
BuildsConnObject
out of a collection ofAttribute
instances.- Parameters:
fiql
- FIQL expression to uniquely identify the given Connector Objectattrs
- attributes- Returns:
- transfer object
-
getAnyCR
@Transactional(readOnly=true) public <C extends AnyCR> C getAnyCR(ConnectorObject obj, PullTask pullTask, AnyTypeKind anyTypeKind, Provision provision, boolean generatePassword)
Build a UserCR / GroupCR / AnyObjectCR out of connector object attributes and schema mapping.- Type Parameters:
C
- create request type- Parameters:
obj
- connector objectpullTask
- pull taskanyTypeKind
- any type kindprovision
- provision informationgeneratePassword
- whether password value shall be generated, in case not found from connector object- Returns:
- create request
-
getRealmTO
public RealmTO getRealmTO(ConnectorObject obj, OrgUnit orgUnit)
-
getAnyUR
@Transactional(readOnly=true) public <U extends AnyUR> U getAnyUR(String key, ConnectorObject obj, AnyTO original, PullTask pullTask, AnyTypeKind anyTypeKind, Provision provision)
BuildAnyUR
out of connector object attributes and schema mapping.- Type Parameters:
U
- any object- Parameters:
key
- any object to be updatedobj
- connector objectoriginal
- any object to get diff frompullTask
- pull taskanyTypeKind
- any type kindprovision
- provision information- Returns:
- modifications for the any object to be updated
-
getAnyTOFromConnObject
protected <T extends AnyTO> T getAnyTOFromConnObject(ConnectorObject obj, PullTask pullTask, AnyTypeKind anyTypeKind, Provision provision)
-
-