Class KeyIdentifier
- java.lang.Object
-
- com.sun.xml.ws.security.secext10.AttributedString
-
- com.sun.xml.ws.security.secext10.EncodedString
-
- com.sun.xml.ws.security.secext10.KeyIdentifierType
-
- com.sun.xml.ws.security.opt.impl.reference.KeyIdentifier
-
- All Implemented Interfaces:
KeyIdentifier,Reference,SecurityElement,SecurityElementWriter,SecurityHeaderElement
public class KeyIdentifier extends com.sun.xml.ws.security.secext10.KeyIdentifierType implements KeyIdentifier, SecurityHeaderElement, SecurityElementWriter
- Author:
- Ashutosh.Shahi@sun.com
-
-
Constructor Summary
Constructors Constructor Description KeyIdentifier(com.sun.xml.ws.api.SOAPVersion sv)Creates a new instance of KeyIdentifier
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAttribute(String nsUri, String localName)StringgetAttribute(QName name)StringgetEncodingType()StringgetId()StringgetLocalPart()Gets the local name of this header element.StringgetNamespaceURI()StringgetReferenceValue()StringgetType()StringgetValueType()XMLStreamReaderreadHeader()Reads the header as aXMLStreamReader.booleanrefersToSecHdrWithId(String id)voidsetEncodingType(String value)voidsetId(String id)voidsetReferenceValue(String referenceValue)voidsetValueType(String valueType)voidupdateReferenceValue(byte[] kerberosToken)voidupdateReferenceValue(X509Certificate cert)voidwriteTo(OutputStream os)voidwriteTo(XMLStreamWriter streamWriter)Writes out the header.voidwriteTo(XMLStreamWriter streamWriter, HashMap props)
-
-
-
Method Detail
-
getValueType
public String getValueType()
- Specified by:
getValueTypein interfaceKeyIdentifier- Overrides:
getValueTypein classcom.sun.xml.ws.security.secext10.KeyIdentifierType- Returns:
- the valueType attribute for KeyIdentifier
-
setValueType
public void setValueType(String valueType)
- Specified by:
setValueTypein interfaceKeyIdentifier- Overrides:
setValueTypein classcom.sun.xml.ws.security.secext10.KeyIdentifierType- Parameters:
valueType- the valueType attribute for KeyIdentifier
-
getEncodingType
public String getEncodingType()
- Specified by:
getEncodingTypein interfaceKeyIdentifier- Overrides:
getEncodingTypein classcom.sun.xml.ws.security.secext10.EncodedString- Returns:
- the encodingType attribute
-
setEncodingType
public void setEncodingType(String value)
- Specified by:
setEncodingTypein interfaceKeyIdentifier- Overrides:
setEncodingTypein classcom.sun.xml.ws.security.secext10.EncodedString- Parameters:
value- the encodingType attribute
-
getReferenceValue
public String getReferenceValue()
- Specified by:
getReferenceValuein interfaceKeyIdentifier- Returns:
- the referenced value by this key identifier
-
setReferenceValue
public void setReferenceValue(String referenceValue)
- Specified by:
setReferenceValuein interfaceKeyIdentifier- Parameters:
referenceValue- the referenced value by this keyIdentifier
-
getType
public String getType()
-
getId
public String getId()
- Specified by:
getIdin interfaceSecurityElement- Overrides:
getIdin classcom.sun.xml.ws.security.secext10.AttributedString- Returns:
- id attribute
-
setId
public void setId(String id)
- Specified by:
setIdin interfaceSecurityElement- Overrides:
setIdin classcom.sun.xml.ws.security.secext10.AttributedString- Parameters:
id-
-
getNamespaceURI
public String getNamespaceURI()
- Specified by:
getNamespaceURIin interfaceSecurityElement- Returns:
- namespace uri of Keyidentifier.
-
getLocalPart
public String getLocalPart()
Gets the local name of this header element.- Specified by:
getLocalPartin interfaceSecurityElement- Returns:
- this string must be interned.
-
readHeader
public XMLStreamReader readHeader() throws XMLStreamException
Description copied from interface:SecurityElementReads the header as aXMLStreamReader.The returned parser points at the start element of this header. (IOW,
XMLStreamReader.getEventType()would returnXMLStreamConstants.START_ELEMENT.Performance Expectation
For some Header implementations, this operation is a non-trivial operation. Therefore, use of this method is discouraged unless the caller is interested in reading the whole header.
Similarly, if the caller wants to use this method only to do the API conversion (such as simply firing SAX events from
XMLStreamReader), then the JAX-WS team requests that you talk to us.Messages that come from tranport usually provides a reasonably efficient implementation of this method.
- Specified by:
readHeaderin interfaceSecurityElement- Returns:
- must not null.
- Throws:
XMLStreamException
-
writeTo
public void writeTo(XMLStreamWriter streamWriter) throws XMLStreamException
Writes out the header.- Specified by:
writeToin interfaceSecurityElementWriter- Throws:
XMLStreamException- if the operation fails for some reason. This leaves the writer to an undefined state.
-
writeTo
public void writeTo(XMLStreamWriter streamWriter, HashMap props) throws XMLStreamException
- Specified by:
writeToin interfaceSecurityElementWriter- Parameters:
streamWriter-props-- Throws:
XMLStreamException
-
writeTo
public void writeTo(OutputStream os)
- Specified by:
writeToin interfaceSecurityElementWriter- Parameters:
os-
-
updateReferenceValue
public void updateReferenceValue(byte[] kerberosToken) throws com.sun.xml.wss.XWSSecurityException- Throws:
com.sun.xml.wss.XWSSecurityException
-
updateReferenceValue
public void updateReferenceValue(X509Certificate cert) throws com.sun.xml.wss.XWSSecurityException
- Throws:
com.sun.xml.wss.XWSSecurityException
-
refersToSecHdrWithId
public boolean refersToSecHdrWithId(String id)
- Specified by:
refersToSecHdrWithIdin interfaceSecurityHeaderElement- Parameters:
id-- Returns:
-
-