public class DaoConfig extends Object
| Modifier and Type | Field and Description |
|---|---|
static Set<String> |
DEFAULT_LOGICAL_BASE_URLS
Default
logical URL bases. |
| Constructor and Description |
|---|
DaoConfig() |
| Modifier and Type | Method and Description |
|---|---|
void |
addTreatReferencesAsLogical(String theTreatReferencesAsLogical)
Add a value to the
logical references list. |
int |
getDeferIndexingForCodesystemsOfSize()
When a code system is added that contains more than this number of codes,
the code system will be indexed later in an incremental process in order to
avoid overwhelming Lucene with a huge number of codes in a single operation.
|
long |
getExpireSearchResultsAfterMillis()
Sets the number of milliseconds that search results for a given client search
should be preserved before being purged from the database.
|
int |
getHardTagListLimit()
Gets the maximum number of results to return in a GetTags query (DSTU1 only)
|
int |
getIncludeLimit() |
List<IServerInterceptor> |
getInterceptors()
Deprecated.
As of 2.2 this method is deprecated. There is no good reason to register an interceptor
with the DaoConfig and not with the server via
RestfulServer.registerInterceptor(IServerInterceptor) |
int |
getMaximumExpansionSize()
|
ResourceEncodingEnum |
getResourceEncoding() |
long |
getSubscriptionPollDelay() |
Long |
getSubscriptionPurgeInactiveAfterMillis() |
Set<String> |
getTreatBaseUrlsAsLocal()
This setting may be used to advise the server that any references found in
resources that have any of the base URLs given here will be replaced with
simple local references.
|
Set<String> |
getTreatReferencesAsLogical()
This setting may be used to advise the server that any references found in
resources that have any of the base URLs given here will be treated as logical
references instead of being treated as real references.
|
boolean |
isAllowExternalReferences()
If set to
true (default is false) the server will allow
resources to have references to external servers. |
boolean |
isAllowInlineMatchUrlReferences() |
boolean |
isAllowMultipleDelete() |
boolean |
isDefaultSearchParamsCanBeOverridden()
If set to
true the default search params (i.e. |
boolean |
isExpireSearchResults()
If this is set to
false (default is true) the stale search deletion
task will be disabled (meaning that search results will be retained in the database indefinitely). |
boolean |
isIndexContainedResources()
Should contained IDs be indexed the same way that non-contained IDs are (default is
true) |
boolean |
isSchedulingDisabled() |
boolean |
isSubscriptionEnabled()
|
void |
setAllowExternalReferences(boolean theAllowExternalReferences)
If set to
true (default is false) the server will allow
resources to have references to external servers. |
void |
setAllowInlineMatchUrlReferences(boolean theAllowInlineMatchUrlReferences)
Should references containing match URLs be resolved and replaced in create and update operations.
|
void |
setAllowMultipleDelete(boolean theAllowMultipleDelete) |
void |
setDefaultSearchParamsCanBeOverridden(boolean theDefaultSearchParamsCanBeOverridden)
If set to
true the default search params (i.e. |
void |
setDeferIndexingForCodesystemsOfSize(int theDeferIndexingForCodesystemsOfSize)
When a code system is added that contains more than this number of codes,
the code system will be indexed later in an incremental process in order to
avoid overwhelming Lucene with a huge number of codes in a single operation.
|
void |
setExpireSearchResults(boolean theDeleteStaleSearches)
If this is set to
false (default is true) the stale search deletion
task will be disabled (meaning that search results will be retained in the database indefinitely). |
void |
setExpireSearchResultsAfterMillis(long theExpireSearchResultsAfterMillis)
Sets the number of milliseconds that search results for a given client search
should be preserved before being purged from the database.
|
void |
setHardSearchLimit(int theHardSearchLimit)
Deprecated.
This method does not do anything. Configure the page size on your
paging provider instead. Deprecated in HAPI FHIR 2.3 (Jan 2017)
|
void |
setHardTagListLimit(int theHardTagListLimit)
Gets the maximum number of results to return in a GetTags query (DSTU1 only)
|
void |
setIncludeLimit(int theIncludeLimit)
This is the maximum number of resources that will be added to a single page of returned resources.
|
void |
setIndexContainedResources(boolean theIndexContainedResources)
Should contained IDs be indexed the same way that non-contained IDs are (default is
true) |
void |
setInterceptors(IServerInterceptor... theInterceptor)
Deprecated.
As of 2.2 this method is deprecated. There is no good reason to register an interceptor
with the DaoConfig and not with the server via
RestfulServer.registerInterceptor(IServerInterceptor) |
void |
setInterceptors(List<IServerInterceptor> theInterceptors)
Deprecated.
As of 2.2 this method is deprecated. There is no good reason to register an interceptor
with the DaoConfig and not with the server via
RestfulServer.registerInterceptor(IServerInterceptor) |
void |
setMaximumExpansionSize(int theMaximumExpansionSize)
Sets the maximum number of codes that will be added to a valueset expansion before
the operation will be failed as too costly
|
void |
setResourceEncoding(ResourceEncodingEnum theResourceEncoding) |
void |
setSchedulingDisabled(boolean theSchedulingDisabled) |
void |
setSubscriptionEnabled(boolean theSubscriptionEnabled)
If set to true, the server will enable support for subscriptions.
|
void |
setSubscriptionPollDelay(long theSubscriptionPollDelay) |
void |
setSubscriptionPurgeInactiveAfterMillis(Long theMillis) |
void |
setSubscriptionPurgeInactiveAfterSeconds(int theSeconds) |
void |
setTreatBaseUrlsAsLocal(Set<String> theTreatBaseUrlsAsLocal)
This setting may be used to advise the server that any references found in
resources that have any of the base URLs given here will be replaced with
simple local references.
|
DaoConfig |
setTreatReferencesAsLogical(Set<String> theTreatReferencesAsLogical)
This setting may be used to advise the server that any references found in
resources that have any of the base URLs given here will be treated as logical
references instead of being treated as real references.
|
public static final Set<String> DEFAULT_LOGICAL_BASE_URLS
logical URL bases. Includes the following
values:
"http://hl7.org/fhir/valueset-*""http://hl7.org/fhir/codesystem-*""http://hl7.org/fhir/StructureDefinition/*"public void addTreatReferencesAsLogical(String theTreatReferencesAsLogical)
logical references list.setTreatReferencesAsLogical(Set)public int getDeferIndexingForCodesystemsOfSize()
Defaults to 2000
public long getExpireSearchResultsAfterMillis()
Search results are stored in the database so that they can be paged over multiple requests. After this number of milliseconds, they will be deleted from the database, and any paging links (next/prev links in search response bundles) will become invalid. Defaults to 1 hour.
To disable this feature entirely, see setExpireSearchResults(boolean)
public int getHardTagListLimit()
public int getIncludeLimit()
@Deprecated public List<IServerInterceptor> getInterceptors()
RestfulServer.registerInterceptor(IServerInterceptor)setInterceptors(List)public int getMaximumExpansionSize()
public ResourceEncodingEnum getResourceEncoding()
public long getSubscriptionPollDelay()
public Long getSubscriptionPurgeInactiveAfterMillis()
public Set<String> getTreatBaseUrlsAsLocal()
For example, if the set contains the value http://example.com/base/
and a resource is submitted to the server that contains a reference to
http://example.com/base/Patient/1, the server will automatically
convert this reference to Patient/1
Note that this property has different behaviour from getTreatReferencesAsLogical()
getTreatReferencesAsLogical()public Set<String> getTreatReferencesAsLogical()
A logical reference is a reference which is treated as an identifier, and does not neccesarily resolve. See "http://hl7.org/fhir/references.html" for a description of logical references. For example, the valueset "http://hl7.org/fhir/valueset-quantity-comparator.html" is a logical reference.
Values for this field may take either of the following forms:
http://example.com/some-url (will be matched exactly)http://example.com/some-base* (will match anything beginning with the part before the *)Default values for this propertypublic boolean isAllowExternalReferences()
true (default is false) the server will allow
resources to have references to external servers. For example if this server is
running at http://example.com/fhir and this setting is set to
true the server will allow a Patient resource to be saved with a
Patient.organization value of http://foo.com/Organization/1.
Under the default behaviour if this value has not been changed, the above resource would be rejected by the server because it requires all references to be resolvable on the local server.
Note that external references will be indexed by the server and may be searched
(e.g. Patient:organization), but
chained searches (e.g. Patient:organization.name) will not work across
these references.
It is recommended to also set setTreatBaseUrlsAsLocal(Set) if this value
is set to true
public boolean isAllowInlineMatchUrlReferences()
public boolean isAllowMultipleDelete()
public boolean isDefaultSearchParamsCanBeOverridden()
true the default search params (i.e. the search parameters that are
defined by the FHIR specification itself) may be overridden by uploading search
parameters to the server with the same code as the built-in search parameter.
This can be useful if you want to be able to disable or alter the behaviour of the default search parameters.
The default value for this setting is false
public boolean isExpireSearchResults()
false (default is true) the stale search deletion
task will be disabled (meaning that search results will be retained in the database indefinitely). USE WITH CAUTION.
This feature is useful if you want to define your own process for deleting these (e.g. because you are running in a cluster)
public boolean isIndexContainedResources()
true)public boolean isSchedulingDisabled()
public boolean isSubscriptionEnabled()
public void setAllowExternalReferences(boolean theAllowExternalReferences)
true (default is false) the server will allow
resources to have references to external servers. For example if this server is
running at http://example.com/fhir and this setting is set to
true the server will allow a Patient resource to be saved with a
Patient.organization value of http://foo.com/Organization/1.
Under the default behaviour if this value has not been changed, the above resource would be rejected by the server because it requires all references to be resolvable on the local server.
Note that external references will be indexed by the server and may be searched
(e.g. Patient:organization), but
chained searches (e.g. Patient:organization.name) will not work across
these references.
It is recommended to also set setTreatBaseUrlsAsLocal(Set) if this value
is set to true
public void setAllowInlineMatchUrlReferences(boolean theAllowInlineMatchUrlReferences)
Default is true beginning in HAPI FHIR 2.4, since this feature is now specified in the FHIR specification. (Previously it was an experimental/rpposed feature)
public void setAllowMultipleDelete(boolean theAllowMultipleDelete)
public void setDefaultSearchParamsCanBeOverridden(boolean theDefaultSearchParamsCanBeOverridden)
true the default search params (i.e. the search parameters that are
defined by the FHIR specification itself) may be overridden by uploading search
parameters to the server with the same code as the built-in search parameter.
This can be useful if you want to be able to disable or alter the behaviour of the default search parameters.
The default value for this setting is false
public void setDeferIndexingForCodesystemsOfSize(int theDeferIndexingForCodesystemsOfSize)
Defaults to 2000
public void setExpireSearchResults(boolean theDeleteStaleSearches)
false (default is true) the stale search deletion
task will be disabled (meaning that search results will be retained in the database indefinitely). USE WITH CAUTION.
This feature is useful if you want to define your own process for deleting these (e.g. because you are running in a cluster)
public void setExpireSearchResultsAfterMillis(long theExpireSearchResultsAfterMillis)
Search results are stored in the database so that they can be paged over multiple requests. After this number of milliseconds, they will be deleted from the database, and any paging links (next/prev links in search response bundles) will become invalid. Defaults to 1 hour.
To disable this feature entirely, see setExpireSearchResults(boolean)
@Deprecated public void setHardSearchLimit(int theHardSearchLimit)
public void setHardTagListLimit(int theHardTagListLimit)
public void setIncludeLimit(int theIncludeLimit)
public void setIndexContainedResources(boolean theIndexContainedResources)
true)@Deprecated public void setInterceptors(IServerInterceptor... theInterceptor)
RestfulServer.registerInterceptor(IServerInterceptor)@Deprecated public void setInterceptors(List<IServerInterceptor> theInterceptors)
RestfulServer.registerInterceptor(IServerInterceptor)public void setMaximumExpansionSize(int theMaximumExpansionSize)
public void setResourceEncoding(ResourceEncodingEnum theResourceEncoding)
public void setSchedulingDisabled(boolean theSchedulingDisabled)
public void setSubscriptionEnabled(boolean theSubscriptionEnabled)
public void setSubscriptionPollDelay(long theSubscriptionPollDelay)
public void setSubscriptionPurgeInactiveAfterMillis(Long theMillis)
public void setSubscriptionPurgeInactiveAfterSeconds(int theSeconds)
public void setTreatBaseUrlsAsLocal(Set<String> theTreatBaseUrlsAsLocal)
For example, if the set contains the value http://example.com/base/
and a resource is submitted to the server that contains a reference to
http://example.com/base/Patient/1, the server will automatically
convert this reference to Patient/1
theTreatBaseUrlsAsLocal - The set of base URLs. May be null, which
means no references will be treated as externalpublic DaoConfig setTreatReferencesAsLogical(Set<String> theTreatReferencesAsLogical)
A logical reference is a reference which is treated as an identifier, and does not neccesarily resolve. See "http://hl7.org/fhir/references.html" for a description of logical references. For example, the valueset "http://hl7.org/fhir/valueset-quantity-comparator.html" is a logical reference.
Values for this field may take either of the following forms:
http://example.com/some-url (will be matched exactly)http://example.com/some-base* (will match anything beginning with the part before the *)Default values for this propertyCopyright © 2014–2017 University Health Network. All rights reserved.