Class ExtensionService

  • @ApplicationScoped
    public class ExtensionService
    extends Object
    • Constructor Detail

      • ExtensionService

        public ExtensionService()
    • Method Detail

      • 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
        field - The extension field associated to the value passed
        val - The value of the field
        ldapBackend - Whether the backend DB is LDAP or not
        Value transformed (kept as is if unrelated to DATEs)
      • 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.
        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
        List of opaque values