Home > Class Reference > ENSLIB namespace > Ens.Util.Schedule

Ens.Util.Schedule

persistent class Ens.Util.Schedule extends %Library.Persistent, %XML.Adaptor

SQL Table Name: Ens_Util.Schedule

A persistent named schedule spec string

Property Inventory (Including Private)

Method Inventory (Including Private)

Parameters

parameter DOMAIN = Ensemble;
parameter XMLIGNOREINVALIDATTRIBUTE = 0;
Inherited description: The XMLIGNOREINVALIDATTRIBUTE parameter allows the programmer to control handling of unexpected attributes in the XML input. By default (XMLIGNOREINVALIDATTRIBUTE = 1), will ignore unexpected attributes. If XMLIGNOREINVALIDATTRIBUTE is set = 0, then an unexpected attribute will be treated as an error.
parameter XMLNAME = schedule;
Inherited description: This parameter provides the default XMLNAME for the class. If it is empty then the class name will be used to construct a default XML name. The default XMLNAME is used as the top level tag when exporting objects and the export context did not provide an XML container name.

Properties (Including Private)

property %DeployablePreModified as %Boolean [ Private , InitialExpression = 0 , Transient ];
Property methods: %DeployablePreModifiedDisplayToLogical(), %DeployablePreModifiedGet(), %DeployablePreModifiedIsValid(), %DeployablePreModifiedLogicalToDisplay(), %DeployablePreModifiedLogicalToXSD(), %DeployablePreModifiedNormalize(), %DeployablePreModifiedSet(), %DeployablePreModifiedXSDToLogical()
property %ScheduleSpecModified as %Boolean [ Private , InitialExpression = 0 , Transient ];
Property methods: %ScheduleSpecModifiedDisplayToLogical(), %ScheduleSpecModifiedGet(), %ScheduleSpecModifiedIsValid(), %ScheduleSpecModifiedLogicalToDisplay(), %ScheduleSpecModifiedLogicalToXSD(), %ScheduleSpecModifiedNormalize(), %ScheduleSpecModifiedSet(), %ScheduleSpecModifiedXSDToLogical()
property Deployable as %Boolean [ InitialExpression = 0 ];
Indicates whether this system default setting can be exported for deployment.
Property methods: DeployableDisplayToLogical(), DeployableGet(), DeployableGetStored(), DeployableIsValid(), DeployableLogicalToDisplay(), DeployableLogicalToXSD(), DeployableNormalize(), DeployableSet(), DeployableXSDToLogical()
property Description as %String (MAXLEN = 256);
Property methods: DescriptionDisplayToLogical(), DescriptionGet(), DescriptionGetStored(), DescriptionIsValid(), DescriptionLogicalToDisplay(), DescriptionLogicalToOdbc(), DescriptionNormalize(), DescriptionSet()
property Name as %String [ Required ];
Property methods: NameCheck(), NameDelete(), NameDisplayToLogical(), NameExists(), NameGet(), NameGetStored(), NameIsValid(), NameLogicalToDisplay(), NameLogicalToOdbc(), NameNormalize(), NameOpen(), NameSQLCheckUnique(), NameSQLExists(), NameSQLFindPKeyByConstraint(), NameSQLFindRowIDByConstraint(), NameSet()
property ScheduleSpec as %String);
Property methods: ScheduleSpecDisplayToLogical(), ScheduleSpecGet(), ScheduleSpecGetStored(), ScheduleSpecIsValid(), ScheduleSpecLogicalToDisplay(), ScheduleSpecLogicalToOdbc(), ScheduleSpecNormalize(), ScheduleSpecSet()

Methods (Including Private)

classmethod %ClearStudioDocuments(ByRef pIDsToKeep As %String = "")
Delete the deployable contents of the Schedule specifications table which are projected as one Studio document.
If pIDsToKeep array is passed in where the subscript is the settings id then those schedules will not be deleted.
classmethod %Export(pFileName As %String = "", pDeployable As %Boolean = "") as %Status
Export Schedule Specifications to file pFileName. If pDeployable is not defined, then export both Deployable and non Deployable Schedule settings. This is the default
If pDeployable is set to True, then only export Schedule settings that are marked as Deployable.
If pDeployable is set to False, then only export Schedule settings that are marked as not Deployable.
classmethod %ExportStudioDocuments(pStream As %String = "") as %Status
Export Default Settings that are deployable to stream pStream.
classmethod %Import(pFileName As %String = "", Output pCount As %Integer, ByRef pIDsImported As %String = "") as %Status
Import Schedule Specification data from the xml file pFileName.
Lookup data is in the form:
  <scheduleSpec>
  <schedule name="MyName" schedulespec="START:WEEK-*-01T00:00:00,STOP:WEEK-*-01T00:00:05" deployable="0"/>
  </scheduleSpec>
  
classmethod %ImportStudioDocuments(pStream As %String = "") as %Status
Import method for rows projected in studio document and then remove those that weren't imported after.
private classmethod %OnAfterDelete(oid As %ObjectIdentity) as %Status
Update the timestamp whenever a deployable row is removed from a table.
private method %OnAfterSave(insert As %Boolean) as %Status
If production is running apply any appropriate new schedules Update the timestamp for the settings whenever an entry is added or updated that is deployable.
private method %OnBeforeSave(insert As %Boolean) as %Status
This callback method is invoked by the %Save() method to provide notification that the object is being saved. It is called before any data is written to disk.

insert will be set to 1 if this object is being saved for the first time.

If this method returns an error then the call to %Save() will fail.

classmethod Evaluate(pScheduleSpec As %String, pODBCDateTime As %String = "") as %String

Indexes

index (Name on Name) [IdKey, Type = key];
Index methods: NameCheck(), NameDelete(), NameDisplayToLogical(), NameExists(), NameGet(), NameGetStored(), NameIsValid(), NameLogicalToDisplay(), NameLogicalToOdbc(), NameNormalize(), NameOpen(), NameSQLCheckUnique(), NameSQLExists(), NameSQLFindPKeyByConstraint(), NameSQLFindRowIDByConstraint(), NameSet()

Triggers

trigger OnDelete (AFTER event DELETE);
Update the timestamp whenever a deployable row is removed from a table.
tri