Class Target

    • Constructor Detail

      • Target

        public Target()
        Default constructor When used, it creates a default Target of type qname and a value of {http://schemas.xmlsoap.org/soap/envelope/}Body
      • Target

        public Target​(String type,
                      String value)
        Constructor
        Parameters:
        type - the type of the Target (should be one of TARGET_TYPE_VALUE_QNAME, TARGET_TYPE_VALUE_XPATH, TARGET_TYPE_VALUE_URI)
        value - the value of the Target
      • Target

        public Target​(String type,
                      String value,
                      boolean contentOnly)
        Constructor
        Parameters:
        type - the type of the Target (should be one of TARGET_TYPE_VALUE_QNAME, TARGET_TYPE_VALUE_XPATH, TARGET_TYPE_VALUE_URI)
        value - the value of the Target
        contentOnly - the content-only flag. This flag is used to decide whether the whole Target or only its Markup(content) should be Encrypted.
      • Target

        public Target​(String type,
                      String value,
                      boolean contentOnly,
                      boolean enforce)
        Constructor
        Parameters:
        type - the type of the Target (should be one of TARGET_TYPE_VALUE_QNAME, TARGET_TYPE_VALUE_XPATH, TARGET_TYPE_VALUE_URI)
        value - the value of the Target
        contentOnly - the content-only flag. This flag is used to decide whether the whole Target or only its Markup(content) should be Encrypted.
        enforce - when set to false, will cause the enclosing policy (SignaturePolicy/EncryptionPolicy) to consider the presence of this Target reference as optional, while verifying the Policy on the Receiver side.
    • Method Detail

      • setEnforce

        public void setEnforce​(boolean enforce)
        set the enforcement flag, used when verifying Security on an inbound message.
        Parameters:
        enforce - if set to True indicates that this Target is a compulsary target under the Policy in which it appears.
      • getEnforce

        public boolean getEnforce()
        Returns:
        true if this Target appearing under a Policy should be enforced, false if it is optional.
      • isSOAPHeadersOnly

        public void isSOAPHeadersOnly​(boolean headersOnly)
        Parameters:
        headersOnly - is set to true, indicates only headers should be processed by this target To be set by Policy
      • isSOAPHeadersOnly

        public boolean isSOAPHeadersOnly()
        Returns:
        true if only the headers should be processed, false otherwise default is false
      • isBSP

        public void isBSP​(boolean flag)
      • isBSP

        public boolean isBSP()
      • getType

        public String getType()
        Returns:
        the type of the Target
      • setType

        public void setType​(String type)
        set the type of the Target
        Parameters:
        type - the type of the Target
      • getValue

        public String getValue()
        Returns:
        the value of the Target
      • setValue

        public void setValue​(String value)
        set the value of the Target
        Parameters:
        value - the value of the Target
      • setContentOnly

        public void setContentOnly​(boolean contentOnly)
        set the contentOnly flag on the Target
        Parameters:
        contentOnly - the boolean flag indicating content-only when set to true.
      • getContentOnly

        public boolean getContentOnly()
        Returns:
        true if the contentOnly flag on the Target was set, false otherwise
      • convertToXPATH

        public String convertToXPATH()
        Returns:
        the Target value as a String representing an XPath expression
      • setQName

        public void setQName​(QName qname)
        Set the Target QName.
      • getQName

        public QName getQName()
        Returns:
        the QName for the Target
      • isAttachment

        public boolean isAttachment()
        Returns:
        true if this Target represents an Attachment
      • getXPathVersion

        public String getXPathVersion()
        returns xpath version to be used if the Target Type is XPATH.
      • setXPathVersion

        public void setXPathVersion​(String version)
        sets xpath version to be used if the Target Type is XPATH.
      • setPolicyQName

        public void setPolicyQName​(QName policyQName)
      • getPolicyQName

        public QName getPolicyQName()