release notes

This commit is contained in:
Grahame Grieve 2024-12-09 07:52:33 +04:00
parent f71dd296c8
commit ca2a726187
3 changed files with 119 additions and 6 deletions

View File

@ -39,4 +39,5 @@
* fix issue with comparison template missing
* Apply null pointer check to all switch(Enumeration) statements in version conversion code
* Remove mysql dependency
* Fix bug in DecimalType on null Bigdecimal ()] all versions)
* Fix bug in DecimalType on null Bigdecimal ()] all versions)
* Fix bad URL in inter-version extension conversion of ValueSet for ValueSet property

View File

@ -0,0 +1,110 @@
package org.hl7.fhir.utilities.logging;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Nonnull;
import org.hl7.fhir.utilities.Utilities;
/**
* see security.md - manages logging by the FHIR HAPI Core library
*
* @author Grahame
*
*/
public class ManagedLogging {
public interface ILoggingProvider {
public void log(String msg);
}
public enum LoggingPolicy {
CONSOLE, // log messages go to System.out (default)
IGNORED, // log messages don't go anywhere
LOG4J, // log messages go to Log4J
CUSTOM, // log messages to an ILoggingProvider implementation
}
private static LoggingPolicy logPolicy = LoggingPolicy.CONSOLE; // for legacy reasons
private static ILoggingProvider provider;
public static LoggingPolicy getLogPolicy() {
return logPolicy;
}
public static void setLogPolicy(@Nonnull LoggingPolicy logPolicy) {
ManagedLogging.logPolicy = logPolicy;
}
public static ILoggingProvider getProvider() {
return provider;
}
public static void setProvider(ILoggingProvider provider) {
ManagedLogging.provider = provider;
}
/**
* message
**/
public static void log(String message) throws IOException {
switch (logPolicy) {
case CONSOLE:
System.out.println(message);
case CUSTOM:
if (provider != null) {
provider.log(message);
}
case IGNORED:
// nothing
break;
case LOG4J:
// todo
break;
default:
throw new Error("LogPolicy is not valid ");
}
}
}

View File

@ -8,7 +8,9 @@ Please report all potential security vulnerabilities using the [Report a vulnera
The main use of the local file system for the core library (other than the validator - see below) is for the
[NPM package cache](https://confluence.hl7.org/display/FHIR/FHIR+Package+Cache). The default location and content
is as specified in the FHIR specification, but you can choose where this goes if you want, or provide your own NPM package cache manager. However there are other uses of the local file system scattered throughout the code, particularly in the test cases.
is as specified in the FHIR specification, but you can choose where this goes if you want, or provide your own
NPM package cache manager. However there are other uses of the local file system scattered throughout the code,
particularly in the test cases.
All access to the local file system runs through the class ManagedFileAccess. You can
set the static features of this class to completely cut the library off from the
@ -25,10 +27,10 @@ restricting path access to particular directories.
# Network access
The library will access the web to download needed collateral, or to access terminology resources or servers.
All access is by http(s) using base java http library, and is controlled by the class ManagedWebAccess. You can
set the static features of this class to completely cut the library off from the
web, or provide your own web accessor, or limit the web resources accessed
to particular domains or sub-domains. See ManagedWebAccess for details.
All access is by http(s) using the httpok library, and is controlled by the class ManagedWebAccess. You can
set the static features of this class to completely cut the library off from the web, or provide your own
web accessor, or limit the web resources accessed to particular domains or sub-domains. See ManagedWebAccess
for details.
Note that for legacy reasons, network access can also be prohibited using
FhirSettings.setProhibitNetworkAccess(), but this is deprecated.