Class DsmlControl<C extends Control>

    • Constructor Detail

      • DsmlControl

        public DsmlControl​(LdapApiService codec,
                           C decorated)
        Creates a new instance of DsmlControl
        Parameters:
        codec - The Codec used to encode/decode the Control
        decorated - The decorated control
    • Method Detail

      • hasValue

        public boolean hasValue()
        Checks to see if this DSML control decorator has a value.
        Returns:
        true if the DSML control has a value, false otherwise.
      • getValue

        public byte[] getValue()
        Gets the control value
        Returns:
        The control value
      • setValue

        public void setValue​(byte[] value)
        Sets the encoded control value
        Parameters:
        value - The encoded control value to store
      • isCritical

        public boolean isCritical()
        Tells if the control is critical or not.
        Specified by:
        isCritical in interface Control
        Returns:
        true if the control is critical, false otherwise
      • setCritical

        public void setCritical​(boolean isCritical)
        Sets the critical flag which determines whether or not this control is critical for the correct operation of a request or response message. The default for this value should be false.
        Specified by:
        setCritical in interface Control
        Parameters:
        isCritical - true if the control is critical false otherwise.
      • toDsml

        public org.dom4j.Element toDsml​(org.dom4j.Element root)
        Converts the request/reponse to its XML representation in the DSMLv2 format
        Specified by:
        toDsml in interface DsmlDecorator<C extends Control>
        Parameters:
        root - the root dom4j Element
        Returns:
        the dom4j Element corresponding to the entry.