Class SyncopeJexlFunctions

java.lang.Object
org.apache.syncope.core.provisioning.api.jexl.SyncopeJexlFunctions
All Implemented Interfaces:
JexlFunctions

public class SyncopeJexlFunctions extends Object implements JexlFunctions
Utility functions for usage with JEXL engine.
  • Constructor Details

    • SyncopeJexlFunctions

      public SyncopeJexlFunctions()
  • Method Details

    • getNamespace

      public String getNamespace()
      Specified by:
      getNamespace in interface JexlFunctions
    • fullPath2Dn

      public String fullPath2Dn(String fullPath, String attr)
      Converts realm's full path into the equivalent DN. Example: /a/b/c becomes ou=c,ou=b,ou=a.
      Parameters:
      fullPath - realm's full path
      attr - attribute name for DN
      Returns:
      DN equivalent of the provided full path
    • fullPath2Dn

      public String fullPath2Dn(String fullPath, String attr, String prefix)
      Converts realm's full path into the equivalent DN. Example: /a/b/c becomes ,ou=c,ou=b,ou=a, when prefix is ","
      Parameters:
      fullPath - realm's full path
      attr - attribute name for DN
      prefix - result's prefix
      Returns:
      DN equivalent of the provided full path
    • connObjAttrValues

      public List<Object> connObjAttrValues(ConnectorObject connObj, String name)
      Extracts the values of the attribute with given name from the given connector object, or empty list if not found.
      Parameters:
      connObj - connector object
      name - attribute name
      Returns:
      the values of the attribute with given name from the given connector object, or empty list if not found
    • base64Encode

      public String base64Encode(byte[] value)
      Encodes the given byte array as Base64-encoded string.
      Parameters:
      value - byte array value
      Returns:
    • base64Decode

      public byte[] base64Decode(String value)
      Decodes the given string as byte array using Base64 encoding.
      Parameters:
      value - base64 string
      Returns: