Example #1
0
        public QueryAuditHelper(DicomAuditSource auditSource,
                                EventIdentificationContentsEventOutcomeIndicator outcome,
                                AuditActiveParticipant sourceUser, string destinationAE, string destinationHost, string queryParameters)
            : base("Query")
        {
            AuditMessage.EventIdentification = new EventIdentificationContents
            {
                EventID                  = EventID.Query,
                EventActionCode          = EventIdentificationContentsEventActionCode.E,
                EventActionCodeSpecified = true,
                EventDateTime            = Platform.Time.ToUniversalTime(),
                EventOutcomeIndicator    = outcome
            };

            InternalAddAuditSource(auditSource);

            InternalAddActiveParticipant(sourceUser);

            IPAddress x;

            _participantList.Add(new ActiveParticipantContents(RoleIDCode.Destination, "AETITLE=" + destinationAE, null,
                                                               null,
                                                               destinationHost,
                                                               IPAddress.TryParse(destinationHost, out x)
                                                                                ? NetworkAccessPointTypeEnum.IpAddress
                                                                                : NetworkAccessPointTypeEnum.MachineName, null));

            AuditQueryMessageParticipantObject o =
                new AuditQueryMessageParticipantObject(queryParameters);

            InternalAddParticipantObject("Query", o);
        }
Example #2
0
        /// <summary>
        /// Add the ID of person or process that started or stopped the Application.  Can be called multiple times.
        /// </summary>
        /// <param name="participant">The participant.</param>
        public void AddUserParticipant(AuditActiveParticipant participant)
        {
            participant.RoleIdCode      = RoleIDCode.ApplicationLauncher;
            participant.UserIsRequestor = true;

            InternalAddActiveParticipant(participant);
        }
        public ActiveParticipantContents(AuditActiveParticipant participant)
        {
            if (participant.RoleIdCode != null)
            {
                RoleIDCode    = new RoleIDCode[1];
                RoleIDCode[0] = participant.RoleIdCode;
            }
            if (participant.UserIsRequestor.HasValue)
            {
                UserIsRequestor = participant.UserIsRequestor.Value;
            }
            if (participant.UserId != null)
            {
                UserID = participant.UserId;
            }
            if (participant.AlternateUserId != null)
            {
                AlternativeUserID = participant.AlternateUserId;
            }
            if (participant.UserName != null)
            {
                UserName = participant.UserName;
            }

            if (participant.NetworkAccessPointId != null)
            {
                NetworkAccessPointID = participant.NetworkAccessPointId;
            }

            if (participant.NetworkAccessPointType.HasValue)
            {
                NetworkAccessPointTypeCode          = (ActiveParticipantContentsNetworkAccessPointTypeCode)participant.NetworkAccessPointType.Value;
                NetworkAccessPointTypeCodeSpecified = true;
            }
            else
            {
                NetworkAccessPointTypeCodeSpecified = false;
            }
        }
Example #4
0
        protected void InternalAddActiveParticipant(AuditActiveParticipant participant)

        {
            _participantList.Add(new ActiveParticipantContents(participant));
        }
Example #5
0
 protected override AuditActiveParticipant AsAuditActiveParticipant()
 {
     return(_currentUserActiveParticipant ??
            (_currentUserActiveParticipant =
                 new AuditPersonActiveParticipant(_username, string.Empty, _username)));
 }
Example #6
0
 protected override AuditActiveParticipant AsAuditActiveParticipant()
 {
     return(_currentUserActiveParticipant ??
            (_currentUserActiveParticipant =
                 new AuditPersonActiveParticipant(GetUserName(), string.Empty, GetUserName())));
 }
 /// <summary>
 /// (Optional) The identity of any other participants that might be involved andknown, especially third parties that are the requestor
 /// </summary>
 /// <param name="participant">The participant</param>
 public void AddOtherParticipants(AuditActiveParticipant participant)
 {
     InternalAddActiveParticipant(participant);
 }
Example #8
0
 /// <summary>
 /// The identity of any other participants that might be involved and
 /// known, especially third parties that are the requestor
 /// </summary>
 /// <param name="participant">The participant to add.</param>
 public void AddOtherParticipant(AuditActiveParticipant participant)
 {
     participant.UserIsRequestor = true;
     InternalAddActiveParticipant(participant);
 }
Example #9
0
 /// <summary>
 /// Add an exporter.
 /// </summary>
 /// <param name="userId">The identity of the local user or process exporting the data. If both
 /// are known, then two active participants shall be included (both the
 /// person and the process).</param>
 /// <param name="userName">The name of the user</param>
 /// <param name="userIsRequestor">Flag telling if the exporter is a user (as opposed to a process)</param>
 public void AddExporter(AuditActiveParticipant participant)
 {
     participant.RoleIdCode      = RoleIDCode.SourceMedia;
     participant.UserIsRequestor = true;
     InternalAddActiveParticipant(participant);
 }
 /// <summary>
 /// Add an importer.
 /// </summary>
 /// <param name="userId">The identity of the local user or process importer the data. If both
 /// are known, then two active participants shall be included (both the
 /// person and the process).</param>
 /// <param name="participant">The active participant</param>
 public void AddImporter(AuditActiveParticipant participant)
 {
     participant.UserIsRequestor = true;
     participant.RoleIdCode      = RoleIDCode.Destination;
     InternalAddActiveParticipant(participant);
 }
 /// <summary>
 /// The identity of the person or process that detected the activity of
 /// concern. If both are known, then two active participants shall be
 /// included (both the person and the process).
 /// </summary>
 /// <param name="userId">
 /// The identity of the person or process that detected the activity of
 /// concern. If both are known, then two active participants shall be
 /// included (both the person and the process).
 /// </param>
 /// <param name="participant">The reporting participant</param>
 public void AddReportingUser(AuditActiveParticipant participant)
 {
     participant.UserIsRequestor = true;
     InternalAddActiveParticipant(participant);
 }