-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
433: HAPI FHIR REST Audit Sender for BALP Audits
- Loading branch information
Boris Stanojevic
committed
Jan 25, 2024
1 parent
4766c2a
commit 7df3541
Showing
62 changed files
with
1,937 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,3 +29,4 @@ work | |
/commons/ihe/xds/generated-stubs | ||
generated-stubs | ||
/commons/audit/.vertx | ||
/local_history.patch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
commons/audit/src/main/java/org/openehealth/ipf/commons/audit/FhirContextHolder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright 2024 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.openehealth.ipf.commons.audit; | ||
|
||
import ca.uhn.fhir.context.FhirContext; | ||
|
||
public class FhirContextHolder { | ||
|
||
private static final ThreadLocal<FhirContext> currentFhirContext = new ThreadLocal<>(); | ||
|
||
public static void setCurrentContext(FhirContext fhirContext) { | ||
currentFhirContext.set(fhirContext); | ||
} | ||
|
||
public static FhirContext get() { | ||
return currentFhirContext.get(); | ||
} | ||
|
||
public static void remove() { | ||
currentFhirContext.remove(); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
...in/java/org/openehealth/ipf/commons/audit/protocol/AuditTransmissionProtocolProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright 2024 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.openehealth.ipf.commons.audit.protocol; | ||
|
||
import org.openehealth.ipf.commons.audit.TlsParameters; | ||
|
||
/** | ||
* A Service Provider interface located and loaded by {@link java.util.ServiceLoader}. | ||
* Implementations should provide an instance of {@link AuditTransmissionProtocol} | ||
* | ||
* @see AuditTransmissionProtocol | ||
* @see AuditTransmissionChannel | ||
* | ||
* @author Boris Stanojevic | ||
*/ | ||
public interface AuditTransmissionProtocolProvider { | ||
AuditTransmissionProtocol createAuditTransmissionProtocol(TlsParameters tlsParameters); | ||
} |
29 changes: 29 additions & 0 deletions
29
...va/org/openehealth/ipf/commons/audit/protocol/providers/NettyTLSSyslogSenderProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright 2024 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.openehealth.ipf.commons.audit.protocol.providers; | ||
|
||
import org.openehealth.ipf.commons.audit.TlsParameters; | ||
import org.openehealth.ipf.commons.audit.protocol.AuditTransmissionProtocol; | ||
import org.openehealth.ipf.commons.audit.protocol.AuditTransmissionProtocolProvider; | ||
import org.openehealth.ipf.commons.audit.protocol.NettyTLSSyslogSenderImpl; | ||
|
||
public class NettyTLSSyslogSenderProvider implements AuditTransmissionProtocolProvider { | ||
|
||
@Override | ||
public AuditTransmissionProtocol createAuditTransmissionProtocol(TlsParameters tlsParameters) { | ||
return new NettyTLSSyslogSenderImpl(tlsParameters); | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
...openehealth/ipf/commons/audit/protocol/providers/ReactorNettyTLSSyslogSenderProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright 2024 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.openehealth.ipf.commons.audit.protocol.providers; | ||
|
||
import org.openehealth.ipf.commons.audit.TlsParameters; | ||
import org.openehealth.ipf.commons.audit.protocol.AuditTransmissionProtocol; | ||
import org.openehealth.ipf.commons.audit.protocol.AuditTransmissionProtocolProvider; | ||
import org.openehealth.ipf.commons.audit.protocol.ReactorNettyTLSSyslogSenderImpl; | ||
|
||
public class ReactorNettyTLSSyslogSenderProvider implements AuditTransmissionProtocolProvider { | ||
|
||
@Override | ||
public AuditTransmissionProtocol createAuditTransmissionProtocol(TlsParameters tlsParameters) { | ||
return new ReactorNettyTLSSyslogSenderImpl(tlsParameters); | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
...ealth/ipf/commons/audit/protocol/providers/RecordingAuditMessageTransmissionProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright 2024 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.openehealth.ipf.commons.audit.protocol.providers; | ||
|
||
import org.openehealth.ipf.commons.audit.TlsParameters; | ||
import org.openehealth.ipf.commons.audit.protocol.AuditTransmissionProtocol; | ||
import org.openehealth.ipf.commons.audit.protocol.AuditTransmissionProtocolProvider; | ||
import org.openehealth.ipf.commons.audit.protocol.RecordingAuditMessageTransmission; | ||
|
||
public class RecordingAuditMessageTransmissionProvider implements AuditTransmissionProtocolProvider { | ||
|
||
@Override | ||
public AuditTransmissionProtocol createAuditTransmissionProtocol(TlsParameters tlsParameters) { | ||
return new RecordingAuditMessageTransmission(tlsParameters); | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
...in/java/org/openehealth/ipf/commons/audit/protocol/providers/TLSSyslogSenderProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright 2024 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.openehealth.ipf.commons.audit.protocol.providers; | ||
|
||
import org.openehealth.ipf.commons.audit.TlsParameters; | ||
import org.openehealth.ipf.commons.audit.protocol.AuditTransmissionProtocol; | ||
import org.openehealth.ipf.commons.audit.protocol.AuditTransmissionProtocolProvider; | ||
import org.openehealth.ipf.commons.audit.protocol.TLSSyslogSenderImpl; | ||
|
||
public class TLSSyslogSenderProvider implements AuditTransmissionProtocolProvider { | ||
|
||
@Override | ||
public AuditTransmissionProtocol createAuditTransmissionProtocol(TlsParameters tlsParameters) { | ||
return new TLSSyslogSenderImpl(tlsParameters); | ||
} | ||
} |
Oops, something went wrong.