Class Device
Object
se.curity.identityserver.sdk.attribute.MapAttributeValue
se.curity.identityserver.sdk.attribute.scim.v2.ComplexAttributeValue<Device>
se.curity.identityserver.sdk.attribute.scim.v2.extensions.Device
- All Implemented Interfaces:
Iterable<Attribute>,AttributeContainer<MapAttributeValue>,AttributeOrAttributeValue<AttributeValue>,AttributeValue
This class wraps
DeviceAttributes into a ComplexAttributeValue, allowing it
to be treated as part of an account (as multi-valued attribute).-
Field Summary
Fields inherited from class se.curity.identityserver.sdk.attribute.scim.v2.ComplexAttributeValue
PRIMARY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet this device represented asDeviceAttributesprotected DevicecopyOf(MapAttributeValue mapAttributeValue) Copies theDeviceAttributesfrom aMapAttributeValueobject to form a new Device object.Get the ID of the account this device belongs to.getAlias()Get the alias of this device.Get the attributes of this device.Get the ID of this device.Get the type of this device.Get the instant where this device expires.Get the external ID of this deviceGet the form factor of this device (e.g.getId()Get the (unique) ID of this device.getMeta()Get the (SCIM compatible) metadata of this device.Get the number of the device (alias forgetExternalId())getOwner()Get the owner (as in username) of this device.Get the schemas used in these device attributes.protected static <T> TnullOrOfType(Class<T> type, @Nullable Object object) static Devicestatic Deviceof(MapAttributeValue mapAttributeValue) static Deviceof(DeviceAttributes deviceAttributes) Creates a new Device object from a set ofDeviceAttributes.Methods inherited from class se.curity.identityserver.sdk.attribute.scim.v2.ComplexAttributeValue
isPrimaryMethods inherited from class se.curity.identityserver.sdk.attribute.MapAttributeValue
append, append, delete, equals, get, get, getAll, getAttributesByName, getMandatory, getValue, getValueWithAuthorities, getValueWithMetadata, hashCode, isEmpty, iterator, keys, map, map, map, mapEntries, mapNonRecursive, of, of, removeAttributes, removeNullAttributeValues, retainAttributes, size, stream, toString, with, withMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface se.curity.identityserver.sdk.attribute.AttributeContainer
contains, contains, getOptionalValue, getOptionalValue, removeAttribute, retainAttributeMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
Device
-
-
Method Details
-
of
Creates a new Device object from a set ofDeviceAttributes.- Parameters:
deviceAttributes- theDeviceAttributesto use when creating the new Device object- Returns:
- the new Device object
-
of
Creates a newDeviceobject from aMapAttributeValueafter wrapping that inDeviceAttributes.The values of the
MapAttributeValueshould be the public members ofDeviceAttributes(e.g.,DEVICE_ID,ACCOUNT_ID, etc.). Any unknown attributes will simply be ignored.- Parameters:
mapAttributeValue- a map of name/values pairs to use to create theDevice- Returns:
- the new Device object
-
of
Creates a newDeviceobject from an Iterable ofAttributeobjects.As the
Deviceobject is created, the attributes are wrapped in aDeviceAttributesobject. Consequently, the attributes should have the names that correspond to the public members ofDeviceAttributes(e.g.,DEVICE_ID,ACCOUNT_ID, etc.). Any unknown attributes will simply be ignored.- Parameters:
attributes- the attributes of the newDevice- Returns:
- a new Device object
-
copyOf
Copies theDeviceAttributesfrom aMapAttributeValueobject to form a new Device object.Any unknown attributes will simply be ignored. The prototypical usage of this method looks like this:
Device.copyOf(MapAttributeValue.of(DeviceAttributes.toMap()));
- Specified by:
copyOfin classComplexAttributeValue<Device>- Parameters:
mapAttributeValue- a map of name/values pairs to use to create theDevice- Returns:
- a new Device object consisting of a copy of the device-related attributes in the given map of attributes
-
asDeviceAttributes
Get this device represented asDeviceAttributes- Returns:
- this device represented as
DeviceAttributes
-
getId
Get the (unique) ID of this device.- Returns:
- the ID of this device
-
getExternalId
Get the external ID of this device- Returns:
- the external ID of this device
-
getMeta
Get the (SCIM compatible) metadata of this device.- Returns:
- the meta data of this device
-
getDeviceId
Get the ID of this device.- Returns:
- the ID of the device
-
getSchemas
Get the schemas used in these device attributes.- Returns:
- the schemas used in these device attributes
-
getAccountId
Get the ID of the account this device belongs to.- Returns:
- the account ID associated with this device.
-
getAlias
Get the alias of this device.- Returns:
- the alias of this device
-
getFormFactor
Get the form factor of this device (e.g. tablet, phone..)- Returns:
- the form factor of this device
-
getNumber
Get the number of the device (alias forgetExternalId())- Returns:
- the external ID of the device
-
getDeviceType
Get the type of this device.- Returns:
- the type of this device
-
getExpiresAt
Get the instant where this device expires.- Returns:
- the instant where this device expires
-
getOwner
Get the owner (as in username) of this device.- Returns:
- the owner of this device
-
getAttributes
Get the attributes of this device.- Returns:
- the attributes of this device
-
nullOrOfType
-