diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 00000000000..b21223c3726 --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,17 @@ +# Two years until issues go stale +daysUntilStale: 730 +# Number of days of inactivity before a stale issue is closed +daysUntilClose: 7 +# Issues with these labels will never be considered stale +exemptLabels: + - pinned + - security +# Label to use when marking an issue as stale +staleLabel: wontfix +# Comment to post when marking an issue as stale. Set to `false` to disable +markComment: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. +# Comment to post when closing a stale issue. Set to `false` to disable +closeComment: false diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java index b0e7d69c9ac..45273c488d8 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java @@ -3,7 +3,7 @@ package ca.uhn.fhir.context; import ca.uhn.fhir.context.api.AddProfileTagEnum; import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; import ca.uhn.fhir.context.support.IValidationSupport; -import ca.uhn.fhir.fluentpath.IFluentPath; +import ca.uhn.fhir.fhirpath.IFhirPath; import ca.uhn.fhir.i18n.HapiLocalizer; import ca.uhn.fhir.model.api.IElement; import ca.uhn.fhir.model.api.IFhirVersion; @@ -625,12 +625,21 @@ public class FhirContext { } /** - * Creates a new FluentPath engine which can be used to exvaluate + * @since 2.2 + * @deprecated Deprecated in HAPI FHIR 5.0.0. Use {@link #newFhirPath()} instead. + */ + @Deprecated + public IFhirPath newFluentPath() { + return newFhirPath(); + } + + /** + * Creates a new FhirPath engine which can be used to evaluate * path expressions over FHIR resources. Note that this engine will use the * {@link IValidationSupport context validation support} module which is * configured on the context at the time this method is called. *

- * In other words, call {@link #setValidationSupport(IValidationSupport)} before + * In other words, you may wish to call {@link #setValidationSupport(IValidationSupport)} before * calling {@link #newFluentPath()} *

*

@@ -640,10 +649,10 @@ public class FhirContext { * {@link UnsupportedOperationException} *

* - * @since 2.2 + * @since 5.0.0 */ - public IFluentPath newFluentPath() { - return myVersion.createFluentPathExecutor(this); + public IFhirPath newFhirPath() { + return myVersion.createFhirPathExecutor(this); } /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/fluentpath/FluentPathExecutionException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/fhirpath/FhirPathExecutionException.java similarity index 73% rename from hapi-fhir-base/src/main/java/ca/uhn/fhir/fluentpath/FluentPathExecutionException.java rename to hapi-fhir-base/src/main/java/ca/uhn/fhir/fhirpath/FhirPathExecutionException.java index 8cd3e96f0a6..04413995318 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/fluentpath/FluentPathExecutionException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/fhirpath/FhirPathExecutionException.java @@ -1,4 +1,4 @@ -package ca.uhn.fhir.fluentpath; +package ca.uhn.fhir.fhirpath; /* * #%L @@ -23,18 +23,18 @@ package ca.uhn.fhir.fluentpath; import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; /** - * This exception is thrown if a FluentPath expression can not be executed successfully + * This exception is thrown if a FHIRPath expression can not be executed successfully * for any reason */ -public class FluentPathExecutionException extends InternalErrorException { +public class FhirPathExecutionException extends InternalErrorException { private static final long serialVersionUID = 1L; - public FluentPathExecutionException(Throwable theCause) { + public FhirPathExecutionException(Throwable theCause) { super(theCause); } - public FluentPathExecutionException(String theMessage) { + public FhirPathExecutionException(String theMessage) { super(theMessage); } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/fluentpath/IFluentPath.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/fhirpath/IFhirPath.java similarity index 96% rename from hapi-fhir-base/src/main/java/ca/uhn/fhir/fluentpath/IFluentPath.java rename to hapi-fhir-base/src/main/java/ca/uhn/fhir/fhirpath/IFhirPath.java index 8d225b20c27..a15f716c37f 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/fluentpath/IFluentPath.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/fhirpath/IFhirPath.java @@ -1,4 +1,4 @@ -package ca.uhn.fhir.fluentpath; +package ca.uhn.fhir.fhirpath; /* * #%L @@ -25,7 +25,7 @@ import java.util.Optional; import org.hl7.fhir.instance.model.api.IBase; -public interface IFluentPath { +public interface IFhirPath { /** * Apply the given FluentPath expression against the given input and return diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Pointcut.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Pointcut.java index 634ccade76e..dbcd4fea92f 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Pointcut.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Pointcut.java @@ -27,7 +27,12 @@ import ca.uhn.fhir.rest.server.exceptions.AuthenticationException; import ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException; import javax.annotation.Nonnull; -import java.util.*; +import java.io.Writer; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Set; /** * Value for {@link Hook#value()} @@ -374,6 +379,44 @@ public enum Pointcut { ), + /** + * Server Hook: + * This method is called when a stream writer is generated that will be used to stream a non-binary response to + * a client. Hooks may return a wrapped writer which adds additional functionality as needed. + * + *

+ * Hooks may accept the following parameters: + *

+ *

+ *

+ * Hook methods should return a {@link Writer} instance that will be used to stream the response. Hook methods + * should not throw any exception. + *

+ * + * @since 5.0.0 + */ + SERVER_OUTGOING_WRITER_CREATED(Writer.class, + "java.io.Writer", + "ca.uhn.fhir.rest.api.server.RequestDetails", + "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails" + ), + /** * Server Hook: @@ -1643,12 +1686,12 @@ public enum Pointcut { *

*

* THIS IS AN EXPERIMENTAL HOOK AND MAY BE REMOVED OR CHANGED WITHOUT WARNING. - *

- *

+ *

+ *

* Note that this is a performance tracing hook. Use with caution in production * systems, since calling it may (or may not) carry a cost. - *

- *

+ *

+ *

* Hooks may accept the following parameters: *

*