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 AuthDataAccessor
authDataAccessor
protected SCIMConfManager
confManager
protected static List<String>
GROUP_SCHEMAS
protected static Logger
LOG
protected UserLogic
userLogic
-
Constructor Summary
Constructors Constructor Description SCIMDataBinder(SCIMConfManager confManager, UserLogic userLogic, AuthDataAccessor authDataAccessor)
-
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 String
filter2JexlExpression(String filter)
Translates the given SCIM filter into the equivalent JEXL expression.protected boolean
output(List<String> attributes, List<String> excludedAttributes, String schema)
protected <T> T
output(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 void
setAttribute(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 void
setAttribute(Set<AttrPatch> attrs, SCIMUserAddressConf conf, SCIMPatchOperation op)
protected void
setAttribute(UserTO userTO, String schema, String value)
GroupCR
toGroupCR(SCIMGroup group)
GroupTO
toGroupTO(SCIMGroup group, boolean checkSchemas)
GroupUR
toGroupUR(GroupTO before, SCIMPatchOperation op)
SCIMGroup
toSCIMGroup(GroupTO groupTO, String location, List<String> attributes, List<String> excludedAttributes)
SCIMUser
toSCIMUser(UserTO userTO, String location, List<String> attributes, List<String> excludedAttributes)
UserCR
toUserCR(SCIMUser user)
UserTO
toUserTO(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
-
-
Constructor Detail
-
SCIMDataBinder
public SCIMDataBinder(SCIMConfManager confManager, UserLogic userLogic, AuthDataAccessor authDataAccessor)
-
-
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 <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
public SCIMGroup toSCIMGroup(GroupTO groupTO, String location, List<String> attributes, List<String> excludedAttributes)
-
toGroupUR
public GroupUR toGroupUR(GroupTO before, SCIMPatchOperation op)
-
-