View Javadoc
1   /*
2    * Copyright 2017 the original author or authors.
3    *
4    *  Licensed under the Apache License, Version 2.0 (the "License");
5    *  you may not use this file except in compliance with the License.
6    *  You may obtain a copy of the License at
7    *
8    *         http://www.apache.org/licenses/LICENSE-2.0
9    *
10   *  Unless required by applicable law or agreed to in writing, software
11   *  distributed under the License is distributed on an "AS IS" BASIS,
12   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   *  See the License for the specific language governing permissions and
14   *  limitations under the License.
15   */
16  
17  package org.openehealth.ipf.commons.audit.codes;
18  
19  import lombok.Getter;
20  import org.openehealth.ipf.commons.audit.types.EnumeratedCodedValue;
21  import org.openehealth.ipf.commons.audit.types.EnumeratedValueSet;
22  import org.openehealth.ipf.commons.audit.types.EventType;
23  
24  /**
25   * Audit Event Type Code as specified in
26   * http://dicom.nema.org/medical/dicom/current/output/html/part16.html#sect_CID_401
27   * 1.2.840.10008.6.1.904
28   * and http://dicom.nema.org/medical/dicom/current/output/html/part16.html#sect_CID_403
29   * 1.2.840.10008.6.1.906
30   *
31   * @author Christian Ohr
32   * @since 3.5
33   */
34  public enum EventTypeCode implements EventType, EnumeratedCodedValue<EventType> {
35  
36      ApplicationStart("110120", "Application Start"),
37      ApplicationStop("110121", "Application Stop"),
38      Login("110122", "Login"),
39      Logout("110123", "Logout"),
40      Attach("110124", "Attach"),
41      Detach("110125", "Detach"),
42      NodeAuthentication("110126", "Node Authentication"),
43      EmergencyOverrideStarted("110127", "Emergency Override Started"),
44      NetworkConfiguration("110128", "Network Configuration"),
45      SecurityConfiguration("110129", "Security Configuration"),
46      HardwareConfiguration("110130", "Hardware Configuration"),
47      SoftwareConfiguration("110131", "Software Configuration"),
48      UseOfRestrictedFunction("110132", "Use of Restricted Function"),
49      AuditRecordingStopped("110133", "Audit Recording Stopped"),
50      AuditRecordingStarted("110134", "Audit Recording Started"),
51      ObjectSecurityAttributesChanged("110135", "Object Security Attributes Changed"),
52      SecurityRolesChanged("110136", "Security Roles Changed"),
53      UserSecurityAttributesChanged("110137", "User Security Attributes Changed"),
54      EmergencyOverrideStopped("110138", "Emergency Override Stopped"),
55      RemoteServiceOperationStarted("110139", "Remote Service Operation Started"),
56      RemoteServiceOperationStopped("110140", "Remote Service Operation Stopped"),
57      LocalServiceOperationStarted("110141", "Local Service Operation Started"),
58      LocalServiceOperationStopped("110142", "Local Service Operation Stopped"),
59  
60      AuthenticationDecision("110143", "Authentication Decision"),
61      AuthorizationDecision("110144", "Authorization Decision"),
62      SessionStart("110145", "Session start"),
63      SessionStop("110146", "Session stop"),
64      AccessControlDecision("110147", "Access Control Decision"),
65      StudyInstanceUID("110180", "Study Instance UID"),
66      SOPClassUID("110181", "SOP Class UID"),
67      NodeID("110182", "Node ID");
68  
69      @Getter
70      private EventType value;
71  
72      EventTypeCode(String code, String displayName) {
73          this.value = EventType.of(code, "DCM", displayName);
74      }
75  
76      public static EventTypeCode enumForCode(String code) {
77          return EnumeratedValueSet.enumForCode(EventTypeCode.class, code);
78      }
79  }