Class ControlDecorator<E extends Control>

    • Field Detail

      • valueLength

        protected int valueLength
        The encoded value length
      • value

        protected byte[] value
        The encoded value of the control.
    • Constructor Detail

      • ControlDecorator

        public ControlDecorator​(LdapApiService codec,
                                E decoratedControl)
        Creates a ControlDecorator to codec enable it.
        Parameters:
        codec - The Ldap service to use
        decoratedControl - The Control to decorate.
    • Method Detail

      • getDecorated

        public E getDecorated()
        Gets the object being decorated by this IDecorator.
        Specified by:
        getDecorated in interface Decorator<E extends Control>
        Returns:
        The decorated object
      • setDecorated

        public void setDecorated​(E decorated)
        Set the control to be decorated.
        Parameters:
        decorated - The decorated control
      • getCodecService

        public LdapApiService getCodecService()
        Gets the codec service responsible for managing the encoding and decoding of the decorated objects.
        Specified by:
        getCodecService in interface Decorator<E extends Control>
        Returns:
        the codec service
      • getOid

        public String getOid()
        Get the OID
        Specified by:
        getOid in interface Control
        Returns:
        A string which represent the control oid
      • hasValue

        public boolean hasValue()
        Checks to see if a value is set for this CodecControl.
        Specified by:
        hasValue in interface CodecControl<E extends Control>
        Returns:
        true, if this control has a value, false otherwise
      • getValue

        public byte[] getValue()
        Get the control value
        Specified by:
        getValue in interface CodecControl<E extends Control>
        Returns:
        The control value
      • setValue

        public void setValue​(byte[] value)
        Set the encoded control value
        Specified by:
        setValue in interface CodecControl<E extends Control>
        Parameters:
        value - The encoded control value to store
      • isCritical

        public boolean isCritical()
        Get the criticality
        Specified by:
        isCritical in interface Control
        Returns:
        true if the criticality flag is true.
      • setCritical

        public void setCritical​(boolean criticality)
        Set the criticality
        Specified by:
        setCritical in interface Control
        Parameters:
        criticality - The criticality value
      • toString

        public String toString()
        Return a String representing a Control
        Overrides:
        toString in class Object