|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsystemic.sif.sifcommon.BaseInfo
systemic.sif.sifcommon.subscriber.BaseSubscriber
systemic.sif.sbpframework.subscriber.SyncSubscriber
systemic.sif.sbpframework.subscriber.SBPBaseSubscriber
public abstract class SBPBaseSubscriber
This class implements some of the functionality defined in the Australian SBP. This are all infrastructure level functions and include: Start-up Sync Control through a DB and a dependent Object cache. For details please refer to the SBP Agent Framework Developer's Guide.
Note:
Subscribers that are part of the SBP must extend this SBPBaseSubscriber. If your agent deals with other SIF objects than the ones defined in the SBP then you should extends the SBPNoDOCSubscriber class for these objects and not this class. If you use this class for any other SIF objects than defined in the SBP the behaviour is unknown, most likely will cause your agent to crash.
Constructor Summary | |
---|---|
SBPBaseSubscriber(java.lang.String subscriberID,
openadk.library.ElementDef dtd)
Default constructor |
Method Summary | |
---|---|
abstract boolean |
doesObjectExistInTargetSystem(java.lang.String sifObjectName,
java.util.List<SIFObjectKey> keyValues,
openadk.library.SIFDataObject sifObject)
This method needs to be implemented by the actual subscriber developer. |
void |
processObjectsWithoutDependencies()
Should be called every so often. |
void |
requestDependentObjects()
Sends a SIF Query for all dependent objects that are in the cache for this subscriber and application. |
Methods inherited from class systemic.sif.sbpframework.subscriber.SyncSubscriber |
---|
sync |
Methods inherited from class systemic.sif.sifcommon.subscriber.BaseSubscriber |
---|
debugOnEvent, debugOnQueryResults, finalise, getQueryResultsOptions, getSubscriptionOptions, onEvent, onQueryPending, onQueryResults, processEvent, processResponse, provision, reportSIFError, run, setQueryResultsOptions, setSubscriptionOptions, shutdownSubscriber, startConsumers |
Methods inherited from class systemic.sif.sifcommon.BaseInfo |
---|
getAgentConfig, getAgentID, getAgentProperties, getAgentProperty, getApplicationID, getDtd, getFrameworkProperties, getId, getMappings, getZoneByID, getZones, isValidZone, setAgentConfig, setAgentID, setAgentProperties, setApplicationID, setDtd, setFrameworkProperties, setId, setMappings, setZones |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SBPBaseSubscriber(java.lang.String subscriberID, openadk.library.ElementDef dtd) throws java.lang.IllegalArgumentException
Initialises the subscriber and also checks if the object this subscriber is responsible for is supported by the DOC. If not then a IllegalArgumentException is raised and the error is logged.
subscriberID
- The unique ID of the subscriber (ie. StudentPersonalSubscriber).dtd
- The dtd for which this subscriber is responsible for.
java.lang.IllegalArgumentException
Method Detail |
---|
public abstract boolean doesObjectExistInTargetSystem(java.lang.String sifObjectName, java.util.List<SIFObjectKey> keyValues, openadk.library.SIFDataObject sifObject)
If the DOC is enabled and this method returns TRUE for the given sifObjectName and keyValues then the SIF Object given by the sifObject parameter will be cached and its dependent objects will automatically be requested by an appropriate subscriber (which can be a subscriber in another agent).
The keyValues holds the primary key (name as xpath and value) of the dependent SIF Object. In most cases this is a SIF refId, but in some cases can be something else. The keyValues parameter is a list of key values in case the primary key is made up of a compound key. The list will be in the correct order as defined by the SIF specification.
The parameter sifObjectName and keyValues are extracted from the sifObject. The sifObject is provided for convenience. There might be the need to get other information out of the sifObject parameter to implement this method successfully and therefore the availability of this parameter.
Example of parameters: StudentSchoolEnrollment
For the above example object the 'sifObject' parameter would be StudentSchoolEnrollment object. The 'doesObjectExistInTargetSystem()' method would be called twice for the above object by the SBPBaseSubscriber because there are 2 dependent objects:
- The Student with RefId=D3E34B359D75101A8C3D00AA001A1652
- The School with RefId=A4E33E359D99101A8C3D00AA001BB76E
The sifObjectName and keyValues parameters for the two calls would be:
1st Call (Student): sifObjectName=StudentPersonal
keyValues[0].xpathToKey=@RefId, keyValues[0].keyValue=D3E34B359D75101A8C3D00AA001A1652
2nd Call (School) : sifObjectName=SchoolInfo
keyValues[0].xpathToKey=@RefId, keyValues[0].keyValue=A4E33E359D99101A8C3D00AA001BB76E
sifObjectName
- Name of the dependent SIF Object (i.e. StudentPersonal, SchoolInfo etc).keyValues
- List of key values. Name of Key is an xpath into the dependent SIF Object, value is the
actual value of key as extracted from the sifObject parameter.sifObject
- The SIF Object as delivered from the ZIS.
public void requestDependentObjects()
This method must only run if this subscriber is responsible for a SIF Object that has other SIF objects with a dependency on this object. For example the StudentPersonal is such an object because a number of other SIF objects depend upon the StudentPersonal such as the StudentSchoolEnrollment, StudentContactRelationship etc.
public void processObjectsWithoutDependencies()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |