001package ca.uhn.fhir.rest.server; 002 003/* 004 * #%L 005 * HAPI FHIR - Core Library 006 * %% 007 * Copyright (C) 2014 - 2016 University Health Network 008 * %% 009 * Licensed under the Apache License, Version 2.0 (the "License"); 010 * you may not use this file except in compliance with the License. 011 * You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, software 016 * distributed under the License is distributed on an "AS IS" BASIS, 017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 018 * See the License for the specific language governing permissions and 019 * limitations under the License. 020 * #L% 021 */ 022 023import java.util.Collection; 024import java.util.List; 025 026import ca.uhn.fhir.context.FhirContext; 027import ca.uhn.fhir.rest.method.BaseMethodBinding; 028 029public class RestulfulServerConfiguration { 030 031 private Collection<ResourceBinding> resourceBindings; 032 private List<BaseMethodBinding<?>> serverBindings; 033 private String implementationDescription; 034 private String serverVersion; 035 private String serverName; 036 private FhirContext fhirContext; 037 private IServerAddressStrategy serverAddressStrategy; 038 private String conformanceDate; 039 040 /** 041 * Get the resourceBindings 042 * @return the resourceBindings 043 */ 044 public Collection<ResourceBinding> getResourceBindings() { 045 return resourceBindings; 046 } 047 048 /** 049 * Set the resourceBindings 050 * @param resourceBindings the resourceBindings to set 051 */ 052 public RestulfulServerConfiguration setResourceBindings(Collection<ResourceBinding> resourceBindings) { 053 this.resourceBindings = resourceBindings; 054 return this; 055 } 056 057 /** 058 * Get the serverBindings 059 * @return the serverBindings 060 */ 061 public List<BaseMethodBinding<?>> getServerBindings() { 062 return serverBindings; 063 } 064 065 /** 066 * Set the serverBindings 067 * @param serverBindings the serverBindings to set 068 */ 069 public RestulfulServerConfiguration setServerBindings(List<BaseMethodBinding<?>> serverBindings) { 070 this.serverBindings = serverBindings; 071 return this; 072 } 073 074 /** 075 * Get the implementationDescription 076 * @return the implementationDescription 077 */ 078 public String getImplementationDescription() { 079 return implementationDescription; 080 } 081 082 /** 083 * Set the implementationDescription 084 * @param implementationDescription the implementationDescription to set 085 */ 086 public RestulfulServerConfiguration setImplementationDescription(String implementationDescription) { 087 this.implementationDescription = implementationDescription; 088 return this; 089 } 090 091 /** 092 * Get the serverVersion 093 * @return the serverVersion 094 */ 095 public String getServerVersion() { 096 return serverVersion; 097 } 098 099 /** 100 * Set the serverVersion 101 * @param serverVersion the serverVersion to set 102 */ 103 public RestulfulServerConfiguration setServerVersion(String serverVersion) { 104 this.serverVersion = serverVersion; 105 return this; 106 } 107 108 /** 109 * Get the serverName 110 * @return the serverName 111 */ 112 public String getServerName() { 113 return serverName; 114 } 115 116 /** 117 * Set the serverName 118 * @param serverName the serverName to set 119 */ 120 public RestulfulServerConfiguration setServerName(String serverName) { 121 this.serverName = serverName; 122 return this; 123 } 124 125 /** 126 * Gets the {@link FhirContext} associated with this server. For efficient processing, resource providers and plain providers should generally use this context if one is needed, as opposed to 127 * creating their own. 128 */ 129 public FhirContext getFhirContext() { 130 return this.fhirContext; 131 } 132 133 /** 134 * Set the fhirContext 135 * @param fhirContext the fhirContext to set 136 */ 137 public RestulfulServerConfiguration setFhirContext(FhirContext fhirContext) { 138 this.fhirContext = fhirContext; 139 return this; 140 } 141 142 /** 143 * Get the serverAddressStrategy 144 * @return the serverAddressStrategy 145 */ 146 public IServerAddressStrategy getServerAddressStrategy() { 147 return serverAddressStrategy; 148 } 149 150 /** 151 * Set the serverAddressStrategy 152 * @param serverAddressStrategy the serverAddressStrategy to set 153 */ 154 public void setServerAddressStrategy(IServerAddressStrategy serverAddressStrategy) { 155 this.serverAddressStrategy = serverAddressStrategy; 156 } 157 158 159 /** 160 * Get the conformanceDate 161 * @return the conformanceDate 162 */ 163 public String getConformanceDate() { 164 return conformanceDate; 165 } 166 167 /** 168 * Set the conformanceDate 169 * @param conformanceDate the conformanceDate to set 170 */ 171 public void setConformanceDate(String conformanceDate) { 172 this.conformanceDate = conformanceDate; 173 } 174 175}