diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/messaging/BaseResourceMessage.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/messaging/BaseResourceMessage.java index 0f4a4e5e124..f1ce661c719 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/messaging/BaseResourceMessage.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/messaging/BaseResourceMessage.java @@ -24,7 +24,6 @@ package ca.uhn.fhir.rest.server.messaging; import ca.uhn.fhir.model.api.IModelJson; import com.fasterxml.jackson.annotation.JsonProperty; -import com.google.common.net.MediaType; import org.apache.commons.lang3.Validate; import javax.annotation.Nullable; @@ -44,8 +43,8 @@ public abstract class BaseResourceMessage implements IResourceMessage, IModelJso @JsonProperty("transactionId") private String myTransactionId; - @JsonProperty("mimeType") - private String myMimeType; + @JsonProperty("mediaType") + private String myMediaType; /** * Returns an attribute stored in this message. @@ -149,12 +148,12 @@ public abstract class BaseResourceMessage implements IResourceMessage, IModelJso myTransactionId = theTransactionId; } - public String getMimeType() { - return myMimeType; + public String getMediaType() { + return myMediaType; } - public void setMimeType(String theMimeType) { - myMimeType = theMimeType; + public void setMediaType(String theMediaType) { + myMediaType = theMediaType; } public enum OperationTypeEnum { diff --git a/hapi-fhir-server/src/test/java/ca/uhn/fhir/rest/server/messaging/BaseResourceModifiedMessageTest.java b/hapi-fhir-server/src/test/java/ca/uhn/fhir/rest/server/messaging/BaseResourceModifiedMessageTest.java index 3683c1facba..cadfaa5ff69 100644 --- a/hapi-fhir-server/src/test/java/ca/uhn/fhir/rest/server/messaging/BaseResourceModifiedMessageTest.java +++ b/hapi-fhir-server/src/test/java/ca/uhn/fhir/rest/server/messaging/BaseResourceModifiedMessageTest.java @@ -19,7 +19,7 @@ class ResourceOperationMessageTest { public void testSerializationAndDeserializationOfResourceModifiedMessage() throws JsonProcessingException { ResourceOperationJsonMessage jsonMessage = new ResourceOperationJsonMessage(); ResourceOperationMessage payload = new ResourceOperationMessage(); - payload.setMimeType(Constants.CT_FHIR_JSON_NEW); + payload.setMediaType(Constants.CT_FHIR_JSON_NEW); jsonMessage.setPayload(payload); ObjectMapper mapper = new ObjectMapper(); String serialized = mapper.writeValueAsString(jsonMessage);