Package io.jans.scim.service.scim2
Class ExtensionService
- java.lang.Object
-
- io.jans.scim.service.scim2.ExtensionService
-
@ApplicationScoped public class ExtensionService extends Object
-
-
Constructor Summary
Constructors Constructor Description ExtensionService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Object>
convertValues(ExtensionField field, String[] strValues, boolean ldapBackend)
Builds a list of objects based on the supplied String values passed and the extension field passed.Extension
extensionOfAttribute(Class<? extends BaseScimResource> cls, String attribute)
Object
getAttributeValue(ExtensionField field, Object val, boolean ldapBackend)
Transforms the value passed in case it is of type DATE.List<Object>
getAttributeValues(ExtensionField field, Collection valuesHolder, boolean ldapBackend)
ExtensionField
getFieldOfExtendedAttribute(Class<? extends BaseScimResource> cls, String attribute)
List<Extension>
getResourceExtensions(Class<? extends BaseScimResource> cls)
List<String>
getUrnsOfExtensions(Class<? extends BaseScimResource> cls)
-
-
-
Method Detail
-
getResourceExtensions
public List<Extension> getResourceExtensions(Class<? extends BaseScimResource> cls)
-
getUrnsOfExtensions
public List<String> getUrnsOfExtensions(Class<? extends BaseScimResource> cls)
-
getAttributeValue
public Object getAttributeValue(ExtensionField field, Object val, boolean ldapBackend)
Transforms the value passed in case it is of type DATE. Depending on the paramldapBackend
, the value will be a generalized time string, otherwise an ISO-like date with no offset or time zone- Parameters:
field
- The extension field associated to the value passedval
- The value of the fieldldapBackend
- Whether the backend DB is LDAP or not- Returns:
- Value transformed (kept as is if unrelated to DATEs)
-
getAttributeValues
public List<Object> getAttributeValues(ExtensionField field, Collection valuesHolder, boolean ldapBackend)
-
convertValues
public List<Object> convertValues(ExtensionField field, String[] strValues, boolean ldapBackend)
Builds a list of objects based on the supplied String values passed and the extension field passed. The strings are converted according to the type asociated to the field: for STRING the value is left as is; for DATE the value is converted to a String following the ISO date format; for NUMERIC an Integer/Double is created from the value supplied.- Parameters:
ldapBackend
- Whether the underlying database is an ldap directoryfield
- An ExtensionFieldstrValues
- A non-empty String array with the values associated to the field passed. These values are coming from LDAP- Returns:
- List of opaque values
-
extensionOfAttribute
public Extension extensionOfAttribute(Class<? extends BaseScimResource> cls, String attribute)
-
getFieldOfExtendedAttribute
public ExtensionField getFieldOfExtendedAttribute(Class<? extends BaseScimResource> cls, String attribute)
-
-