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 voidaddCustomAttributes(CustomAttributes customAttributes)Adds the custom attributes contained in theCustomAttributesinstance passed to this method.voidaddCustomAttributes(String uri, Map<String,Object> map)Replaces the custom attributes belonging to the resource extension identified by theuripassed as parameter with the attribute/value pairs supplied in theMap.Map<String,Object>getCustomAttributes()Retrieves all custom attributes found in this resource object.CustomAttributesgetCustomAttributes(String uri)Retrieves the custom attributes found in this resource object associated to theurisupplied.StringgetExternalId()StringgetId()MetagetMeta()Set<String>getSchemas()voidsetExternalId(String externalId)voidsetId(String id)voidsetMeta(Meta meta)voidsetSchemas(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 theuripassed 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
uriand 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 theCustomAttributesinstance passed to this method. All previously added attributes are replaced if they are linked to the sameurithatcustomAttributesparameter is associated to.Note that this method does not apply any sort of validation. Whether the
uriand 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 aMapwhere they can be looked up using theurito 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 theurisupplied.- Parameters:
uri- A String value representing a URI- Returns:
- A
CustomAttributesinstance 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)
-
-