use of org.hl7.fhir.r4.hapi.rest.server.ServerCapabilityStatementProvider in project beneficiary-fhir-data by CMSgov.
the class V2Server method configureServerInfoMetadata.
/**
* Configures various metadata fields that will be included in this server's {@link
* CapabilityStatement}.
*/
private void configureServerInfoMetadata() {
setServerName(CAPABILITIES_SERVER_NAME);
/*
* Read in some of the project metadata from a Maven-filtered properties
* file, which ensures that it's always up to date.
*/
Properties projectProps = new Properties();
try (InputStream projectPropsStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("project.properties")) {
projectProps.load(projectPropsStream);
setImplementationDescription(projectProps.getProperty("project.id"));
setServerVersion(projectProps.getProperty("project.version"));
} catch (IOException e) {
throw new UncheckedIOException(e);
}
// Lightly customize the capability provider to set publisher name.
ServerCapabilityStatementProvider capabilityStatementProvider = new ServerCapabilityStatementProvider();
capabilityStatementProvider.setPublisher(CAPABILITIES_PUBLISHER);
setServerConformanceProvider(capabilityStatementProvider);
}
use of org.hl7.fhir.r4.hapi.rest.server.ServerCapabilityStatementProvider in project beneficiary-fhir-data by CMSgov.
the class V1Server method configureServerInfoMetadata.
/**
* Configures various metadata fields that will be included in this server's {@link
* CapabilityStatement}.
*/
private void configureServerInfoMetadata() {
setServerName(CAPABILITIES_SERVER_NAME);
/*
* Read in some of the project metadata from a Maven-filtered properties
* file, which ensures that it's always up to date.
*/
Properties projectProps = new Properties();
try (InputStream projectPropsStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("project.properties")) {
projectProps.load(projectPropsStream);
setImplementationDescription(projectProps.getProperty("project.id"));
setServerVersion(projectProps.getProperty("project.version"));
} catch (IOException e) {
throw new UncheckedIOException(e);
}
// Lightly customize the capability provider to set publisher name.
ServerCapabilityStatementProvider capabilityStatementProvider = new ServerCapabilityStatementProvider();
capabilityStatementProvider.setPublisher(CAPABILITIES_PUBLISHER);
setServerConformanceProvider(capabilityStatementProvider);
}
Aggregations