Search in sources :

Example 1 with SubjectType

use of com.intel.mtwilson.tag.selection.xml.SubjectType in project OpenAttestation by OpenAttestation.

the class TagSelectionJsonTest method printSelection.

private void printSelection(SelectionType selection) {
    log.debug("selection id {} name {} notBefore {} notAfter {}", selection.getId(), selection.getName(), selection.getNotBefore(), selection.getNotAfter());
    List<SubjectType> subjectList = selection.getSubject();
    for (SubjectType subject : subjectList) {
        // only one will appear 
        log.debug("subject uuid {} name {} ip {}", (subject.getUuid() == null ? "null" : subject.getUuid().getValue()), (subject.getName() == null ? "null" : subject.getName().getValue()), (subject.getIp() == null ? "null" : subject.getIp().getValue()));
    }
    List<AttributeType> attributeList = selection.getAttribute();
    for (AttributeType attribute : attributeList) {
        log.debug("attribute oid {} text {}", attribute.getOid(), attribute.getText().getValue());
    }
}
Also used : SubjectType(com.intel.mtwilson.tag.selection.xml.SubjectType) AttributeType(com.intel.mtwilson.tag.selection.xml.AttributeType)

Aggregations

AttributeType (com.intel.mtwilson.tag.selection.xml.AttributeType)1 SubjectType (com.intel.mtwilson.tag.selection.xml.SubjectType)1