use of xades4j.xml.bind.xades.XmlClaimedRolesListType in project xades4j by luisgoncalves.
the class ToXmlSignerRoleConverter method convertIntoObjectTree.
@Override
public void convertIntoObjectTree(PropertyDataObject propData, XmlSignedPropertiesType xmlProps, Document doc) {
SignerRoleData signerRoleData = (SignerRoleData) propData;
XmlSignerRoleType xmlSignerRole = new XmlSignerRoleType();
XmlClaimedRolesListType xmlClaimedRoles = new XmlClaimedRolesListType();
xmlSignerRole.setClaimedRoles(xmlClaimedRoles);
for (String r : signerRoleData.getClaimedRoles()) {
XmlAnyType xmlRole = new XmlAnyType();
xmlRole.getContent().add(r);
xmlClaimedRoles.getClaimedRole().add(xmlRole);
}
xmlProps.getSignedSignatureProperties().setSignerRole(xmlSignerRole);
}
Aggregations