Package com.sun.xml.wss.impl.policy.mls
Class Target
- java.lang.Object
-
- com.sun.xml.wss.impl.policy.mls.Target
-
- Direct Known Subclasses:
EncryptionTarget
,SignatureTarget
public class Target extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
ALL_MESSAGE_HEADERS
All Message Headers targeted at ultimate receiver role should be integrity protected.static String
BODY
static QName
BODY_QNAME
static String
BODY1_2
static QName
SIGNATURE_CONFIRMATION
static String
TARGET_TYPE_VALUE_QNAME
type-identifier for qname Target Typestatic String
TARGET_TYPE_VALUE_URI
type-identifier for uri Target Typestatic String
TARGET_TYPE_VALUE_XPATH
type-identifier for xpath Target Typeprotected static String
TARGET_VALUE_SOAP_BODY
-
Constructor Summary
Constructors Constructor Description Target()
Default constructor When used, it creates a default Target of typeqname
and a value of {http://schemas.xmlsoap.org/soap/envelope/}BodyTarget(String type, String value)
ConstructorTarget(String type, String value, boolean contentOnly)
ConstructorTarget(String type, String value, boolean contentOnly, boolean enforce)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
convertToXPATH()
boolean
getContentOnly()
boolean
getEnforce()
QName
getPolicyQName()
QName
getQName()
String
getType()
String
getValue()
String
getXPathVersion()
returns xpath version to be used if the Target Type is XPATH.boolean
isAttachment()
boolean
isBSP()
void
isBSP(boolean flag)
boolean
isSOAPHeadersOnly()
void
isSOAPHeadersOnly(boolean headersOnly)
void
setContentOnly(boolean contentOnly)
set the contentOnly flag on the Targetvoid
setEnforce(boolean enforce)
set the enforcement flag, used when verifying Security on an inbound message.void
setPolicyQName(QName policyQName)
void
setQName(QName qname)
Set the Target QName.void
setType(String type)
set the type of the Targetvoid
setValue(String value)
set the value of the Targetvoid
setXPathVersion(String version)
sets xpath version to be used if the Target Type is XPATH.
-
-
-
Field Detail
-
TARGET_VALUE_SOAP_BODY
protected static final String TARGET_VALUE_SOAP_BODY
- See Also:
- Constant Field Values
-
TARGET_TYPE_VALUE_QNAME
public static final String TARGET_TYPE_VALUE_QNAME
type-identifier for qname Target Type- See Also:
- Constant Field Values
-
TARGET_TYPE_VALUE_XPATH
public static final String TARGET_TYPE_VALUE_XPATH
type-identifier for xpath Target Type- See Also:
- Constant Field Values
-
TARGET_TYPE_VALUE_URI
public static final String TARGET_TYPE_VALUE_URI
type-identifier for uri Target Type- See Also:
- Constant Field Values
-
ALL_MESSAGE_HEADERS
public static final String ALL_MESSAGE_HEADERS
All Message Headers targeted at ultimate receiver role should be integrity protected.- See Also:
- Constant Field Values
-
BODY
public static final String BODY
- See Also:
- Constant Field Values
-
BODY1_2
public static final String BODY1_2
- See Also:
- Constant Field Values
-
BODY_QNAME
public static final QName BODY_QNAME
-
SIGNATURE_CONFIRMATION
public static final QName SIGNATURE_CONFIRMATION
-
-
Constructor Detail
-
Target
public Target()
Default constructor When used, it creates a default Target of typeqname
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 TargetcontentOnly
- 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 TargetcontentOnly
- 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()
-
-