private void serialize(AuditMessage auditMessage, Writer writer, XMLOutputter outputter) throws IOException { Element element = new Element("AuditMessage"); element.addContent(eventIdentification(auditMessage.getEventIdentification())); auditMessage.getActiveParticipants().stream() .map(this::activeParticipant) .forEach(element::addContent); element.addContent(auditSourceIdentification(auditMessage.getAuditSourceIdentification())); auditMessage.getParticipantObjectIdentifications().stream() .map(this::participantObjectIdentification) .forEach(element::addContent); outputter.output(new Document(element), writer); }
protected AuditEvent translate(AuditMessage auditMessage) { EventIdentificationType eit = auditMessage.getEventIdentification(); AuditEvent auditEvent = new AuditEvent() .setType(codedValueTypeToCoding(eit.getEventID())) .setAction(getAuditEventAction(eit.getEventActionCode())) .setRecorded(Date.from(eit.getEventDateTime())) .setOutcome(getAuditEventOutcome(eit.getEventOutcomeIndicator())) .setOutcomeDesc(eit.getEventOutcomeDescription()); eit.getEventTypeCode().forEach(etc -> auditEvent.addSubtype(codedValueTypeToCoding(etc))); eit.getPurposesOfUse().forEach(pou -> auditEvent.addPurposeOfEvent(codedValueTypeToCodeableConcept(pou))); auditMessage.getActiveParticipants().forEach(ap -> auditEvent.addAgent(activeParticipantToAgent(ap))); auditEvent.setSource(auditSourceIdentificationToEventSource(auditMessage.getAuditSourceIdentification())); auditMessage.getParticipantObjectIdentifications().forEach(poit -> auditEvent.addEntity(participantObjectIdentificationToEntity(poit))); return auditEvent; }
protected AuditEvent translate(AuditMessage auditMessage) { EventIdentificationType eit = auditMessage.getEventIdentification(); AuditEvent auditEvent = new AuditEvent() .setType(codedValueTypeToCoding(eit.getEventID())) .setAction(getAuditEventAction(eit.getEventActionCode())) .setRecorded(Date.from(eit.getEventDateTime())) .setOutcome(getAuditEventOutcome(eit.getEventOutcomeIndicator())) .setOutcomeDesc(eit.getEventOutcomeDescription()); eit.getEventTypeCode().forEach(etc -> auditEvent.addSubtype(codedValueTypeToCoding(etc))); eit.getPurposesOfUse().forEach(pou -> auditEvent.addPurposeOfEvent(codedValueTypeToCodeableConcept(pou))); auditMessage.getActiveParticipants().forEach(ap -> auditEvent.addAgent(activeParticipantToAgent(ap))); auditEvent.setSource(auditSourceIdentificationToEventSource(auditMessage.getAuditSourceIdentification())); auditMessage.getParticipantObjectIdentifications().forEach(poit -> auditEvent.addEntity(participantObjectIdentificationToEntity(poit))); return auditEvent; }
AuditSourceIdentificationType sourceIdentificationType = event.getAuditSourceIdentification(); assertEquals("IPF", sourceIdentificationType.getAuditSourceID()); assertEquals("IPF", sourceIdentificationType.getAuditEnterpriseSiteID());
AuditSourceIdentificationType sourceIdentificationType = event.getAuditSourceIdentification(); assertEquals("IPF", sourceIdentificationType.getAuditSourceID()); assertEquals("IPF", sourceIdentificationType.getAuditEnterpriseSiteID());
AuditSourceIdentificationType sourceIdentificationType = event.getAuditSourceIdentification(); assertEquals("IPF", sourceIdentificationType.getAuditSourceID()); assertEquals("IPF", sourceIdentificationType.getAuditEnterpriseSiteID());
AuditSourceIdentificationType sourceIdentificationType = event.getAuditSourceIdentification(); assertEquals("IPF", sourceIdentificationType.getAuditSourceID()); assertEquals("IPF", sourceIdentificationType.getAuditEnterpriseSiteID());
AuditSourceIdentificationType sourceIdentificationType = event.getAuditSourceIdentification(); assertEquals("IPF", sourceIdentificationType.getAuditSourceID()); assertEquals("IPF", sourceIdentificationType.getAuditEnterpriseSiteID());
AuditSourceIdentificationType sourceIdentificationType = event.getAuditSourceIdentification(); assertEquals("IPF", sourceIdentificationType.getAuditSourceID()); assertEquals("IPF", sourceIdentificationType.getAuditEnterpriseSiteID());
AuditSourceIdentificationType sourceIdentificationType = event.getAuditSourceIdentification(); assertEquals("IPF", sourceIdentificationType.getAuditSourceID()); assertEquals("IPF", sourceIdentificationType.getAuditEnterpriseSiteID());
AuditSourceIdentificationType sourceIdentificationType = event.getAuditSourceIdentification(); assertEquals("IPF", sourceIdentificationType.getAuditSourceID()); assertEquals("IPF", sourceIdentificationType.getAuditEnterpriseSiteID());
AuditSourceIdentificationType sourceIdentificationType = event.getAuditSourceIdentification(); assertEquals("IPF", sourceIdentificationType.getAuditSourceID()); assertEquals("IPF", sourceIdentificationType.getAuditEnterpriseSiteID());