Class Reference
EnsLib.PubSub.Subscription
Server:irisdocs1
Instance:IRISLATEST
User:UnknownUser
 
-
  [ENSLIB] >  [EnsLib] >  [PubSub] >  [Subscription]
Private  Storage

persistent class EnsLib.PubSub.Subscription extends %Persistent, %XML.Adaptor

The class holds the list of subscriptions for a Publish / Subscribe table. Topics are strings of the form A.B.C where A, B, or C can be up to 50 characters; Any of A, B, or C, can be "*" which indicates a wild card match.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
3 5 7 1 1


Summary

Properties
DomainName OldValues Subscriber SubscriberName Topic

Methods
%AddToSaveSet %AddToSyncSet %BMEBuilt %CheckConstraints
%CheckConstraintsForExtent %ClassIsLatestVersion %ClassName %ComposeOid
%ConstructClone %Delete %DeleteExtent %DeleteId
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Exists
%ExistsId %Extends %GUID %GUIDSet
%GetLock %GetParameter %GetSwizzleObject %Id
%InsertBatch %IsA %IsModified %IsNull
%KillExtent %KillExtentData %LoadFromMemory %LockExtent
%LockId %New %NormalizeObject %ObjectIsNull
%ObjectModified %Oid %OnBeforeAddToSync %OnDetermineClass
%Open %OpenId %OriginalNamespace %PackageName
%PhysicalAddress %PurgeIndices %Reload %RemoveFromSaveSet
%ResolveConcurrencyConflict %RollBack %Save %SaveDirect
%SaveIndices %SerializeObject %SetModified %SortBegin
%SortEnd %SyncObjectIn %SyncTransport %UnlockExtent
%UnlockId %ValidateIndices %ValidateObject ClearIndexEntry
FindSubscribers PurgeSpecialIndex SubscriberNameGet SubscriberNameSet
XMLDTD XMLExport XMLExportToStream XMLExportToString
XMLNew XMLSchema XMLSchemaNamespace XMLSchemaType


Parameters

• parameter SUBTOPICLEN = 50;
Maximum length of subtopics
• parameter TOPICINDEX = "^EnsLib.PubSub.SubscriptionI";
Location of topic index
• parameter XMLIGNORENULL = 1;
XMLIGNORENULL allows the programmer to override the default XML handling of empty strings for properties of type %String. By default (XMLIGNORENULL = 0), empty strings in the XML input are stored as $c(0) and $c(0) is written to XML as an empty tag. A missing tag in the XML input is always stored as "" and "" is always output to XML as no tag.

If XMLIGNORENULL is set = 1, then both missing tags in the XML and empty strings are input as "", and both "" and $c(0) are output as empty tags (i.e. <tag></tag>).

If XMLIGNORENULL is set = "inputonly", then both missing tags in the XML and empty strings are input as "". Output of "" and $c(0) are for XMLIGNORENULL = 0: $c(0) is output as an empty tag (i.e. <tag></tag>) and "" is output as no tag.

If XMLIGNORENULL = "runtime" (runtime is not case sensitive), then the behavior of XMLIGNORENULL is determined by the format parameter of XMLExport, XMLImport and %XML.Reader.OpenFile. The default behavior for XMLIGNORENULL="runtime is the same as XMLIGNORENULL=0. Adding "ignorenull" to the format argument changes the behavior to that of XMLIGNORENULL=1. "ignorenull" shoud be separated by a comma from literal/encoded part of the format. Example values for format are "", ",ignorenull", "literal,ignorenull" and "encoded,ignorenull". Note that "inputonly" is equivalent to using ,ignorenull for XMLExport and not for %XML.Reader.

Properties

• property DomainName as DomainName(XMLNAME="Domain",XMLPROJECTION="ATTRIBUTE",XMLREFERENCE="ID");
Domain value used to keep this subscription list separate from others.
• property OldValues as %String(MAXLEN=1000,XMLPROJECTION="NONE") [ MultiDimensional,Transient ];
Used to remember old values when modifying a subscription.
• relationship Subscriber as Subscriber(XMLPROJECTION="NONE") [ Required,Inverse = Subscriptions,Cardinality = one ];
Subscriber
• property SubscriberName as %String(XMLNAME="Subscriber",XMLPROJECTION="ATTRIBUTE") [ Transient ];
Link to subscriber name (used for Export).
• property Topic as %String(MAXLEN=1000,XMLPROJECTION="ATTRIBUTE") [ Required ];
Topic that this subscription is based upon.
This is a string containing a series of subtopics of the form A.B.C.; Any subtopic may be "*" for a wild card match.

Methods

• classmethod ClearIndexEntry(pDomainName As %String, pTopic As %String, pSubscriber As %String, pID As %String)
Clear out an entry in the special index
• classmethod FindSubscribers(pDomain As %String, pTopic As %String, Output pSubscribers As %String) as %Status
Find a list of subscribers for a given topic string.
Look directly into index for the answer
Returns an array of subscriber ID numbers with nodes containing number of matches.
• classmethod PurgeSpecialIndex(pDomain As %String = "")
Purge the special index used by the subscription table.
• method SubscriberNameGet() as %String
Override of property accessor
• method SubscriberNameSet(%val As %String) as %Status
Override of property accessor

Queries

• query Enumerate()
SQL Query :
SELECT %ID,DomainName,Topic,Subscriber->Name As Subscriber
FROM Subscription
ORDER BY DomainName,Topic
Provide a list of subscriptions.

Triggers

•trigger SQLDeleteTrigger (BEFORE event DELETE)
Clean up special subscription index


Copyright (c) 2019 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.