Package org.opensaml.xmlsec.signature.impl

# Class KeyInfoImpl

java.lang.Object
org.opensaml.core.xml.AbstractXMLObject
org.opensaml.xmlsec.signature.impl.KeyInfoImpl

All Implemented Interfaces:
  `XMLObject`, `KeyInfo`

Direct Known Subclasses:
  `OriginatorKeyInfoImpl`, `RecipientKeyInfoImpl`

public class KeyInfoImpl extends AbstractXMLObject implements KeyInfo
Concrete implementation of `KeyInfo`.

## Field Summary

Fields
Modifier and Type
Field
Description
`private String`
`id`
The Id attribute value.
`private final IndexedXMLObjectChildrenList<XMLObject>`
`indexedChildren`
The list of XMLObject child elements.

### Fields inherited from interface org.opensaml.xmlsec.signature.KeyInfo

`DEFAULT_ELEMENT_LOCAL_NAME, DEFAULT_ELEMENT_NAME, ID_ATTRIB_NAME, TYPE_LOCAL_NAME, TYPE_NAME`

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`KeyInfoImpl(String namespaceURI, String elementLocalName, String namespacePrefix)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`List<AgreementMethod>`
`getAgreementMethods()`
Get the list of AgreementMethod child elements.
`List<DEREncodedKeyValue>`
`getDEREncodedKeyValues()`
Get the list of DEREncodedKeyValue child elements.
`List<EncryptedKey>`
`getEncryptedKeys()`
Get the list of EncryptedKey child elements Note: EncryptedKey is actually defined in the XML Encryption schema, and is not explicitly defined in the KeyInfoType content model, but for convenience this named getter method is exposed.
`String`
`getID()`
Get the Id attribute value.
`List<KeyInfoReference>`
`getKeyInfoReferences()`
Get the list of KeyInfoReference child elements.
`List<KeyName>`
`getKeyNames()`
Get the list of KeyName child elements.
`List<KeyValue>`
`getKeyValues()`
Get the list of KeyValue child elements.
`List<MgmtData>`
`getMgmtDatas()`
Get the list of MgmtData child elements.
`List<XMLObject>`
`getOrderedChildren()`
Gets an unmodifiable list of child elements in the order that they will appear in the DOM.
`List<PGPData>`
`getPGPDatas()`
Get the list of PGPData child elements.
`List<RetrievalMethod>`
`getRetrievalMethods()`
Get the list of RetrievalMethod child elements.
`List<SPKIData>`
`getSPKIDatas()`
Get the list of SPKIData child elements.
`List<X509Data>`
`getX509Datas()`
Get the list of X509Data child elements.
`List<XMLObject>`
`getXMLObjects()`
Get the list of all XMLObject children.
`List<XMLObject>`
`getXMLObjects(QName typeOrName)`
Get the list of XMLObject children whose type or element QName matches the specified QName.
`void`
`setID(String newID)`
Set the Id attribute value.

### Methods inherited from class org.opensaml.core.xml.AbstractXMLObject

`detach, ensureDOM, getDOM, getElementQName, getIDIndex, getNamespaceManager, getNamespaces, getNoNamespaceSchemaLocation, getObjectMetadata, getParent, getSchemaLocation, getSchemaType, hasChildren, hasParent, isNil, isNilXSBoolean, manageQualifiedAttributeNamespace, prepareAttributeValueForAssignment, prepareElementContentForAssignment, prepareForAssignment, prepareForAssignment, prepareForAssignment, registerOwnID, releaseChildrenDOM, releaseDOM, releaseParentDOM, releaseThisAndChildrenDOM, releaseThisandParentDOM, resolveID, resolveIDFromRoot, setDOM, setElementNamespacePrefix, setElementQName, setNil, setNil, setNoNamespaceSchemaLocation, setParent, setSchemaLocation, setSchemaType`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.opensaml.core.xml.XMLObject

`detach, ensureDOM, getDOM, getElementQName, getIDIndex, getNamespaceManager, getNamespaces, getNoNamespaceSchemaLocation, getObjectMetadata, getParent, getSchemaLocation, getSchemaType, hasChildren, hasParent, isNil, isNilXSBoolean, releaseChildrenDOM, releaseDOM, releaseParentDOM, resolveID, resolveIDFromRoot, setDOM, setNil, setNil, setNoNamespaceSchemaLocation, setParent, setSchemaLocation`

## Field Details

### indexedChildren

@Nonnull private final IndexedXMLObjectChildrenList<XMLObject> indexedChildren
The list of XMLObject child elements.

### id

@Nullable private String id
The Id attribute value.

## Constructor Details

### KeyInfoImpl

protected KeyInfoImpl(@Nullable String namespaceURI, @Nonnull String elementLocalName, @Nullable String namespacePrefix)
Constructor.

Parameters:
  `namespaceURI` - the namespace the element is in
  `elementLocalName` - the local name of the XML element this Object represents
  `namespacePrefix` - the prefix for the given namespace

## Method Details

### getID

@Nullable public String getID()
Get the Id attribute value.

Specified by:
  `getID` in interface `KeyInfo`
Returns:
  the Id attribute value

### setID

public void setID(@Nullable String newID)
Set the Id attribute value.

Specified by:
  `setID` in interface `KeyInfo`
Parameters:
  `newID` - the new Id attribute value

### getXMLObjects

@Nonnull @Live public List<XMLObject> getXMLObjects()
Get the list of all XMLObject children.

Specified by:
  `getXMLObjects` in interface `KeyInfo`
Returns:
  the list of XMLObject children

### getXMLObjects

@Nonnull @Live public List<XMLObject> getXMLObjects(@Nonnull QName typeOrName)
Get the list of XMLObject children whose type or element QName matches the specified QName.

Specified by:
  `getXMLObjects` in interface `KeyInfo`
Parameters:
  `typeOrName` - the QName of the desired elements
Returns:
  the matching list of XMLObject children

### getKeyNames

@Nonnull @Live public List<KeyName> getKeyNames()
Get the list of KeyName child elements.

Specified by:
  `getKeyNames` in interface `KeyInfo`
Returns:
  the list of KeyName child elements

### getKeyValues

@Nonnull @Live public List<KeyValue> getKeyValues()
Get the list of KeyValue child elements.

Specified by:
  `getKeyValues` in interface `KeyInfo`
Returns:
  the list of KeyValue child elements

### getDEREncodedKeyValues

@Nonnull @Live public List<DEREncodedKeyValue> getDEREncodedKeyValues()
Get the list of DEREncodedKeyValue child elements.

Specified by:
  `getDEREncodedKeyValues` in interface `KeyInfo`
Returns:
  the list of DEREncodedKeyValue child elements

### getRetrievalMethods

@Nonnull @Live public List<RetrievalMethod> getRetrievalMethods()
Get the list of RetrievalMethod child elements.

Specified by:
  `getRetrievalMethods` in interface `KeyInfo`
Returns:
  the list of RetrievalMethod child elements

### getKeyInfoReferences

@Nonnull @Live public List<KeyInfoReference> getKeyInfoReferences()
Get the list of KeyInfoReference child elements.

Specified by:
  `getKeyInfoReferences` in interface `KeyInfo`
Returns:
  the list of KeyInfoReference child elements

### getX509Datas

@Nonnull @Live public List<X509Data> getX509Datas()
Get the list of X509Data child elements.

Specified by:
  `getX509Datas` in interface `KeyInfo`
Returns:
  the list of X509Data child elements

### getPGPDatas

@Nonnull @Live public List<PGPData> getPGPDatas()
Get the list of PGPData child elements.

Specified by:
  `getPGPDatas` in interface `KeyInfo`
Returns:
  the list of PGPData child elements

### getSPKIDatas

@Nonnull @Live public List<SPKIData> getSPKIDatas()
Get the list of SPKIData child elements.

Specified by:
  `getSPKIDatas` in interface `KeyInfo`
Returns:
  the list of SPKIData child elements

### getMgmtDatas

@Nonnull @Live public List<MgmtData> getMgmtDatas()
Get the list of MgmtData child elements.

Specified by:
  `getMgmtDatas` in interface `KeyInfo`
Returns:
  the list of MgmtData child elements

### getAgreementMethods

@Nonnull @Live public List<AgreementMethod> getAgreementMethods()
Get the list of AgreementMethod child elements. Note: AgreementMethod is actually defined in the XML Encryption schema, and is not explicitly defined in the KeyInfoType content model, but for convenience this named getter method is exposed.

Specified by:
  `getAgreementMethods` in interface `KeyInfo`
Returns:
  the list of AgreementMethod child elements

### getEncryptedKeys

@Nonnull @Live public List<EncryptedKey> getEncryptedKeys()
Get the list of EncryptedKey child elements Note: EncryptedKey is actually defined in the XML Encryption schema, and is not explicitly defined in the KeyInfoType content model, but for convenience this named getter method is exposed.

Specified by:
  `getEncryptedKeys` in interface `KeyInfo`
Returns:
  the list of EncryptedKey child elements

### getOrderedChildren

@Nullable @Unmodifiable @NotLive public List<XMLObject> getOrderedChildren()
Gets an unmodifiable list of child elements in the order that they will appear in the DOM.

Specified by:
  `getOrderedChildren` in interface `XMLObject`
Returns:
  ordered list of child elements