Home > Class Reference > ENSLIB namespace > %Studio.AbstractDocument

%Studio.AbstractDocument

abstract stream class %Studio.AbstractDocument extends %Library.AbstractStream

To implement a new routine type to be used by Studio you subclass from this abstract routine class and fill in the methods to perform your own Load/Save/Compile/Delete/Lock functions.

Property Inventory (Including Private)

Method Inventory (Including Private)

Parameters

parameter Delimiter = .;
Delimiter to use when constructing directories for this document type This only applies if you write the List query, if you override the ItemList() then you must insert this into ^CacheTemp structure yourself. Note do not use '/' or '\' as a delimiter as these are reserved for CSP files.

Properties (Including Private)

property Code as %GlobalCharacterStream;
The body of the routine is held in this stream
Property methods: CodeDelete(), CodeGet(), CodeGetObject(), CodeGetObjectId(), CodeGetSwizzled(), CodeIsValid(), CodeNewObject(), CodeOid(), CodeOpen(), CodeSet(), CodeSetObject(), CodeSetObjectId(), CodeUnSwizzle()
property CompileTime as %TimeStamp [ Calculated ];
Timestamp of the last compile of this document
Property methods: CompileTime(), CompileTimeDisplayToLogical(), CompileTimeGet(), CompileTimeIsValid(), CompileTimeLogicalToDisplay(), CompileTimeNormalize(), CompileTimeOdbcToLogical()
property Generated as %Boolean;
True if this routine is generated from something else
Property methods: GeneratedDisplayToLogical(), GeneratedGet(), GeneratedIsValid(), GeneratedLogicalToDisplay(), GeneratedNormalize(), GeneratedSet()
property Locked as %Integer [ InitialExpression = 0 ];
Used to hold the number of times this document is locked. It happens to be used by the default lock implementation but you may ignore this in your subclass if you wish.
Property methods: LockedDisplayToLogical(), LockedGet(), LockedIsValid(), LockedLogicalToDisplay(), LockedNormalize(), LockedSet()
property Name as %String;
The name of this routine, this includes the routine extension
Property methods: NameDisplayToLogical(), NameGet(), NameIsValid(), NameLogicalToDisplay(), NameLogicalToOdbc(), NameNormalize(), NameSet()
property TimeStamp as %TimeStamp [ Calculated ];
Timestamp of the current document
Property methods: TimeStamp(), TimeStampDisplayToLogical(), TimeStampGet(), TimeStampIsValid(), TimeStampLogicalToDisplay(), TimeStampNormalize(), TimeStampOdbcToLogical()
property UpToDate as %Boolean [ Calculated ];
Return true if the document is up to date with respect to the compiled version, i.e. if you recompiled this document then the generated compiled code would be the same. Return false if the source document is modified but not compiled or the generated code has been modified manually.
Property methods: UpToDateDisplayToLogical(), UpToDateGet(), UpToDateIsValid(), UpToDateLogicalToDisplay(), UpToDateNormalize()

Methods (Including Private)

private classmethod %DeleteData(soid As %String, concurrency As %Integer) as %Status
private method %Load(sid As %String) as %Status
private method %OnNew(name As %String) as %Status
Set the name property
private method %SaveData(ByRef sid As %String) as %Status
final method AtEndGet() as %Boolean
final method AtEndSet(val As %Boolean) as %Status
final method Clear() as %Status
Clear the contents of this Stream from permanent storage. This will remove the permanent stream storage and any temporary stream and initialise the stream to its initial state that it starts in, including removing all the stream attributes.

Returns a %Status value indicating success or failure.

method Compile(flags As %String) as %Status
Compile the routine
method CompileDocument(ByRef qstruct As %String) as %Status
CompileDocument is called when the document is to be compiled It has already called the source control hooks at this point
classmethod CompileTime(name As %String) as %TimeStamp
Return the compile time of routine 'name' in %TimeStamp format. The format should be $zdatetime($horolog,3), or "" if the routine does not exist.
final method CompileTimeGet() as %TimeStamp
classmethod Delete(name As %String) as %Status