Class Subscription
- java.lang.Object
-
- org.hl7.fhir.r4.model.Base
-
- org.hl7.fhir.r4.model.BaseResource
-
- org.hl7.fhir.r4.model.Resource
-
- org.hl7.fhir.r4.model.DomainResource
-
- org.hl7.fhir.r4.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 can 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.TokenClientParamPAYLOADFluent 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_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 statusstatic 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.r4.model.DomainResource
contained, extension, modifierExtension, text
-
Fields inherited from class org.hl7.fhir.r4.model.Resource
id, implicitRules, language, meta
-
-
Constructor Summary
Constructors Constructor Description Subscription()ConstructorSubscription(Enumeration<Subscription.SubscriptionStatus> status, StringType reason, StringType criteria, Subscription.SubscriptionChannelComponent channel)Constructor
-
Method Summary
-
Methods inherited from class org.hl7.fhir.r4.model.DomainResource
addContained, addExtension, addExtension, addExtension, addModifierExtension, addModifierExtension, checkNoModifiers, copyValues, getContained, getExtension, getExtensionByUrl, getExtensionsByUrl, getModifierExtension, getModifierExtensionsByUrl, getText, hasContained, hasExtension, hasExtension, hasModifierExtension, hasText, setContained, setExtension, setModifierExtension, setText
-
Methods inherited from class org.hl7.fhir.r4.model.Resource
copyValues, getId, getIdBase, getIdElement, getImplicitRules, getImplicitRulesElement, getLanguage, getLanguage, getLanguageElement, getMeta, hasId, hasIdElement, hasImplicitRules, hasImplicitRulesElement, hasLanguage, hasLanguageElement, hasMeta, setId, setIdBase, setIdElement, setImplicitRules, setImplicitRulesElement, setLanguage, setLanguageElement, setMeta
-
Methods inherited from class org.hl7.fhir.r4.model.BaseResource
getStructureFhirVersionEnum, isResource, setId
-
Methods inherited from class org.hl7.fhir.r4.model.Base
castToAddress, castToAnnotation, castToAttachment, castToBase64Binary, castToBoolean, castToCanonical, castToCode, castToCodeableConcept, castToCoding, castToContactDetail, castToContactPoint, castToContributor, castToDataRequirement, castToDate, castToDateTime, castToDecimal, castToDosage, castToDuration, castToElementDefinition, castToExpression, castToExtension, castToHumanName, castToId, castToIdentifier, castToInstant, castToInteger, castToMarkdown, castToMarketingStatus, castToMeta, castToMoney, castToNarrative, castToOid, castToParameterDefinition, castToPeriod, castToPopulation, castToPositiveInt, castToProdCharacteristic, castToProductShelfLife, castToQuantity, castToRange, castToRatio, castToReference, castToRelatedArtifact, castToResource, castToSampledData, castToSignature, castToSimpleQuantity, castToString, castToSubstanceAmount, castToTime, castToTiming, castToTriggerDefinition, castToType, castToUnsignedInt, castToUri, castToUrl, castToUsageContext, castToXhtml, castToXhtmlString, children, clearUserData, compareDeep, compareDeep, compareDeep, compareDeep, compareValues, compareValues, dateTimeValue, equals, getChildByName, getFormatCommentsPost, getFormatCommentsPre, getNamedProperty, getUserData, getUserInt, getUserString, hasFormatComment, hasPrimitiveValue, hasType, hasUserData, isBooleanPrimitive, isDateTime, 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
-
status
protected Enumeration<Subscription.SubscriptionStatus> status
The status of the subscription, which marks the server state for managing the 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.
-
end
protected InstantType end
The time for the server to turn the subscription off.
-
reason
protected StringType reason
A description of why this subscription is defined.
-
criteria
protected StringType criteria
The rules that the server should use to determine when to generate notifications for this 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.
-
SP_PAYLOAD
public static final String SP_PAYLOAD
Search parameter: payloadDescription: The mime-type of the notification payload
Type: token
Path: Subscription.channel.payload
- See Also:
- Constant Field Values
-
PAYLOAD
public static final ca.uhn.fhir.rest.gclient.TokenClientParam PAYLOAD
Fluent Client search parameter constant for payloadDescription: The mime-type of the notification payload
Type: token
Path: Subscription.channel.payload
-
SP_CRITERIA
public static final String SP_CRITERIA
Search parameter: criteriaDescription: The search rules used to determine when to send a notification
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: The search rules used to determine when to send a notification
Type: string
Path: Subscription.criteria
-
SP_CONTACT
public static final String SP_CONTACT
Search parameter: contactDescription: Contact details for the subscription
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 the subscription
Type: token
Path: Subscription.contact
-
SP_TYPE
public static final String SP_TYPE
Search parameter: typeDescription: The type of channel for the sent notifications
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: The type of channel for the sent notifications
Type: token
Path: Subscription.channel.type
-
SP_URL
public static final String SP_URL
Search parameter: urlDescription: The uri that will receive the notifications
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: The uri that will receive the notifications
Type: uri
Path: Subscription.channel.endpoint
-
SP_STATUS
public static final String SP_STATUS
Search parameter: statusDescription: The current state of the subscription
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: The current state of the subscription
Type: token
Path: Subscription.status
-
-
Constructor Detail
-
Subscription
public Subscription()
Constructor
-
Subscription
public Subscription(Enumeration<Subscription.SubscriptionStatus> status, StringType reason, StringType criteria, Subscription.SubscriptionChannelComponent channel)
Constructor
-
-
Method Detail
-
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.
-
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.)
-
setContact
public Subscription setContact(List<ContactPoint> theContact)
- Returns:
- Returns a reference to
thisfor easy method chaining
-
hasContact
public boolean hasContact()
-
addContact
public ContactPoint addContact()
-
addContact
public Subscription addContact(ContactPoint t)
-
getContactFirstRep
public ContactPoint getContactFirstRep()
- Returns:
- The first repetition of repeating field
contact, creating it if it does not already exist
-
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.
-
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.
-
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.
-
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.)
-
listChildren
protected void listChildren(List<Property> children)
- Overrides:
listChildrenin classDomainResource
-
getNamedProperty
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
getNamedPropertyin classDomainResource- Throws:
org.hl7.fhir.exceptions.FHIRException
-
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 Base setProperty(int hash, String name, Base value) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
setPropertyin classDomainResource- Throws:
org.hl7.fhir.exceptions.FHIRException
-
setProperty
public Base 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
- Overrides:
makePropertyin classDomainResource- Throws:
org.hl7.fhir.exceptions.FHIRException
-
getTypesForProperty
public String[] getTypesForProperty(int hash, String name) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
getTypesForPropertyin 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
-
copyValues
public void copyValues(Subscription dst)
-
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
-
-