Examples of AuditMessage


Examples of org.dcm4che3.audit.AuditMessage

            + "</ParticipantObjectIdentification>"
            + "</AuditMessage>";

    @Test
    public void testDICOMInstancesTransferred() throws Exception {
        AuditMessage msg = new AuditMessage();
        msg.setEventIdentification(AuditMessages.createEventIdentification(
                AuditMessages.EventID.DICOMInstancesTransferred,
                AuditMessages.EventActionCode.Create,
                null,
                AuditMessages.EventOutcomeIndicator.Success,
                null));
        msg.getActiveParticipant().add(
                AuditMessages.createActiveParticipant(
                    "123",
                    AuditMessages.alternativeUserIDForAETitle("AEFOO"),
                    null,
                    false,
                    "192.168.1.2",
                    AuditMessages.NetworkAccessPointTypeCode.IPAddress,
                    null,
                    AuditMessages.RoleIDCode.Source));
        msg.getActiveParticipant().add(
                AuditMessages.createActiveParticipant(
                    "67562",
                    AuditMessages.alternativeUserIDForAETitle("AEPACS"),
                    null,
                    false,
                    "192.168.1.5",
                    AuditMessages.NetworkAccessPointTypeCode.IPAddress,
                    null,
                    AuditMessages.RoleIDCode.Destination));
        msg.getActiveParticipant().add(
                AuditMessages.createActiveParticipant(
                    "smitty@readingroom.hospital.org",
                    "smith@nema",
                    "Dr. Smith",
                    true,
                    "192.168.1.2",
                    AuditMessages.NetworkAccessPointTypeCode.IPAddress,
                    null,
                    AuditMessages.RoleIDCode.Source));
        msg.getAuditSourceIdentification().add(
                AuditMessages.createAuditSourceIdentification(
                    "Hospital",
                    "ReadingRoom",
                    AuditMessages.AuditSourceTypeCode.EndUserDisplayDevice));
        ParticipantObjectDescription pod = new ParticipantObjectDescription();
        pod.getMPPS().add(AuditMessages.createMPPS("1.2.840.10008.1.2.3.4.5"));
        pod.getAccession().add(AuditMessages.createAccession("12341234"));
        pod.getSOPClass().add(AuditMessages.createSOPClass(
                "1.2.840.10008.5.1.4.1.1.2", 1500));
        pod.getSOPClass().add(AuditMessages.createSOPClass(
                "1.2.840.10008.5.1.4.1.1.11.1", 3));
        msg.getParticipantObjectIdentification().add(
                AuditMessages.createParticipantObjectIdentification(
                        "1.2.840.10008.2.3.4.5.6.7.78.8",
                        AuditMessages.ParticipantObjectIDTypeCode.StudyInstanceUID,
                        null,
                        null,
                        AuditMessages.ParticipantObjectTypeCode.SystemObject,
                        AuditMessages.ParticipantObjectTypeCodeRole.Resource,
                        AuditMessages.ParticipantObjectDataLifeCycle.OriginationCreation,
                        null,
                        pod));
        msg.getParticipantObjectIdentification().add(
                AuditMessages.createParticipantObjectIdentification(
                        "ptid12345",
                        AuditMessages.ParticipantObjectIDTypeCode.PatientNumber,
                        "John Doe",
                        null,
View Full Code Here

Examples of org.dcm4che3.audit.AuditMessage

        AuditMessages.toXML(msg, System.out, true);
    }

    @Test
    public void testFromXML() throws Exception {
       AuditMessage msg = AuditMessages.fromXML(new StringReader(AUDIT_MESSAGE));
    }
View Full Code Here

Examples of org.mycompany.audit.model.AuditMessage

    }

    Auditable annotation = method.getAnnotation(Auditable.class);
    if (annotation != null)
    {
      AuditMessage audit = new AuditMessage();
      String actionCode = annotation.actionCode();
      String auditMessage = annotation.auditMessage();
      Person principal = null;// determinePrincipal(annotation);
      auditMessage = (exception == null ? ""
          : "The following exception occurred: " + exception.toString());

      audit.setId(UUID.randomUUID().toString());
      audit.setActionCode(actionCode);
      audit.setMessage(auditMessage);
      audit.setSuccessIndicator(exception == null);
      audit.setActionBy(principal);
      audit.setActionDate(new Date());
      logger.info("audit message=> " + audit);

      logger.debug("persisting audit...");
      if (auditRepository == null)
      {
View Full Code Here

Examples of org.teiid.logging.AuditMessage

  }

  private void logRequest(Set<String> resources, Context context) {
    if (LogManager.isMessageToBeRecorded(LogConstants.CTX_AUDITLOGGING, MessageLevel.DETAIL)) {
          // Audit - request
        AuditMessage msg = new AuditMessage(context.name(), "getInaccessibleResources-request", this.userName, resources.toArray(new String[resources.size()])); //$NON-NLS-1$
        LogManager.logDetail(LogConstants.CTX_AUDITLOGGING, msg);
        }
  }
View Full Code Here

Examples of org.teiid.logging.AuditMessage

  private void logResult(Set<String> resources, Context context,
      boolean granted) {
    if (LogManager.isMessageToBeRecorded(LogConstants.CTX_AUDITLOGGING, MessageLevel.DETAIL)) {
          if (granted) {
            AuditMessage msg = new AuditMessage(context.name(), "getInaccessibleResources-granted all", this.userName, resources.toArray(new String[resources.size()])); //$NON-NLS-1$
            LogManager.logDetail(LogConstants.CTX_AUDITLOGGING, msg);
          } else {
            AuditMessage msg = new AuditMessage(context.name(), "getInaccessibleResources-denied", this.userName, resources.toArray(new String[resources.size()])); //$NON-NLS-1$
            LogManager.logDetail(LogConstants.CTX_AUDITLOGGING, msg);
          }
    }
  }   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.