Package org.apache.syncope.core.logic
Class SCIMDataBinder
- java.lang.Object
-
- org.apache.syncope.core.logic.SCIMDataBinder
-
public class SCIMDataBinder extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected AuthDataAccessorauthDataAccessorprotected SCIMConfManagerconfManagerprotected GroupDAOgroupDAOprotected static LoggerLOGprotected UserLogicuserLogic
-
Constructor Summary
Constructors Constructor Description SCIMDataBinder(SCIMConfManager confManager, UserLogic userLogic, AuthDataAccessor authDataAccessor, GroupDAO groupDAO)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <E extends Enum<?>>
voidfill(Map<String,Attr> attrs, List<SCIMComplexConf<E>> confs, List<SCIMComplexValue> values)static Stringfilter2JexlExpression(String filter)Translates the given SCIM filter into the equivalent JEXL expression.protected booleanoutput(List<String> attributes, List<String> excludedAttributes, String schema)protected <T> Toutput(List<String> attributes, List<String> excludedAttributes, String schema, T value)protected <E extends Enum<?>>
voidsetAttribute(Set<Attr> attrs, List<SCIMComplexConf<E>> confs, List<SCIMComplexValue> values)protected voidsetAttribute(Set<AttrPatch> attrs, String schema, SCIMPatchOperation op)protected <E extends Enum<?>>
voidsetAttribute(Set<AttrPatch> attrs, List<SCIMComplexConf<E>> confs, List<SCIMComplexValue> values, PatchOp patchOp)protected <E extends Enum<?>>
voidsetAttribute(Set<AttrPatch> attrs, List<SCIMComplexConf<E>> confs, SCIMPatchOperation op)protected voidsetAttribute(Set<AttrPatch> attrs, SCIMUserAddressConf conf, SCIMPatchOperation op)protected voidsetAttribute(AnyObjectTO anyObjectTO, String schema, String value)protected voidsetAttribute(GroupTO groupTO, String schema, String value)protected voidsetAttribute(UserTO userTO, String schema, String value)AnyObjectCRtoAnyObjectCR(SCIMAnyObject anyObject)AnyObjectTOtoAnyObjectTO(SCIMAnyObject anyObject, boolean checkSchemas)AnyObjectURtoAnyObjectUR(AnyObjectTO before, SCIMPatchOperation op)GroupCRtoGroupCR(SCIMGroup group)GroupTOtoGroupTO(SCIMGroup group, boolean checkSchemas)GroupURtoGroupUR(GroupTO before, SCIMPatchOperation op)SCIMAnyObjecttoSCIMAnyObject(AnyObjectTO anyObjectTO, String location, List<String> attributes, List<String> excludedAttributes)SCIMGrouptoSCIMGroup(GroupTO groupTO, String location, List<String> attributes, List<String> excludedAttributes)SCIMUsertoSCIMUser(UserTO userTO, String location, List<String> attributes, List<String> excludedAttributes)UserCRtoUserCR(SCIMUser user)UserTOtoUserTO(SCIMUser user, boolean checkSchemas)Pair<UserUR,StatusR>toUserUpdate(UserTO before, Collection<String> resources, SCIMPatchOperation op)
-
-
-
Field Detail
-
LOG
protected static final Logger LOG
-
confManager
protected final SCIMConfManager confManager
-
userLogic
protected final UserLogic userLogic
-
authDataAccessor
protected final AuthDataAccessor authDataAccessor
-
groupDAO
protected final GroupDAO groupDAO
-
-
Constructor Detail
-
SCIMDataBinder
public SCIMDataBinder(SCIMConfManager confManager, UserLogic userLogic, AuthDataAccessor authDataAccessor, GroupDAO groupDAO)
-
-
Method Detail
-
filter2JexlExpression
public static String filter2JexlExpression(String filter)
Translates the given SCIM filter into the equivalent JEXL expression.- Parameters:
filter- SCIM filter according to https://www.rfc-editor.org/rfc/rfc7644#section-3.4.2.2- Returns:
- translated JEXL expression; see https://commons.apache.org/proper/commons-jexl/reference/syntax.html
-
fill
protected <E extends Enum<?>> void fill(Map<String,Attr> attrs, List<SCIMComplexConf<E>> confs, List<SCIMComplexValue> values)
-
output
protected boolean output(List<String> attributes, List<String> excludedAttributes, String schema)
-
output
protected <T> T output(List<String> attributes, List<String> excludedAttributes, String schema, T value)
-
toSCIMUser
public SCIMUser toSCIMUser(UserTO userTO, String location, List<String> attributes, List<String> excludedAttributes)
-
setAttribute
protected void setAttribute(AnyObjectTO anyObjectTO, String schema, String value)
-
setAttribute
protected <E extends Enum<?>> void setAttribute(Set<Attr> attrs, List<SCIMComplexConf<E>> confs, List<SCIMComplexValue> values)
-
setAttribute
protected void setAttribute(Set<AttrPatch> attrs, String schema, SCIMPatchOperation op)
-
setAttribute
protected <E extends Enum<?>> void setAttribute(Set<AttrPatch> attrs, List<SCIMComplexConf<E>> confs, SCIMPatchOperation op)
-
setAttribute
protected <E extends Enum<?>> void setAttribute(Set<AttrPatch> attrs, List<SCIMComplexConf<E>> confs, List<SCIMComplexValue> values, PatchOp patchOp)
-
setAttribute
protected void setAttribute(Set<AttrPatch> attrs, SCIMUserAddressConf conf, SCIMPatchOperation op)
-
toUserUpdate
public Pair<UserUR,StatusR> toUserUpdate(UserTO before, Collection<String> resources, SCIMPatchOperation op)
-
toSCIMGroup
@Transactional(readOnly=true) public SCIMGroup toSCIMGroup(GroupTO groupTO, String location, List<String> attributes, List<String> excludedAttributes)
-
toGroupUR
public GroupUR toGroupUR(GroupTO before, SCIMPatchOperation op)
-
toSCIMAnyObject
public SCIMAnyObject toSCIMAnyObject(AnyObjectTO anyObjectTO, String location, List<String> attributes, List<String> excludedAttributes)
-
toAnyObjectTO
public AnyObjectTO toAnyObjectTO(SCIMAnyObject anyObject, boolean checkSchemas)
-
toAnyObjectCR
public AnyObjectCR toAnyObjectCR(SCIMAnyObject anyObject)
-
toAnyObjectUR
public AnyObjectUR toAnyObjectUR(AnyObjectTO before, SCIMPatchOperation op)
-
-