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 KeyIdentifierType implements KeyIdentifier, SecurityHeaderElement, SecurityElementWriter
- Author:
- Ashutosh.Shahi@sun.com
-
-
Field Summary
-
Fields inherited from class com.sun.xml.ws.security.secext10.KeyIdentifierType
valueType
-
Fields inherited from class com.sun.xml.ws.security.secext10.EncodedString
encodingType
-
Fields inherited from class com.sun.xml.ws.security.secext10.AttributedString
id, value
-
-
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()Gets the value of the encodingType property.StringgetId()Gets the value of the id property.StringgetLocalPart()Gets the local name of this header element.StringgetNamespaceURI()StringgetReferenceValue()StringgetType()StringgetValueType()Gets the value of the valueType property.XMLStreamReaderreadHeader()Reads the header as aXMLStreamReader.booleanrefersToSecHdrWithId(String id)voidsetEncodingType(String value)Sets the value of the encodingType property.voidsetId(String id)Sets the value of the id property.voidsetReferenceValue(String referenceValue)voidsetValueType(String valueType)Sets the value of the valueType property.voidupdateReferenceValue(byte[] kerberosToken)voidupdateReferenceValue(X509Certificate cert)voidwriteTo(OutputStream os)voidwriteTo(XMLStreamWriter streamWriter)Writes out the header.voidwriteTo(XMLStreamWriter streamWriter, HashMap props)-
Methods inherited from class com.sun.xml.ws.security.secext10.AttributedString
getOtherAttributes, getValue, setValue
-
-
-
-
Method Detail
-
getValueType
public String getValueType()
Description copied from class:KeyIdentifierTypeGets the value of the valueType property.- Specified by:
getValueTypein interfaceKeyIdentifier- Overrides:
getValueTypein classKeyIdentifierType- Returns:
- the valueType attribute for KeyIdentifier
-
setValueType
public void setValueType(String valueType)
Description copied from class:KeyIdentifierTypeSets the value of the valueType property.- Specified by:
setValueTypein interfaceKeyIdentifier- Overrides:
setValueTypein classKeyIdentifierType- Parameters:
valueType- the valueType attribute for KeyIdentifier
-
getEncodingType
public String getEncodingType()
Description copied from class:EncodedStringGets the value of the encodingType property.- Specified by:
getEncodingTypein interfaceKeyIdentifier- Overrides:
getEncodingTypein classEncodedString- Returns:
- the encodingType attribute
-
setEncodingType
public void setEncodingType(String value)
Description copied from class:EncodedStringSets the value of the encodingType property.- Specified by:
setEncodingTypein interfaceKeyIdentifier- Overrides:
setEncodingTypein classEncodedString- 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()
Description copied from class:AttributedStringGets the value of the id property.- Specified by:
getIdin interfaceSecurityElement- Overrides:
getIdin classAttributedString- Returns:
- id attribute
-
setId
public void setId(String id)
Description copied from class:AttributedStringSets the value of the id property.- Specified by:
setIdin interfaceSecurityElement- Overrides:
setIdin classAttributedString- 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 XWSSecurityException- Throws:
XWSSecurityException
-
updateReferenceValue
public void updateReferenceValue(X509Certificate cert) throws XWSSecurityException
- Throws:
XWSSecurityException
-
refersToSecHdrWithId
public boolean refersToSecHdrWithId(String id)
- Specified by:
refersToSecHdrWithIdin interfaceSecurityHeaderElement- Parameters:
id-- Returns:
-
-