gluu
|
公開メンバ関数 | |
ResourceValidator (BaseScimResource resource, List< Extension > extensions) | |
void | validateRequiredAttributes () throws SCIMException |
void | validateValidableAttributes () throws SCIMException |
void | validateCanonicalizedAttributes () throws SCIMException |
void | validateSchemasAttribute () throws SCIMException |
void | validateExtendedAttributes () throws SCIMException |
非公開メンバ関数 | |
void | validateDataTypeExtendedAttr (Extension extension, String attribute, Object value) throws SCIMException |
非公開変数類 | |
Logger | log = LogManager.getLogger(getClass()) |
BaseScimResource | resource |
Class<? extends BaseScimResource > | resourceClass |
List< Extension > | extensions |
静的非公開変数類 | |
static final String | REQUIRED_ATTR_NOTFOUND ="Required attribute %s not found" |
static final String | WRONG_SCHEMAS_ATTR ="Wrong value of schemas attribute" |
static final String | UNKNOWN_EXTENSION ="Extension %s not recognized" |
static final String | ATTR_NOT_RECOGNIZED ="Attribute %s not part of schema %s" |
static final String | ERROR_PARSING_EXTENDED ="Error parsing extended attributes" |
static final String | ATTR_VALIDATION_FAILED ="Unexpected value for attribute %s" |
This class provides static methods to validate whether a (SCIM) resource instance fulfills certain characteristics - regarded to formatting, mutability, uniqueness, etc. This allows to adhere more closely to SCIM spec
|
inline |
Construct a instance of this class
resource | A SCIM resource object (the target of validation) |
extensions | List of extensions associated to this resource |
|
inline |
Inspects the resource passed in the constructor and for every attribute annotated with a non-empty collection of canonical values, it checks whether the attribute value matches any of the canonical values supplied.
This method should be called after a successful call to validateRequiredAttributes().
SCIMException | When a validation does not pass (there is no match for any of the attributes inspected) |
|
inlineprivate |
Validates if an attribute part of an extension is consistent with an arbitrary value passed.
extension | Extension where the attribute exists |
attribute | The name of the attribute inside the extension |
value | The value to be checked (never null) |
SCIMException | When the value is inconsistent, or the attribute does not belong to the extension. As an example, consider an attribute whose type is "NUMERIC": if the value passed was "Hi", this is clearly an error. |
|
inline |
Inspects the resource passed in the constructor and for every extended attribute (see BaseScimResource#getCustomAttributes(), the attribute's value is checked to see if it complies with the data type it is supposed to belong to. This information is obtained from the list of Extension
s passed in the constructor (every ExtensionField has an associated type.
When an attribute is multi-valued, every single item inside the collection is validated.
SCIMException | When any of the validations do not pass or an attribute seems not to be part of a known schema. |
|
inline |
Inspects the resource passed in the constructor and determines if the attributes annotated as required in the Class
of the resource were all provided (not null).
If an attribute was marked as "required" and is part of a multi-valued complex attribute, no validation takes place if the involved list is null or empty.
SCIMException | When a validation does not pass (there is a missing value in a required attribute) |
|
inline |
Inspects the schemas attribute of the resource passed in the constructor and checks the default schema urn
associated to the resource type is present in the list. If some of the urn
s part of the Extension
s passed in the constructor are contained in the list, the validation is also successful.
This method should be called after a successful call to validateRequiredAttributes().
SCIMException | If there is no schemas in this resource or if some of the urn s there are not known. |
|
inline |
Inspects the resource passed in the constructor and applies validations for every attribute annotated with Validator. Validations are of different nature as seenhere.
SCIMException | When a validation does not pass (the apply method returns false) |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
private |
|
private |
|
staticprivate |
|
private |
|
private |
|
staticprivate |
|
staticprivate |