Package org.hl7.fhir.dstu2.model
Class Subscription
- java.lang.Object
-
- org.hl7.fhir.dstu2.model.Base
-
- org.hl7.fhir.dstu2.model.BaseResource
-
- org.hl7.fhir.dstu2.model.Resource
-
- org.hl7.fhir.dstu2.model.DomainResource
-
- org.hl7.fhir.dstu2.model.Subscription
-
- All Implemented Interfaces:
ca.uhn.fhir.model.api.IElement,Serializable,org.hl7.fhir.instance.model.api.IAnyResource,org.hl7.fhir.instance.model.api.IBase,org.hl7.fhir.instance.model.api.IBaseHasExtensions,org.hl7.fhir.instance.model.api.IBaseHasModifierExtensions,org.hl7.fhir.instance.model.api.IBaseResource,org.hl7.fhir.instance.model.api.IDomainResource
public class Subscription extends DomainResource
The subscription resource is used to define a push based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined "channel" so that another system is able to take an appropriate action.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSubscription.SubscriptionChannelComponentstatic classSubscription.SubscriptionChannelTypestatic classSubscription.SubscriptionChannelTypeEnumFactorystatic classSubscription.SubscriptionStatusstatic classSubscription.SubscriptionStatusEnumFactory
-
Field Summary
Fields Modifier and Type Field Description protected Subscription.SubscriptionChannelComponentchannelDetails where to send notifications when resources are received that meet the criteria.protected List<ContactPoint>contactContact details for a human to contact about the subscription.protected StringTypecriteriaThe rules that the server should use to determine when to generate notifications for this subscription.protected InstantTypeendThe time for the server to turn the subscription off.protected StringTypeerrorA record of the last error that occurred when the server processed a notification.protected StringTypereasonA description of why this subscription is defined.static StringSP_CONTACTstatic StringSP_CRITERIAstatic StringSP_PAYLOADstatic StringSP_STATUSstatic StringSP_TAGstatic StringSP_TYPEstatic StringSP_URLprotected Enumeration<Subscription.SubscriptionStatus>statusThe status of the subscription, which marks the server state for managing the subscription.protected List<Coding>tagA tag to add to any resource that matches the criteria, after the subscription is processed.-
Fields inherited from class org.hl7.fhir.dstu2.model.DomainResource
contained, extension, modifierExtension, text
-
Fields inherited from class org.hl7.fhir.dstu2.model.Resource
id, implicitRules, language, meta
-
-
Constructor Summary
Constructors Constructor Description Subscription()Subscription(StringType criteria, StringType reason, Enumeration<Subscription.SubscriptionStatus> status, Subscription.SubscriptionChannelComponent channel)
-
Method Summary
-
Methods inherited from class org.hl7.fhir.dstu2.model.DomainResource
addContained, addExtension, addExtension, addModifierExtension, addModifierExtension, copyValues, getContained, getExtension, getModifierExtension, getText, hasContained, hasExtension, hasModifierExtension, hasText, setText
-
Methods inherited from class org.hl7.fhir.dstu2.model.Resource
copyValues, getId, getIdElement, getImplicitRules, getImplicitRulesElement, getLanguage, getLanguageElement, getMeta, hasId, hasIdElement, hasImplicitRules, hasImplicitRulesElement, hasLanguage, hasLanguageElement, hasMeta, setId, setIdElement, setImplicitRules, setImplicitRulesElement, setLanguage, setLanguageElement, setMeta
-
Methods inherited from class org.hl7.fhir.dstu2.model.BaseResource
getStructureFhirVersionEnum, setId
-
Methods inherited from class org.hl7.fhir.dstu2.model.Base
castToAddress, castToAnnotation, castToAttachment, castToBase64Binary, castToBoolean, castToCode, castToCodeableConcept, castToCoding, castToContactPoint, castToDate, castToDateTime, castToDecimal, castToDuration, castToElementDefinition, castToExtension, castToHumanName, castToId, castToIdentifier, castToInstant, castToInteger, castToMarkdown, castToMeta, castToMoney, castToNarrative, castToOid, castToPeriod, castToPositiveInt, castToQuantity, castToRange, castToRatio, castToReference, castToResource, castToSampledData, castToSignature, castToSimpleQuantity, castToString, castToTime, castToTiming, castToUnsignedInt, castToUri, children, compareDeep, compareDeep, compareDeep, compareValues, compareValues, equals, getChildByName, getFormatCommentsPost, getFormatCommentsPre, getUserData, getUserInt, getUserString, hasFormatComment, hasType, hasUserData, isMetadataBased, isPrimitive, listChildrenByName, primitiveValue, setUserData, setUserDataINN
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hl7.fhir.instance.model.api.IAnyResource
getId, getIdElement, getLanguageElement, getUserData, setId, setUserData
-
-
-
-
Field Detail
-
criteria
protected StringType criteria
The rules that the server should use to determine when to generate notifications for this subscription.
-
contact
protected List<ContactPoint> contact
Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.
-
reason
protected StringType reason
A description of why this subscription is defined.
-
status
protected Enumeration<Subscription.SubscriptionStatus> status
The status of the subscription, which marks the server state for managing the subscription.
-
error
protected StringType error
A record of the last error that occurred when the server processed a notification.
-
channel
protected Subscription.SubscriptionChannelComponent channel
Details where to send notifications when resources are received that meet the criteria.
-
end
protected InstantType end
The time for the server to turn the subscription off.
-
tag
protected List<Coding> tag
A tag to add to any resource that matches the criteria, after the subscription is processed.
-
SP_PAYLOAD
public static final String SP_PAYLOAD
- See Also:
- Constant Field Values
-
SP_CRITERIA
public static final String SP_CRITERIA
- See Also:
- Constant Field Values
-
SP_CONTACT
public static final String SP_CONTACT
- See Also:
- Constant Field Values
-
SP_TAG
public static final String SP_TAG
- See Also:
- Constant Field Values
-
SP_TYPE
public static final String SP_TYPE
- See Also:
- Constant Field Values
-
SP_URL
public static final String SP_URL
- See Also:
- Constant Field Values
-
SP_STATUS
public static final String SP_STATUS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Subscription
public Subscription()
-
Subscription
public Subscription(StringType criteria, StringType reason, Enumeration<Subscription.SubscriptionStatus> status, Subscription.SubscriptionChannelComponent channel)
-
-
Method Detail
-
getCriteriaElement
public StringType getCriteriaElement()
- Returns:
criteria(The rules that the server should use to determine when to generate notifications for this subscription.). This is the underlying object with id, value and extensions. The accessor "getCriteria" gives direct access to the value
-
hasCriteriaElement
public boolean hasCriteriaElement()
-
hasCriteria
public boolean hasCriteria()
-
setCriteriaElement
public Subscription setCriteriaElement(StringType value)
- Parameters:
value-criteria(The rules that the server should use to determine when to generate notifications for this subscription.). This is the underlying object with id, value and extensions. The accessor "getCriteria" gives direct access to the value
-
getCriteria
public String getCriteria()
- Returns:
- The rules that the server should use to determine when to generate notifications for this subscription.
-
setCriteria
public Subscription setCriteria(String value)
- Parameters:
value- The rules that the server should use to determine when to generate notifications for this subscription.
-
getContact
public List<ContactPoint> getContact()
- Returns:
contact(Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.)
-
hasContact
public boolean hasContact()
-
addContact
public ContactPoint addContact()
- Returns:
contact(Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.)
-
addContact
public Subscription addContact(ContactPoint t)
-
getReasonElement
public StringType getReasonElement()
- Returns:
reason(A description of why this subscription is defined.). This is the underlying object with id, value and extensions. The accessor "getReason" gives direct access to the value
-
hasReasonElement
public boolean hasReasonElement()
-
hasReason
public boolean hasReason()
-
setReasonElement
public Subscription setReasonElement(StringType value)
- Parameters:
value-reason(A description of why this subscription is defined.). This is the underlying object with id, value and extensions. The accessor "getReason" gives direct access to the value
-
setReason
public Subscription setReason(String value)
- Parameters:
value- A description of why this subscription is defined.
-
getStatusElement
public Enumeration<Subscription.SubscriptionStatus> getStatusElement()
- Returns:
status(The status of the subscription, which marks the server state for managing the subscription.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
-
hasStatusElement
public boolean hasStatusElement()
-
hasStatus
public boolean hasStatus()
-
setStatusElement
public Subscription setStatusElement(Enumeration<Subscription.SubscriptionStatus> value)
- Parameters:
value-status(The status of the subscription, which marks the server state for managing the subscription.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
-
getStatus
public Subscription.SubscriptionStatus getStatus()
- Returns:
- The status of the subscription, which marks the server state for managing the subscription.
-
setStatus
public Subscription setStatus(Subscription.SubscriptionStatus value)
- Parameters:
value- The status of the subscription, which marks the server state for managing the subscription.
-
getErrorElement
public StringType getErrorElement()
- Returns:
error(A record of the last error that occurred when the server processed a notification.). This is the underlying object with id, value and extensions. The accessor "getError" gives direct access to the value
-
hasErrorElement
public boolean hasErrorElement()
-
hasError
public boolean hasError()
-
setErrorElement
public Subscription setErrorElement(StringType value)
- Parameters:
value-error(A record of the last error that occurred when the server processed a notification.). This is the underlying object with id, value and extensions. The accessor "getError" gives direct access to the value
-
getError
public String getError()
- Returns:
- A record of the last error that occurred when the server processed a notification.
-
setError
public Subscription setError(String value)
- Parameters:
value- A record of the last error that occurred when the server processed a notification.
-
getChannel
public Subscription.SubscriptionChannelComponent getChannel()
- Returns:
channel(Details where to send notifications when resources are received that meet the criteria.)
-
hasChannel
public boolean hasChannel()
-
setChannel
public Subscription setChannel(Subscription.SubscriptionChannelComponent value)
- Parameters:
value-channel(Details where to send notifications when resources are received that meet the criteria.)
-
getEndElement
public InstantType getEndElement()
- Returns:
end(The time for the server to turn the subscription off.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value
-
hasEndElement
public boolean hasEndElement()
-
hasEnd
public boolean hasEnd()
-
setEndElement
public Subscription setEndElement(InstantType value)
- Parameters:
value-end(The time for the server to turn the subscription off.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value
-
setEnd
public Subscription setEnd(Date value)
- Parameters:
value- The time for the server to turn the subscription off.
-
getTag
public List<Coding> getTag()
- Returns:
tag(A tag to add to any resource that matches the criteria, after the subscription is processed.)
-
hasTag
public boolean hasTag()
-
addTag
public Coding addTag()
- Returns:
tag(A tag to add to any resource that matches the criteria, after the subscription is processed.)
-
addTag
public Subscription addTag(Coding t)
-
listChildren
protected void listChildren(List<Property> childrenList)
- Overrides:
listChildrenin classDomainResource
-
setProperty
public void setProperty(String name, Base value) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
setPropertyin classDomainResource- Throws:
org.hl7.fhir.exceptions.FHIRException
-
addChild
public Base addChild(String name) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
addChildin classDomainResource- Throws:
org.hl7.fhir.exceptions.FHIRException
-
fhirType
public String fhirType()
- Specified by:
fhirTypein interfaceorg.hl7.fhir.instance.model.api.IBase- Overrides:
fhirTypein classDomainResource
-
copy
public Subscription copy()
- Specified by:
copyin classDomainResource
-
typedCopy
protected Subscription typedCopy()
-
equalsDeep
public boolean equalsDeep(Base other)
- Overrides:
equalsDeepin classDomainResource
-
equalsShallow
public boolean equalsShallow(Base other)
- Overrides:
equalsShallowin classDomainResource
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceorg.hl7.fhir.instance.model.api.IBase- Overrides:
isEmptyin classDomainResource
-
getResourceType
public ResourceType getResourceType()
- Specified by:
getResourceTypein classResource
-
-