java.lang.Object
com.sun.xml.wss.impl.policy.mls.Target
Direct Known Subclasses:
EncryptionTarget, SignatureTarget

public class Target extends Object
  • Field Details

    • TARGET_VALUE_SOAP_BODY

      protected static final String TARGET_VALUE_SOAP_BODY
      See Also:
    • TARGET_TYPE_VALUE_QNAME

      public static final String TARGET_TYPE_VALUE_QNAME
      type-identifier for qname Target Type
      See Also:
    • TARGET_TYPE_VALUE_XPATH

      public static final String TARGET_TYPE_VALUE_XPATH
      type-identifier for xpath Target Type
      See Also:
    • TARGET_TYPE_VALUE_URI

      public static final String TARGET_TYPE_VALUE_URI
      type-identifier for uri Target Type
      See Also:
    • ALL_MESSAGE_HEADERS

      public static final String ALL_MESSAGE_HEADERS
      All Message Headers targeted at ultimate receiver role should be integrity protected.
      See Also:
    • BODY

      public static final String BODY
      See Also:
    • BODY1_2

      public static final String BODY1_2
      See Also:
    • BODY_QNAME

      public static final QName BODY_QNAME
    • SIGNATURE_CONFIRMATION

      public static final QName SIGNATURE_CONFIRMATION
  • Constructor Details

    • 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 Details

    • 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()