Package com.unboundid.scim2.common
Interface ScimResource
-
- All Known Implementing Classes:
AccountState
,BaseScimResource
,Consent
,ConsentHistory
,EmailValidationRequest
,ErrorResponse
,ExternalIdentity
,GenericScimResource
,GroupResource
,ListResponse
,PasswordQualityRequirementResponse
,PasswordUpdateRequest
,PatchRequest
,ResourceTypeResource
,SchemaResource
,SearchRequest
,ServiceProviderConfigResource
,Session
,TelephonyValidationRequest
,TOTPSecretRegistrationRequest
,UserResource
public interface ScimResource
This class represents the core interface for all SCIM objects. This interface helps ensure that all SCIM resources contain the following properties:- A
schemas
field containing a list of URIs that represent the type of the SCIM resource. - An
id
field representing a unique identifier for the resource. This is typically inUUID
form. - A
Meta
attribute that stores metadata relating to the SCIM resource, such as the time the resource was created and last updated. - An
externalID
field. This is an optional field whose meaning is determined by a SCIM client. This is particularly useful for provisioning use cases, where a client is importing users from another system but still wants to store a resource's old unique ID in the new system. TheexternalID
field can later be used by the client to search for resources on the new SCIM endpoints by referencing their old IDs.
BaseScimResource
andGenericScimResource
classes. In general, a SCIM resource should be represented as a BaseScimResource if a well-defined schema is known ahead of time, and a dedicated Java object is desired. Alternatively, a SCIM resource should be represented as a GenericScimResource if it is easier to work with a class that is a wrapper for a JSON object. See the class-level documentation of these subclasses for more information.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description GenericScimResource
asGenericScimResource()
Returns the GenericScimResource representation of this ScimResource.String
getExternalId()
Gets the objects external id.String
getId()
Gets the id of the object.Meta
getMeta()
Gets metadata about the object.Collection<String>
getSchemaUrns()
Gets the schema urns for this object.void
setExternalId(String externalId)
Sets the object's external id.void
setId(String id)
Sets the id of the object.void
setMeta(Meta meta)
Sets metadata for the object.void
setSchemaUrns(String schemaUrn, String... schemaUrns)
An alternate version ofsetSchemaUrns(Collection)
.void
setSchemaUrns(Collection<String> schemaUrns)
Sets the schema urns for this object.
-
-
-
Method Detail
-
getMeta
Meta getMeta()
Gets metadata about the object.- Returns:
Meta
containing metadata about the object.
-
setMeta
void setMeta(Meta meta)
Sets metadata for the object.- Parameters:
meta
-Meta
containing metadata for the object.
-
getExternalId
String getExternalId()
Gets the objects external id.- Returns:
- The external id of the object.
-
setExternalId
void setExternalId(String externalId)
Sets the object's external id.- Parameters:
externalId
- The external id of the object.
-
getSchemaUrns
Collection<String> getSchemaUrns()
Gets the schema urns for this object. This includes the one for the class that extends this class (taken from the annotation), as well as any that are present in the extensions.- Returns:
- the schema urns for this object.
-
setSchemaUrns
void setSchemaUrns(Collection<String> schemaUrns)
Sets the schema urns for this object. This set should contain all schema urns including the one for this object and all extensions. The value must not benull
.- Parameters:
schemaUrns
- A Collection containing the schema urns for this object.
-
setSchemaUrns
void setSchemaUrns(String schemaUrn, String... schemaUrns)
An alternate version ofsetSchemaUrns(Collection)
.- Parameters:
schemaUrn
- A schema URN that will be listed first. This must not benull
.schemaUrns
- An optional parameter for additional schema URNs. Anynull
values will be ignored.
-
asGenericScimResource
GenericScimResource asGenericScimResource()
Returns the GenericScimResource representation of this ScimResource. If this ScimResource is already a GenericScimResource, this same instance will be returned.- Returns:
- The GenericScimResource representation of this ScimResource.
-
-