Package io.jans.scim.model.scim2
Class BaseScimResource
- java.lang.Object
-
- io.jans.scim.model.scim2.BaseScimResource
-
- Direct Known Subclasses:
Fido2DeviceResource
,FidoDeviceResource
,GroupResource
,ResourceType
,SchemaResource
,ServiceProviderConfig
,UserResource
public class BaseScimResource extends Object
This class represents the root hierarchy of SCIM resources. All of them: user, group, etc. are subclasses of this class.
-
-
Constructor Summary
Constructors Constructor Description BaseScimResource()
Constructs a basic SCIM resource with all its attributes unassigned
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCustomAttributes(CustomAttributes customAttributes)
Adds the custom attributes contained in theCustomAttributes
instance passed to this method.void
addCustomAttributes(String uri, Map<String,Object> map)
Replaces the custom attributes belonging to the resource extension identified by theuri
passed as parameter with the attribute/value pairs supplied in theMap
.Map<String,Object>
getCustomAttributes()
Retrieves all custom attributes found in this resource object.CustomAttributes
getCustomAttributes(String uri)
Retrieves the custom attributes found in this resource object associated to theuri
supplied.String
getExternalId()
String
getId()
Meta
getMeta()
Set<String>
getSchemas()
void
setExternalId(String externalId)
void
setId(String id)
void
setMeta(Meta meta)
void
setSchemas(Set<String> schemas)
-
-
-
Method Detail
-
addCustomAttributes
public void addCustomAttributes(String uri, Map<String,Object> map)
Replaces the custom attributes belonging to the resource extension identified by theuri
passed as parameter with the attribute/value pairs supplied in theMap
. Developers are highly encouraged not to use this method butaddCustomAttributes(CustomAttributes)
instead which adds type-safety.Note that this method does not apply any sort of validation. Whether the
uri
and attributes are recognized or the values are consistent with data types registered in the Server, is something that is performed only when the resource is passed in a service method invocation.- Parameters:
uri
- A string with URI that identifies an extensionmap
- A Map holding attribute names (Strings) and values (Objects).
-
addCustomAttributes
public void addCustomAttributes(CustomAttributes customAttributes)
Adds the custom attributes contained in theCustomAttributes
instance passed to this method. All previously added attributes are replaced if they are linked to the sameuri
thatcustomAttributes
parameter is associated to.Note that this method does not apply any sort of validation. Whether the
uri
and attributes are recognized or the values are consistent with data types registered in the Server, is something that is performed only when the resource is passed in a service method invocation.- Parameters:
customAttributes
- An object that comprised of attribute/value pairs
-
getCustomAttributes
public Map<String,Object> getCustomAttributes()
Retrieves all custom attributes found in this resource object. The attributes are structured hierarchically in aMap
where they can be looked up using theuri
to which the attributes belong to.Developers are highly encouraged not to use this method but
getCustomAttributes(String)
instead which adds type-safety.- Returns:
- A Map with all custom attributes
-
getCustomAttributes
public CustomAttributes getCustomAttributes(String uri)
Retrieves the custom attributes found in this resource object associated to theuri
supplied.- Parameters:
uri
- A String value representing a URI- Returns:
- A
CustomAttributes
instance that allows developers to inspect attributes and values in a type-safe manner.
-
getId
public String getId()
-
setId
public void setId(String id)
-
getExternalId
public String getExternalId()
-
setExternalId
public void setExternalId(String externalId)
-
getMeta
public Meta getMeta()
-
setMeta
public void setMeta(Meta meta)
-
-