View Javadoc
1   /*
2    * Copyright 2016 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.boot.atna;
18  
19  import lombok.Getter;
20  import lombok.Setter;
21  import org.openehealth.ipf.commons.audit.AuditMessagePostProcessor;
22  import org.openehealth.ipf.commons.audit.codes.AuditSourceType;
23  import org.openehealth.ipf.commons.audit.handler.AuditExceptionHandler;
24  import org.openehealth.ipf.commons.audit.handler.LoggingAuditExceptionHandler;
25  import org.openehealth.ipf.commons.audit.protocol.AuditTransmissionProtocol;
26  import org.openehealth.ipf.commons.audit.queue.AuditMessageQueue;
27  import org.openehealth.ipf.commons.audit.queue.SynchronousAuditMessageQueue;
28  import org.openehealth.ipf.commons.audit.types.AuditSource;
29  import org.springframework.boot.context.properties.ConfigurationProperties;
30  
31  /**
32   *
33   */
34  @ConfigurationProperties(prefix = "ipf.atna")
35  public class IpfAtnaConfigurationProperties {
36  
37  
38  
39      @Getter @Setter
40      private boolean auditEnabled = true;
41  
42      @Getter @Setter
43      private AuditSource auditSourceType = AuditSourceType.ApplicationServerProcess;
44  
45      @Getter @Setter
46      private String auditSendingApplication;
47  
48      /**
49       * Sets the Audit transport (UDP, TLS)
50       */
51      @Getter @Setter
52      private String auditRepositoryTransport = "UDP";
53  
54      /**
55       * Sets the host of the audit repository. Deprecated, set ipf.atna.audit-repository-host
56       */
57      @Getter @Setter
58      private String auditRepositoryHost = "localhost";
59  
60      /**
61       * Sets the port of the audit repository. Deprecated, set ipf.atna.audit-repository-port
62       */
63      @Getter @Setter
64      private int auditRepositoryPort = 514;
65  
66      /**
67       * Enterprise Site Id
68       */
69      @Getter @Setter
70      private String auditEnterpriseSiteId;
71  
72      /**
73       * Sets the Audit Message Queue class to be used for sending ATNA records
74       */
75      @Getter @Setter
76      private Class<? extends AuditMessageQueue> auditQueueClass = SynchronousAuditMessageQueue.class;
77  
78      /**
79       * Sets the Audit Message Postprocessor class
80       */
81      @Getter @Setter
82      private Class<? extends AuditMessagePostProcessor> auditMessagePostProcessorClass;
83  
84      /**
85       * Sets the Audit Sender class to be used for sending ATNA records
86       */
87      @Getter @Setter
88      private Class<? extends AuditTransmissionProtocol> auditSenderClass;
89  
90      /**
91       * Sets the exception handler in case auditing fails
92       */
93      @Getter @Setter
94      private Class<? extends AuditExceptionHandler> auditExceptionHandlerClass = LoggingAuditExceptionHandler.class;
95  
96  
97      @Getter @Setter
98      private boolean includeParticipantsFromResponse;
99  
100 }