Class BinarySecretImpl
- java.lang.Object
-
- com.sun.xml.ws.security.trust.impl.bindings.BinarySecretType
-
- com.sun.xml.ws.security.trust.impl.elements.BinarySecretImpl
-
- All Implemented Interfaces:
BinarySecret,XMLStructure
public class BinarySecretImpl extends BinarySecretType implements BinarySecret
- Author:
- WS-Trust Implementation Team
-
-
Field Summary
-
Fields inherited from class com.sun.xml.ws.security.trust.impl.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
Constructors Constructor Description BinarySecretImpl(byte[] rawValue, String type)BinarySecretImpl(BinarySecretType bsType)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BinarySecretTypefromElement(Element element)Constructs aBinarySecretelement from an existing XML block.byte[]getRawValue()Gets the decoded value or the raw bytes of the binary secret.StringgetTextValue()Gets the encoded value of the binary secret.voidsetRawValue(byte[] rawText)Sets the value of the binary secret as raw bytes.voidsetTextValue(String encodedText)Sets the value of the Binary Secret element.-
Methods inherited from class com.sun.xml.ws.security.trust.impl.bindings.BinarySecretType
getOtherAttributes, getType, getValue, isFeatureSupported, 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
-
Methods inherited from interface javax.xml.crypto.XMLStructure
isFeatureSupported
-
-
-
-
Constructor Detail
-
BinarySecretImpl
public BinarySecretImpl(@NotNull BinarySecretType bsType)
-
-
Method Detail
-
fromElement
public static BinarySecretType fromElement(@NotNull Element element) throws WSTrustException
Constructs aBinarySecretelement from an existing XML block.- Parameters:
element-org.w3c.dom.Elementrepresenting DOM tree forBinarySecretobject.- Throws:
WSTrustException- if it could not process theorg.w3c.dom.Elementproperly, implying that there is an error in the sender or in the element definition.
-
getRawValue
@NotNull public byte[] getRawValue()
Description copied from interface:BinarySecretGets the decoded value or the raw bytes of the binary secret.- Specified by:
getRawValuein interfaceBinarySecret- Returns:
- possible object is byte[]
-
getTextValue
@NotNull public String getTextValue()
Description copied from interface:BinarySecretGets the encoded value of the binary secret. This represents the base64 encoded BinarySecret.- Specified by:
getTextValuein interfaceBinarySecret- Returns:
String
-
setRawValue
public final void setRawValue(@NotNull byte[] rawText)
Description copied from interface:BinarySecretSets the value of the binary secret as raw bytes. The value that appears in the element will be encoded appropriately.- Specified by:
setRawValuein interfaceBinarySecret- Parameters:
rawText- allowed object is byte[]
-
setTextValue
public void setTextValue(@NotNull String encodedText)
Description copied from interface:BinarySecretSets the value of the Binary Secret element. This is the base64 encoded value of the raw BinarySecret.- Specified by:
setTextValuein interfaceBinarySecret- Parameters:
encodedText-String
-
-