private RecoverResultBuilder() {
}
public XKMSElement buildElement(OMElement element) throws XKMSException {
RecoverResult recoverResult = new RecoverResult();
super.buildElement(element, recoverResult);
OMElement keyBindingElem;
for (Iterator iterator = element
.getChildrenWithName(XKMS2Constants.ELE_KEY_BINDING); iterator
.hasNext();) {
keyBindingElem = (OMElement) iterator.next();
recoverResult.addKeyBinding((KeyBinding) KeyBindingBuilder.INSTANCE
.buildElement(keyBindingElem));
}
OMElement privateKeyElem = element
.getFirstChildWithName(XKMS2Constants.Q_ELEM_PRIVATE_KEY);
if (privateKeyElem != null) {
PrivateKey privateKey = (PrivateKey) PrivateKeyBuilder.INSTANCE.buildElement(privateKeyElem);
recoverResult.setPrivateKey(privateKey);
}
return recoverResult;
}