Class Controls

java.lang.Object
org.forgerock.opendj.ldap.controls.Controls

public final class Controls extends Object
Utility class to resolve controls OID from aliases.
  • Method Details

    • getRequestControlOidForAliasOrNull

      public static String getRequestControlOidForAliasOrNull(String alias)
      Returns the control OID associated with the provided control "friendly name" alias or null if no OID has been found.
      Parameters:
      alias - Friendly name alias to resolve
      Returns:
      The control OID associated with the provided control "friendly name" alias or null if no OID has been found.
    • getRequestControlAliasForOid

      public static String getRequestControlAliasForOid(String oid)
      Returns the control friendly name alias associated with the provided control OID or OID if no alias has been found.
      Parameters:
      oid - The control OID to resolve
      Returns:
      The control friendly name alias associated with the provided control OID or OID if no alias has been found.
    • newRequestControlDecoderWithoutValue

      public static <C extends Control> ControlDecoder<C> newRequestControlDecoderWithoutValue(Class<C> controlClass, String oid, String alias, Function<Control,C> decoder)
      Creates a new control decoder for request controls which does not expect to find a value for the decoded control.
      Type Parameters:
      C - the type of the decoded control
      Parameters:
      controlClass - the returned control class
      oid - the decoded control OID
      alias - the decoded control alias
      decoder - a function that can decode the control into the appropriate type
      Returns:
      the decoded control having the specified type
    • newRequestControlDecoderWithValue

      public static <C extends Control> ControlDecoder<C> newRequestControlDecoderWithValue(Class<C> controlClass, String oid, String alias, BiFunction<Control,DecodeOptions,C,IOException> decoder)
      Creates a new control decoder for request controls which expects to find a value for the decoded control.
      Type Parameters:
      C - the type of the decoded control
      Parameters:
      controlClass - the returned control class
      oid - the decoded control OID
      alias - the decoded control alias
      decoder - a function that can decode the control into the appropriate type
      Returns:
      the decoded control having the specified type
    • newResponseControlDecoderWithValue

      public static <C extends Control> ControlDecoder<C> newResponseControlDecoderWithValue(Class<C> controlClass, String oid, String alias, BiFunction<Control,DecodeOptions,C,IOException> decoder)
      Creates a new control decoder for response controls which expects to find a value for the decoded control.
      Type Parameters:
      C - the type of the decoded control
      Parameters:
      controlClass - the returned control class
      oid - the decoded control OID
      alias - the decoded control alias
      decoder - a function that can decode the control into the appropriate type
      Returns:
      the decoded control having the specified type