com.sun.xml.wss.impl.policy.mls
Class Target

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

public class Target
extends java.lang.Object


Field Summary
static java.lang.String BODY
           
static java.lang.String BODY1_2
           
static java.lang.String TARGET_TYPE_VALUE_QNAME
          type-identifier for qname Target Type
static java.lang.String TARGET_TYPE_VALUE_URI
          type-identifier for uri Target Type
static java.lang.String TARGET_TYPE_VALUE_XPATH
          type-identifier for xpath Target Type
 
Constructor Summary
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(java.lang.String type, java.lang.String value)
          Constructor
Target(java.lang.String type, java.lang.String value, boolean contentOnly)
          Constructor
Target(java.lang.String type, java.lang.String value, boolean contentOnly, boolean enforce)
          Constructor
 
Method Summary
 java.lang.String convertToXPATH()
           
 boolean getContentOnly()
           
 boolean getEnforce()
           
 javax.xml.namespace.QName getQName()
           
 java.lang.String getType()
           
 java.lang.String getValue()
           
 boolean isAttachment()
           
 boolean isBSP()
           
 void isBSP(boolean flag)
           
 void setContentOnly(boolean contentOnly)
          set the contentOnly flag on the Target
 void setEnforce(boolean enforce)
          set the enforcement flag, used when verifying Security on an inbound message.
 void setType(java.lang.String type)
          set the type of the Target
 void setValue(java.lang.String value)
          set the value of the Target
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TARGET_TYPE_VALUE_QNAME

public static final java.lang.String TARGET_TYPE_VALUE_QNAME
type-identifier for qname Target Type

See Also:
Constant Field Values

TARGET_TYPE_VALUE_XPATH

public static final java.lang.String TARGET_TYPE_VALUE_XPATH
type-identifier for xpath Target Type

See Also:
Constant Field Values

TARGET_TYPE_VALUE_URI

public static final java.lang.String TARGET_TYPE_VALUE_URI
type-identifier for uri Target Type

See Also:
Constant Field Values

BODY

public static final java.lang.String BODY
See Also:
Constant Field Values

BODY1_2

public static final java.lang.String BODY1_2
See Also:
Constant Field Values
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(java.lang.String type,
              java.lang.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(java.lang.String type,
              java.lang.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(java.lang.String type,
              java.lang.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.

isBSP

public void isBSP(boolean flag)

isBSP

public boolean isBSP()

getType

public java.lang.String getType()
Returns:
the type of the Target

setType

public void setType(java.lang.String type)
set the type of the Target

Parameters:
type - the type of the Target

getValue

public java.lang.String getValue()
Returns:
the value of the Target

setValue

public void setValue(java.lang.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 java.lang.String convertToXPATH()
Returns:
the Target value as a String representing an XPath expression

getQName

public javax.xml.namespace.QName getQName()
Returns:
the QName for the Target

isAttachment

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


Copyright ? 2005 Sun Microsystems, Inc. All Rights Reserved.