gluu
|
静的公開メンバ関数 | |
static BaseScimResource | transferToResourceReplace (BaseScimResource replacementDataSource, BaseScimResource originalDataSource, List< Extension > extensions) throws InvalidAttributeValueException |
static BaseScimResource | transferToResourceAdd (BaseScimResource replacementDataSource, BaseScimResource originalDataSource, List< Extension > extensions) throws InvalidAttributeValueException |
static BaseScimResource | deleteFromResource (BaseScimResource origin, String path, List< Extension > extensions) throws InvalidAttributeValueException |
static Schema | getSchemaAnnotation (Class<? extends BaseScimResource > cls) |
static String | getDefaultSchemaUrn (Class<? extends BaseScimResource > cls) |
static String | stripDefaultSchema (Class<? extends BaseScimResource > cls, String attribute) |
static String | getType (Class<? extends BaseScimResource > cls) |
static String | adjustNotationInPath (String path, String defaultUrn, List< String > schemas) |
static String [] | splitPath (String path, List< String > urns) |
static void | adjustPrimarySubAttributes (BaseScimResource resource) |
非公開メンバ関数 | |
ScimResourceUtil () | |
静的非公開メンバ関数 | |
static void | attachExtensionInfo (Map< String, Object > source, Map< String, Object > destination, List< Extension > extensions, boolean replacing) |
static void | deleteCustomAttribute (Map< String, Object > source, String path, List< Extension > extensions) |
static BaseScimResource | transferToResource (BaseScimResource origin, final BaseScimResource destination, List< Extension > extensions, boolean replacing) throws InvalidAttributeValueException |
静的非公開変数類 | |
static Logger | log = LogManager.getLogger(ScimResourceUtil.class) |
static ObjectMapper | mapper =new ObjectMapper() |
This class contains methods to facilitate transformation, and manipulation of data inside SCIM resource objects, as well as some miscelaneous routines.
|
inlinestatic |
|
inlinestatic |
Takes a SCIM resource and "fixes" inconsistencies in "primary" subattribute: in a multivalued attribute setting, only one of the items in the collection can have "primary" : true
. Thus, for every collection involved (e.g. addresses, emails... in org.gluu.oxtrust.model.scim2.user.UserResource), it switches all occurrences where "primary" is currently true
to false
, except for the first one found.
resource | SCIM resource object |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestatic |
Returns a SCIM resource with the same data found in origin
object, except for the attribute referenced by path
being removed from the output. In other words, this method nullifies an attribute.
origin | The resource having the the original data |
path | An attribute path (in dot notation). Examples could be: displayName, emails.type, addresses, meta.lastModified . |
extensions | A list of Extension s associated to origin Object |
path
InvalidAttributeValueException | If there is an attempt to remove an attribute annotated as required or read-only |
|
inlinestatic |
Returns the urn
associated to the default schema of the SCIM resource whose class is passed as parameter.
cls | A class representing a SCIM resource |
Schema
annotation) or null if there is no such annotation in the class cls
|
inlinestatic |
|
inlinestatic |
Returns the (human-readable) type of a SCIM resource based on its class. In practice this will be something like "User" or "Group". The type is obtained by calling Schema#name() of the respective class annotation.
cls | A class that represents a SCIM resource type |
|
inlinestatic |
|
inlinestatic |
Removes from an attribute path the schema urn
that might prefix such path. The urn
to remove will correspond to the default schema urn of a SCIM resource type whose class is passed as parameter.
cls | A class that represents a SCIM resource type |
attribute | An attribute path (potentially prefixed by a urn ) |
attribute_name
is returned if urn:attribute_name
is the value of attribute parameter (as long as urn represent the default urn for this resource)
|
inlinestaticprivate |
|
inlinestatic |
This method applies the same copying rules of transferToResourceReplace except for the following:
replacementDataSource
, the existing data in the originalDataSource
object is retained, and the items in the former object are prepended to the existing collection. replacementDataSource | Object with the information to be incorporated. Only non-null attributes of this object end up being transfered to the result |
originalDataSource | Object (SCIM resource) that provides the original data |
extensions | A list of Extensions associated to parameter originalDataSource . This helps to manipulate the transference of custom attributes values. |
replacementDataSource
nor originalDataSource
are changed after a call to this method InvalidAttributeValueException | When recursive traversal of replacementDataSource fails or if the rule of immutable attribute was not fulfilled |
|
inlinestatic |
Returns an object which is the result of incorporating the information found in the replacementDataSource
parameter to the information existing in originalDataSource
object by doing replacements. The transference of data follows these rules:
replacementDataSource
replacementDataSource
originalDataSource
is missing (null), the value coming from replacementDataSource
is kept replacementDataSource
, no existing data in the originalDataSource
is retained, that is, the replacement is not partial but thorough: it's not an item-by-item replacement replacementDataSource | Object with the information to be incorporated. Only non-null attributes of this o bject end up being transfered to the result |
originalDataSource | Object (SCIM resource) that provides the original data |
extensions | A list of Extensions associated to parameter originalDataSource . This helps to manipulate the transference of custom attributes values. |
replacementDataSource
nor originalDataSource
are changed after a call to this method InvalidAttributeValueException | When recursive traversal of replacementDataSource fails or if the rule of immutable attribute was not fulfilled |
|
staticprivate |
|
staticprivate |