Class ExtensionService

java.lang.Object
io.jans.scim.service.scim2.ExtensionService

@ApplicationScoped public class ExtensionService extends Object
  • Constructor Details

    • ExtensionService

      public ExtensionService()
  • Method Details

    • 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 param ldapBackend, 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 passed
      val - The value of the field
      ldapBackend - 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)
      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 directory
      field - An ExtensionField
      strValues - 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)
    • updateMarkedAttributes

      @Asynchronous public void updateMarkedAttributes(@Observes UpdateScimExtendedAttributesEvent event)