Merge pull request #2345 from hapifhir/mimetype-to-mediatype
Change name of mimetype to mediatype
This commit is contained in:
commit
589d323175
|
@ -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 {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue