com.sun.xml.ws.security.trust.impl.wssx.elements
Class BinarySecretImpl

java.lang.Object
  extended by com.sun.xml.ws.security.trust.impl.wssx.bindings.BinarySecretType
      extended by com.sun.xml.ws.security.trust.impl.wssx.elements.BinarySecretImpl
All Implemented Interfaces:
BinarySecret

public class BinarySecretImpl
extends com.sun.xml.ws.security.trust.impl.wssx.bindings.BinarySecretType
implements BinarySecret


Field Summary
 
Fields inherited from class com.sun.xml.ws.security.trust.impl.wssx.bindings.BinarySecretType
type, value
 
Fields inherited from interface com.sun.xml.ws.security.trust.elements.BinarySecret
ASYMMETRIC_KEY_TYPE, NONCE_KEY_TYPE, SYMMETRIC_KEY_TYPE
 
Constructor Summary
BinarySecretImpl(com.sun.xml.ws.security.trust.impl.wssx.bindings.BinarySecretType bsType)
           
BinarySecretImpl(byte[] rawValue, java.lang.String type)
           
 
Method Summary
static com.sun.xml.ws.security.trust.impl.wssx.bindings.BinarySecretType fromElement(org.w3c.dom.Element element)
          Constructs a BinarySecret element from an existing XML block.
 byte[] getRawValue()
          Gets the decoded value or the raw bytes of the binary secret.
 java.lang.String getTextValue()
          Gets the encoded value of the binary secret.
 void setRawValue(byte[] rawText)
          Sets the value of the binary secret as raw bytes.
 void setTextValue(java.lang.String encodedText)
          Sets the value of the Binary Secret element.
 
Methods inherited from class com.sun.xml.ws.security.trust.impl.wssx.bindings.BinarySecretType
getOtherAttributes, getType, getValue, setType, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sun.xml.ws.security.trust.elements.BinarySecret
getOtherAttributes, getType, setType
 

Constructor Detail

BinarySecretImpl

public BinarySecretImpl(byte[] rawValue,
                        java.lang.String type)

BinarySecretImpl

public BinarySecretImpl(com.sun.xml.ws.security.trust.impl.wssx.bindings.BinarySecretType bsType)
Method Detail

fromElement

public static com.sun.xml.ws.security.trust.impl.wssx.bindings.BinarySecretType fromElement(org.w3c.dom.Element element)
                                                                                     throws WSTrustException
Constructs a BinarySecret element from an existing XML block.

Parameters:
lifetimeElement - A org.w3c.dom.Element representing DOM tree for BinarySecret object.
Throws:
WSTrustException - if it could not process the org.w3c.dom.Element properly, implying that there is an error in the sender or in the element definition.

getRawValue

public byte[] getRawValue()
Description copied from interface: BinarySecret
Gets the decoded value or the raw bytes of the binary secret.

Specified by:
getRawValue in interface BinarySecret
Returns:
byte[]

getTextValue

public java.lang.String getTextValue()
Description copied from interface: BinarySecret
Gets the encoded value of the binary secret. This represents the base64 encoded BinarySecret.

Specified by:
getTextValue in interface BinarySecret
Returns:
String
See Also:
{getRawValue}

setRawValue

public void setRawValue(byte[] rawText)
Description copied from interface: BinarySecret
Sets the value of the binary secret as raw bytes. The value that appears in the element will be encoded appropriately.

Specified by:
setRawValue in interface BinarySecret
Parameters:
rawText - byte[]

setTextValue

public void setTextValue(java.lang.String encodedText)
Description copied from interface: BinarySecret
Sets the value of the Binary Secret element. This is the base64 encoded value of the raw BinarySecret.

Specified by:
setTextValue in interface BinarySecret
Parameters:
encodedText - String