Oops. This was supposed to be automatically backed out. But SQUASH MERGE prevented that from happening. Hmmmmm......

This commit is contained in:
Ken Stevens 2019-01-23 18:13:29 -05:00
parent cdd75bbe3a
commit 0eb70b81fe
3 changed files with 0 additions and 29 deletions

View File

@ -295,8 +295,6 @@ public class CanonicalSubscription implements Serializable, Cloneable {
private boolean myStripVersionId; private boolean myStripVersionId;
@JsonProperty("deliverLatestVersion") @JsonProperty("deliverLatestVersion")
private boolean myDeliverLatestVersion; private boolean myDeliverLatestVersion;
@JsonProperty("maxRetries")
private int myMaxRetries;
/** /**
* Constructor * Constructor
@ -322,14 +320,6 @@ public class CanonicalSubscription implements Serializable, Cloneable {
myStripVersionId = theStripVersionId; myStripVersionId = theStripVersionId;
} }
public int getMaxRetries() {
return myMaxRetries;
}
public void setMaxRetries(int theMaxRetries) {
myMaxRetries = theMaxRetries;
}
@Override @Override
public boolean equals(Object theO) { public boolean equals(Object theO) {
if (this == theO) return true; if (this == theO) return true;
@ -341,7 +331,6 @@ public class CanonicalSubscription implements Serializable, Cloneable {
return new EqualsBuilder() return new EqualsBuilder()
.append(myStripVersionId, that.myStripVersionId) .append(myStripVersionId, that.myStripVersionId)
.append(myDeliverLatestVersion, that.myDeliverLatestVersion) .append(myDeliverLatestVersion, that.myDeliverLatestVersion)
.append(myMaxRetries, that.myMaxRetries)
.isEquals(); .isEquals();
} }
@ -350,7 +339,6 @@ public class CanonicalSubscription implements Serializable, Cloneable {
return new HashCodeBuilder(17, 37) return new HashCodeBuilder(17, 37)
.append(myStripVersionId) .append(myStripVersionId)
.append(myDeliverLatestVersion) .append(myDeliverLatestVersion)
.append(myMaxRetries)
.toHashCode(); .toHashCode();
} }

View File

@ -115,19 +115,14 @@ public class SubscriptionCanonicalizer<S extends IBaseResource> {
String stripVersionIds; String stripVersionIds;
String deliverLatestVersion; String deliverLatestVersion;
String maxRetries;
try { try {
stripVersionIds = subscription.getChannel().getExtensionString(SubscriptionConstants.EXT_SUBSCRIPTION_RESTHOOK_STRIP_VERSION_IDS); stripVersionIds = subscription.getChannel().getExtensionString(SubscriptionConstants.EXT_SUBSCRIPTION_RESTHOOK_STRIP_VERSION_IDS);
deliverLatestVersion = subscription.getChannel().getExtensionString(SubscriptionConstants.EXT_SUBSCRIPTION_RESTHOOK_DELIVER_LATEST_VERSION); deliverLatestVersion = subscription.getChannel().getExtensionString(SubscriptionConstants.EXT_SUBSCRIPTION_RESTHOOK_DELIVER_LATEST_VERSION);
maxRetries = subscription.getChannel().getExtensionString(SubscriptionConstants.EXT_SUBSCRIPTION_MAX_RETRIES);
} catch (FHIRException theE) { } catch (FHIRException theE) {
throw new ConfigurationException("Failed to extract subscription extension(s): " + theE.getMessage(), theE); throw new ConfigurationException("Failed to extract subscription extension(s): " + theE.getMessage(), theE);
} }
retVal.getRestHookDetails().setStripVersionId(Boolean.parseBoolean(stripVersionIds)); retVal.getRestHookDetails().setStripVersionId(Boolean.parseBoolean(stripVersionIds));
retVal.getRestHookDetails().setDeliverLatestVersion(Boolean.parseBoolean(deliverLatestVersion)); retVal.getRestHookDetails().setDeliverLatestVersion(Boolean.parseBoolean(deliverLatestVersion));
if (isNotBlank(maxRetries)) {
retVal.getRestHookDetails().setMaxRetries(Integer.parseInt(maxRetries));
}
} }
} catch (FHIRException theE) { } catch (FHIRException theE) {
@ -246,20 +241,14 @@ public class SubscriptionCanonicalizer<S extends IBaseResource> {
if (retVal.getChannelType() == CanonicalSubscriptionChannelType.RESTHOOK) { if (retVal.getChannelType() == CanonicalSubscriptionChannelType.RESTHOOK) {
String stripVersionIds; String stripVersionIds;
String deliverLatestVersion; String deliverLatestVersion;
String maxRetries;
try { try {
stripVersionIds = subscription.getChannel().getExtensionString(SubscriptionConstants.EXT_SUBSCRIPTION_RESTHOOK_STRIP_VERSION_IDS); stripVersionIds = subscription.getChannel().getExtensionString(SubscriptionConstants.EXT_SUBSCRIPTION_RESTHOOK_STRIP_VERSION_IDS);
deliverLatestVersion = subscription.getChannel().getExtensionString(SubscriptionConstants.EXT_SUBSCRIPTION_RESTHOOK_DELIVER_LATEST_VERSION); deliverLatestVersion = subscription.getChannel().getExtensionString(SubscriptionConstants.EXT_SUBSCRIPTION_RESTHOOK_DELIVER_LATEST_VERSION);
maxRetries = subscription.getChannel().getExtensionString(SubscriptionConstants.EXT_SUBSCRIPTION_MAX_RETRIES);
} catch (FHIRException theE) { } catch (FHIRException theE) {
throw new ConfigurationException("Failed to extract subscription extension(s): " + theE.getMessage(), theE); throw new ConfigurationException("Failed to extract subscription extension(s): " + theE.getMessage(), theE);
} }
retVal.getRestHookDetails().setStripVersionId(Boolean.parseBoolean(stripVersionIds)); retVal.getRestHookDetails().setStripVersionId(Boolean.parseBoolean(stripVersionIds));
retVal.getRestHookDetails().setDeliverLatestVersion(Boolean.parseBoolean(deliverLatestVersion)); retVal.getRestHookDetails().setDeliverLatestVersion(Boolean.parseBoolean(deliverLatestVersion));
if (isNotBlank(maxRetries)) {
retVal.getRestHookDetails().setMaxRetries(Integer.parseInt(maxRetries));
}
} }
List<Extension> topicExts = subscription.getExtensionsByUrl("http://hl7.org/fhir/subscription/topics"); List<Extension> topicExts = subscription.getExtensionsByUrl("http://hl7.org/fhir/subscription/topics");

View File

@ -67,12 +67,6 @@ public class SubscriptionConstants {
*/ */
public static final String EXT_SUBSCRIPTION_RESTHOOK_DELIVER_LATEST_VERSION = "http://hapifhir.io/fhir/StructureDefinition/subscription-resthook-deliver-latest-version"; public static final String EXT_SUBSCRIPTION_RESTHOOK_DELIVER_LATEST_VERSION = "http://hapifhir.io/fhir/StructureDefinition/subscription-resthook-deliver-latest-version";
/**
* This extension URL indicates the maximum number of delivery retries that will be attempted before the subscription delivery is considered to have failed.
*/
public static final String EXT_SUBSCRIPTION_MAX_RETRIES = "http://hapifhir.io/fhir/StructureDefinition/subscription-max-retries";
/** /**
* The number of threads used in subscription channel processing * The number of threads used in subscription channel processing
*/ */