public class Extension extends Object
For more detailed information please look at the SCIM core schema 2.0, section 4
| Modifier and Type | Class and Description |
|---|---|
static class |
Extension.Field
This class represents a field of an extension with its type and value.
|
| Modifier | Constructor and Description |
|---|---|
protected |
Extension()
Default constructor for Jackson
|
|
Extension(String urn)
Constructs an extension with the given urn.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addOrUpdateField(String fieldName,
BigDecimal value)
Adds or updates the field specified by the given field name with the given value.
|
void |
addOrUpdateField(String fieldName,
BigInteger value)
Adds or updates the field specified by the given field name with the given value.
|
void |
addOrUpdateField(String fieldName,
Boolean value)
Adds or updates the field specified by the given field name with the given value.
|
void |
addOrUpdateField(String fieldName,
ByteBuffer value)
Adds or updates the field specified by the given field name with the given value.
|
void |
addOrUpdateField(String fieldName,
Date value)
Adds or updates the field specified by the given field name with the given value.
|
void |
addOrUpdateField(String fieldName,
String value)
Adds or updates the field specified by the given field name with the given value.
|
<T> void |
addOrUpdateField(String fieldName,
T value,
ExtensionFieldType<T> type)
Adds or updates the field specified by the given field name with the given value of the given type.
|
void |
addOrUpdateField(String fieldName,
URI value)
Adds or updates the field specified by the given field name with the given value.
|
boolean |
equals(Object obj) |
Map<String,Extension.Field> |
getAllFields()
Provides a
Map containing the entries of the extension. |
<T> T |
getField(String field,
ExtensionFieldType<T> extensionFieldType)
Return the value for the field with a given name and type.
|
String |
getUrn()
Returns the URN of this extension.
|
int |
hashCode() |
boolean |
isFieldPresent(String field)
Checks if the given field is present in this extension because not every field is mandatory (according to scim
2.0 spec).
|
protected Extension()
public Extension(String urn)
urn - the urn of the extensionpublic String getUrn()
public <T> T getField(String field, ExtensionFieldType<T> extensionFieldType)
field - The name of the field to retrieve the value of.extensionFieldType - The type of the field.NoSuchElementException - if this schema does not contain a field of the given name.IllegalArgumentException - if the given field is null or an empty string or if the extensionFieldType is null.public void addOrUpdateField(String fieldName, String value)
fieldName - the field namevalue - the new valuepublic void addOrUpdateField(String fieldName, Boolean value)
fieldName - the field namevalue - the new valuepublic void addOrUpdateField(String fieldName, ByteBuffer value)
fieldName - the field namevalue - the new valuepublic void addOrUpdateField(String fieldName, BigInteger value)
fieldName - the field namevalue - the new valuepublic void addOrUpdateField(String fieldName, BigDecimal value)
fieldName - the field namevalue - the new valuepublic void addOrUpdateField(String fieldName, Date value)
fieldName - the field namevalue - the new valuepublic void addOrUpdateField(String fieldName, URI value)
fieldName - the field namevalue - the new valuepublic <T> void addOrUpdateField(String fieldName, T value, ExtensionFieldType<T> type)
fieldName - the field namevalue - the new valuetype - the scim type of the fieldpublic Map<String,Extension.Field> getAllFields()
public boolean isFieldPresent(String field)
field - Name of the field to checkCopyright © 2013. All Rights Reserved.