Search in sources :

Example 1 with XmlClaimedRolesListType

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);
}
Also used : XmlAnyType(xades4j.xml.bind.xades.XmlAnyType) XmlClaimedRolesListType(xades4j.xml.bind.xades.XmlClaimedRolesListType) SignerRoleData(xades4j.properties.data.SignerRoleData) XmlSignerRoleType(xades4j.xml.bind.xades.XmlSignerRoleType)

Aggregations

SignerRoleData (xades4j.properties.data.SignerRoleData)1 XmlAnyType (xades4j.xml.bind.xades.XmlAnyType)1 XmlClaimedRolesListType (xades4j.xml.bind.xades.XmlClaimedRolesListType)1 XmlSignerRoleType (xades4j.xml.bind.xades.XmlSignerRoleType)1