Class Subscription
- java.lang.Object
-
- org.hl7.fhir.dstu2016may.model.Base
-
- org.hl7.fhir.dstu2016may.model.BaseResource
-
- org.hl7.fhir.dstu2016may.model.Resource
-
- org.hl7.fhir.dstu2016may.model.DomainResource
-
- org.hl7.fhir.dstu2016may.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.static ca.uhn.fhir.rest.gclient.TokenClientParamCONTACTFluent Client search parameter constant for contactprotected StringTypecriteriaThe rules that the server should use to determine when to generate notifications for this subscription.static ca.uhn.fhir.rest.gclient.StringClientParamCRITERIAFluent Client search parameter constant for criteriaprotected 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.static ca.uhn.fhir.rest.gclient.StringClientParamPAYLOADFluent Client search parameter constant for payloadprotected StringTypereasonA description of why this subscription is defined.static StringSP_CONTACTSearch parameter: contactstatic StringSP_CRITERIASearch parameter: criteriastatic StringSP_PAYLOADSearch parameter: payloadstatic StringSP_STATUSSearch parameter: statusstatic StringSP_TAGSearch parameter: tagstatic StringSP_TYPESearch parameter: typestatic StringSP_URLSearch parameter: urlprotected Enumeration<Subscription.SubscriptionStatus>statusThe status of the subscription, which marks the server state for managing the subscription.static ca.uhn.fhir.rest.gclient.TokenClientParamSTATUSFluent Client search parameter constant for statusprotected List<Coding>tagA tag to add to any resource that matches the criteria, after the subscription is processed.static ca.uhn.fhir.rest.gclient.TokenClientParamTAGFluent Client search parameter constant for tagstatic ca.uhn.fhir.rest.gclient.TokenClientParamTYPEFluent Client search parameter constant for typestatic ca.uhn.fhir.rest.gclient.UriClientParamURLFluent Client search parameter constant for url-
Fields inherited from class org.hl7.fhir.dstu2016may.model.DomainResource
contained, extension, modifierExtension, text
-
Fields inherited from class org.hl7.fhir.dstu2016may.model.Resource
id, implicitRules, language, meta
-
-
Constructor Summary
Constructors Constructor Description Subscription()ConstructorSubscription(StringType criteria, StringType reason, Enumeration<Subscription.SubscriptionStatus> status, Subscription.SubscriptionChannelComponent channel)Constructor
-
Method Summary
-
Methods inherited from class org.hl7.fhir.dstu2016may.model.DomainResource
addContained, addExtension, addExtension, addModifierExtension, addModifierExtension, copyValues, getContained, getExtension, getExtensionsByUrl, getModifierExtension, getModifierExtensionsByUrl, getText, hasContained, hasExtension, hasModifierExtension, hasText, setText
-
Methods inherited from class org.hl7.fhir.dstu2016may.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.dstu2016may.model.BaseResource
getStructureFhirVersionEnum, setId
-
Methods inherited from class org.hl7.fhir.dstu2016may.model.Base
castToActionDefinition, castToAddress, castToAnnotation, castToAttachment, castToBase64Binary, castToBoolean, castToCode, castToCodeableConcept, castToCoding, castToContactPoint, castToDataRequirement, castToDate, castToDateTime, castToDecimal, castToDuration, castToElementDefinition, castToExtension, castToHumanName, castToId, castToIdentifier, castToInstant, castToInteger, castToMarkdown, castToMeta, castToModuleMetadata, castToMoney, castToNarrative, castToOid, castToParameterDefinition, castToPeriod, castToPositiveInt, castToQuantity, castToRange, castToRatio, castToReference, castToResource, castToSampledData, castToSignature, castToSimpleQuantity, castToString, castToTime, castToTiming, castToTriggerDefinition, castToUnsignedInt, castToUri, children, compareDeep, compareDeep, compareDeep, compareValues, compareValues, equals, getChildByName, getFormatCommentsPost, getFormatCommentsPre, getUserData, getUserInt, getUserString, hasFormatComment, hasPrimitiveValue, hasType, hasUserData, isMetadataBased, isPrimitive, listChildrenByName, 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_CRITERIA
public static final String SP_CRITERIA
Search parameter: criteriaDescription: Rule for server push criteria
Type: string
Path: Subscription.criteria
- See Also:
- Constant Field Values
-
CRITERIA
public static final ca.uhn.fhir.rest.gclient.StringClientParam CRITERIA
Fluent Client search parameter constant for criteriaDescription: Rule for server push criteria
Type: string
Path: Subscription.criteria
-
SP_STATUS
public static final String SP_STATUS
Search parameter: statusDescription: requested | active | error | off
Type: token
Path: Subscription.status
- See Also:
- Constant Field Values
-
STATUS
public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS
Fluent Client search parameter constant for statusDescription: requested | active | error | off
Type: token
Path: Subscription.status
-
SP_TAG
public static final String SP_TAG
Search parameter: tagDescription: A tag to add to matching resources
Type: token
Path: Subscription.tag
- See Also:
- Constant Field Values
-
TAG
public static final ca.uhn.fhir.rest.gclient.TokenClientParam TAG
Fluent Client search parameter constant for tagDescription: A tag to add to matching resources
Type: token
Path: Subscription.tag
-
SP_PAYLOAD
public static final String SP_PAYLOAD
Search parameter: payloadDescription: Mimetype to send, or blank for no payload
Type: string
Path: Subscription.channel.payload
- See Also:
- Constant Field Values
-
PAYLOAD
public static final ca.uhn.fhir.rest.gclient.StringClientParam PAYLOAD
Fluent Client search parameter constant for payloadDescription: Mimetype to send, or blank for no payload
Type: string
Path: Subscription.channel.payload
-
SP_TYPE
public static final String SP_TYPE
Search parameter: typeDescription: rest-hook | websocket | email | sms | message
Type: token
Path: Subscription.channel.type
- See Also:
- Constant Field Values
-
TYPE
public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE
Fluent Client search parameter constant for typeDescription: rest-hook | websocket | email | sms | message
Type: token
Path: Subscription.channel.type
-
SP_CONTACT
public static final String SP_CONTACT
Search parameter: contactDescription: Contact details for source (e.g. troubleshooting)
Type: token
Path: Subscription.contact
- See Also:
- Constant Field Values
-
CONTACT
public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTACT
Fluent Client search parameter constant for contactDescription: Contact details for source (e.g. troubleshooting)
Type: token
Path: Subscription.contact
-
SP_URL
public static final String SP_URL
Search parameter: urlDescription: Where the channel points to
Type: uri
Path: Subscription.channel.endpoint
- See Also:
- Constant Field Values
-
URL
public static final ca.uhn.fhir.rest.gclient.UriClientParam URL
Fluent Client search parameter constant for urlDescription: Where the channel points to
Type: uri
Path: Subscription.channel.endpoint
-
-
Constructor Detail
-
Subscription
public Subscription()
Constructor
-
Subscription
public Subscription(StringType criteria, StringType reason, Enumeration<Subscription.SubscriptionStatus> status, Subscription.SubscriptionChannelComponent channel)
Constructor
-
-
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
-
getProperty
public Base[] getProperty(int hash, String name, boolean checkValid) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
getPropertyin classDomainResource- Throws:
org.hl7.fhir.exceptions.FHIRException
-
setProperty
public void setProperty(int hash, String name, Base value) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
setPropertyin classDomainResource- Throws:
org.hl7.fhir.exceptions.FHIRException
-
setProperty
public void setProperty(String name, Base value) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
setPropertyin classDomainResource- Throws:
org.hl7.fhir.exceptions.FHIRException
-
makeProperty
public Base makeProperty(int hash, String name) throws org.hl7.fhir.exceptions.FHIRException
Description copied from class:Basemake an instance of a property. If the property is a repeating property, make a new instance. if the property is not repeating, return the property- Overrides:
makePropertyin classDomainResource- Returns:
- 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
-
-