001package ca.uhn.fhir.jpa.model.util; 002 003/*- 004 * #%L 005 * HAPI FHIR JPA Model 006 * %% 007 * Copyright (C) 2014 - 2022 Smile CDR, Inc. 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 ca.uhn.fhir.rest.api.Constants; 024import ca.uhn.fhir.rest.server.provider.ProviderConstants; 025import ca.uhn.fhir.util.HapiExtensions; 026 027public class JpaConstants { 028 029 /** 030 * Userdata key for tracking the fact that a resource ID was assigned by the server 031 */ 032 public static final String RESOURCE_ID_SERVER_ASSIGNED = JpaConstants.class.getName() + "_RESOURCE_ID_SERVER_ASSIGNED"; 033 /** 034 * Operation name for the $apply-codesystem-delta-add operation 035 */ 036 public static final String OPERATION_APPLY_CODESYSTEM_DELTA_ADD = "$apply-codesystem-delta-add"; 037 /** 038 * Operation name for the $apply-codesystem-delta-remove operation 039 */ 040 public static final String OPERATION_APPLY_CODESYSTEM_DELTA_REMOVE = "$apply-codesystem-delta-remove"; 041 /** 042 * Operation name for the $expunge operation 043 * @deprecated Replace with {@link ProviderConstants#OPERATION_EXPUNGE} 044 */ 045 @Deprecated 046 public static final String OPERATION_EXPUNGE = ProviderConstants.OPERATION_EXPUNGE; 047 /** 048 * @deprecated Replace with {@link ProviderConstants#OPERATION_EXPUNGE} 049 */ 050 @Deprecated 051 public static final String OPERATION_NAME_EXPUNGE = ProviderConstants.OPERATION_EXPUNGE; 052 /** 053 * @deprecated Replace with {@link ProviderConstants#OPERATION_EXPUNGE_OUT_PARAM_EXPUNGE_COUNT} 054 */ 055 @Deprecated 056 public static final String OPERATION_EXPUNGE_PARAM_LIMIT = ProviderConstants.OPERATION_EXPUNGE_PARAM_LIMIT; 057 /** 058 * @deprecated Replace with {@link ProviderConstants#OPERATION_EXPUNGE_OUT_PARAM_EXPUNGE_COUNT} 059 */ 060 @Deprecated 061 public static final String OPERATION_EXPUNGE_PARAM_EXPUNGE_DELETED_RESOURCES = ProviderConstants.OPERATION_EXPUNGE_PARAM_EXPUNGE_DELETED_RESOURCES; 062 /** 063 * @deprecated Replace with {@link ProviderConstants#OPERATION_EXPUNGE_OUT_PARAM_EXPUNGE_COUNT} 064 */ 065 @Deprecated 066 public static final String OPERATION_EXPUNGE_PARAM_EXPUNGE_PREVIOUS_VERSIONS = ProviderConstants.OPERATION_EXPUNGE_PARAM_EXPUNGE_PREVIOUS_VERSIONS; 067 /** 068 * @deprecated Replace with {@link ProviderConstants#OPERATION_EXPUNGE_OUT_PARAM_EXPUNGE_COUNT} 069 */ 070 @Deprecated 071 public static final String OPERATION_EXPUNGE_PARAM_EXPUNGE_EVERYTHING = ProviderConstants.OPERATION_EXPUNGE_PARAM_EXPUNGE_EVERYTHING; 072 /** 073 * @deprecated Replace with {@link ProviderConstants#OPERATION_EXPUNGE_OUT_PARAM_EXPUNGE_COUNT} 074 */ 075 @Deprecated 076 public static final String OPERATION_EXPUNGE_OUT_PARAM_EXPUNGE_COUNT = ProviderConstants.OPERATION_EXPUNGE_OUT_PARAM_EXPUNGE_COUNT; 077 /** 078 * Header name for the "X-Meta-Snapshot-Mode" header, which 079 * specifies that properties in meta (tags, profiles, security labels) 080 * should be treated as a snapshot, meaning that these things will 081 * be removed if they are nt explicitly included in updates 082 */ 083 public static final String HEADER_META_SNAPSHOT_MODE = "X-Meta-Snapshot-Mode"; 084 /** 085 * Operation name for the $lookup operation 086 */ 087 public static final String OPERATION_LOOKUP = "$lookup"; 088 /** 089 * Operation name for the $expand operation 090 */ 091 public static final String OPERATION_EXPAND = "$expand"; 092 /** 093 * Operation name for the $validate-code operation 094 */ 095 public static final String OPERATION_VALIDATE_CODE = "$validate-code"; 096 /** 097 * Operation name for the $get-resource-counts operation 098 */ 099 public static final String OPERATION_GET_RESOURCE_COUNTS = "$get-resource-counts"; 100 /** 101 * Operation name for the $validate operation 102 */ 103 // NB don't delete this, it's used in Smile as well, even though hapi-fhir-server uses the version from Constants.java 104 public static final String OPERATION_VALIDATE = Constants.EXTOP_VALIDATE; 105 /** 106 * Operation name for the $everything operation 107 */ 108 public static final String OPERATION_EVERYTHING = "$everything"; 109 /** 110 * Operation name for the $process-message operation 111 */ 112 public static final String OPERATION_PROCESS_MESSAGE = "$process-message"; 113 /** 114 * Operation name for the $meta-delete operation 115 */ 116 public static final String OPERATION_META_DELETE = "$meta-delete"; 117 /** 118 * Operation name for the $meta-add operation 119 */ 120 public static final String OPERATION_META_ADD = "$meta-add"; 121 /** 122 * Operation name for the $translate operation 123 */ 124 public static final String OPERATION_TRANSLATE = "$translate"; 125 /** 126 * Operation name for the $document operation 127 */ 128 public static final String OPERATION_DOCUMENT = "$document"; 129 /** 130 * Trigger a subscription manually for a given resource 131 */ 132 public static final String OPERATION_TRIGGER_SUBSCRIPTION = "$trigger-subscription"; 133 /** 134 * Operation name for the "$subsumes" operation 135 */ 136 public static final String OPERATION_SUBSUMES = "$subsumes"; 137 /** 138 * Operation name for the "$snapshot" operation 139 */ 140 public static final String OPERATION_SNAPSHOT = "$snapshot"; 141 /** 142 * Operation name for the "$binary-access" operation 143 */ 144 public static final String OPERATION_BINARY_ACCESS_READ = "$binary-access-read"; 145 /** 146 * Operation name for the "$binary-access" operation 147 */ 148 public static final String OPERATION_BINARY_ACCESS_WRITE = "$binary-access-write"; 149 /** 150 * Operation name for the "$upload-external-code-system" operation 151 */ 152 public static final String OPERATION_UPLOAD_EXTERNAL_CODE_SYSTEM = "$upload-external-code-system"; 153 /** 154 * Operation name for the "$export" operation 155 */ 156 public static final String OPERATION_EXPORT = "$export"; 157 /** 158 * Operation name for the "$export-poll-status" operation 159 */ 160 public static final String OPERATION_EXPORT_POLL_STATUS = "$export-poll-status"; 161 /** 162 * Operation name for the "$lastn" operation 163 */ 164 public static final String OPERATION_LASTN = "$lastn"; 165 166 /** 167 * Parameter for the $export operation 168 */ 169 public static final String PARAM_EXPORT_POLL_STATUS_JOB_ID = "_jobId"; 170 /** 171 * Parameter for the $export operation 172 */ 173 public static final String PARAM_EXPORT_OUTPUT_FORMAT = "_outputFormat"; 174 /** 175 * Parameter for the $export operation 176 */ 177 public static final String PARAM_EXPORT_TYPE = "_type"; 178 /** 179 * Parameter for the $export operation 180 */ 181 public static final String PARAM_EXPORT_SINCE = "_since"; 182 /** 183 * Parameter for the $export operation 184 */ 185 public static final String PARAM_EXPORT_TYPE_FILTER = "_typeFilter"; 186 187 /** 188 * The [id] of the group when $export is called on /Group/[id]/$export 189 */ 190 public static final String PARAM_EXPORT_GROUP_ID = "_groupId"; 191 192 /** 193 * Whether mdm should be performed on group export items to expand the group items to linked items before performing the export 194 */ 195 public static final String PARAM_EXPORT_MDM = "_mdm"; 196 197 /** 198 * Parameter for delete to indicate the deleted resources should also be expunged 199 */ 200 201 public static final String PARAM_DELETE_EXPUNGE = "_expunge"; 202 203 /** 204 * URL for extension on a SearchParameter indicating that text values should not be indexed 205 */ 206 public static final String EXTENSION_EXT_SYSTEMDEFINED = JpaConstants.class.getName() + "_EXTENSION_EXT_SYSTEMDEFINED"; 207 208 /** 209 * Deprecated. Please use {@link HapiExtensions#EXT_SEARCHPARAM_PHONETIC_ENCODER} instead. 210 */ 211 @Deprecated 212 public static final String EXT_SEARCHPARAM_PHONETIC_ENCODER = HapiExtensions.EXT_SEARCHPARAM_PHONETIC_ENCODER; 213 214 public static final String VALUESET_FILTER_DISPLAY = "display"; 215 216 /** 217 * The name of the default partition 218 */ 219 public static final String DEFAULT_PARTITION_NAME = "DEFAULT"; 220 221 /** 222 * The name of the collection of all partitions 223 */ 224 public static final String ALL_PARTITIONS_NAME = "ALL_PARTITIONS"; 225 226 /** 227 * Parameter for the $expand operation 228 */ 229 public static final String OPERATION_EXPAND_PARAM_INCLUDE_HIERARCHY = "includeHierarchy"; 230 public static final String HEADER_UPSERT_EXISTENCE_CHECK = "X-Upsert-Extistence-Check"; 231 public static final String HEADER_UPSERT_EXISTENCE_CHECK_DISABLED = "disabled"; 232 233 /** 234 * Non-instantiable 235 */ 236 private JpaConstants() { 237 // nothing 238 } 239}