Skip to main content

%ZEN.StudioDocument.AbstractDocument

Class %ZEN.StudioDocument.AbstractDocument Extends %Studio.AbstractDocument [ Abstract, Deprecated, System = 3 ]

Abstract Document used to serve ZEN-editor documents into Studio
In order to create a new Studio Abstract Document, you need to create a subclass of this class and provide the following:

  • A class Projection named RegisterExtension.
    For example:
    Projection RegisterExtension As %Projection.StudioDocument(DocumentExtension = "BPL");
  • A value for the EDITORURL parameter.
    This is the URL of the page that provides the actual editor UI.
  • If needed, a value for the DOCUMENTCLASS parameter.
  • An override of the Save method.
  • An override of the Exists method.

Parameters

EDITORURL

Parameter EDITORURL As STRING;

URL of the editor Studio will display within its HTML pane.

DESCRIPTION

Parameter DESCRIPTION As STRING;

Description Studio will display for this document.
If DOMAIN is defined this will be localized.

DOCUMENTCLASS

Parameter DOCUMENTCLASS As STRING;

If set, name of superclass used for documents of this type.
For example, "Ens.DataTransformDTL"

LISTABSTRACT

Parameter LISTABSTRACT As BOOLEAN = 0;

If true, the built-in document list logic will include abstract classes otherwise they are ignored.

EXTENSION

Parameter EXTENSION As STRING;

File extension used for this document (e.g., ".dtl")

Methods

GetClassName

ClassMethod GetClassName(pName As %String) As %String [ CodeMode = expression ]

Return the corresponding class name for this document

Load

Method Load() As %Status

Return URL for Studio to use to load editor.

Exists

ClassMethod Exists(pName As %String) As %Boolean

Return 1 if the given document exists and 0 if it does not.
Subclass can override this behavior.

Compile

Method Compile(flags As %String) As %Status

Compile this document

Delete

ClassMethod Delete(name As %String) As %Status

Delete the class that corresponds to document name. Subclass should override this behavior for non-class based editors.

TimeStamp

ClassMethod TimeStamp(name As %String) As %TimeStamp

Return the timestamp of routine 'name' in %TimeStamp format. This is used to determine if the routine has been updated on the server and so needs reloading from Studio. So the format should be $zdatetime($horolog,3), or "" if the routine does not exist.
Subclass should override this behavior for non-class based editors.

ListExecute

ClassMethod ListExecute(ByRef qHandle As %Binary, Directory As %String, Flat As %Boolean, System As %Boolean) As %Status

Subclass should override this query for non-class based editors.

ListFetch

ClassMethod ListFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status [ PlaceAfter = ListExecute ]

ListClose

ClassMethod ListClose(ByRef qHandle As %Binary) As %Status [ PlaceAfter = ListExecute ]

GetOther

ClassMethod GetOther(Name As %String) As %String

Return other document types that this is related to. Passed a name and you return a comma separated list of the other documents it is related to or "" if it is not related to anything
Subclass should override this behavior for non-class based editors.

LocalizeDescription

ClassMethod LocalizeDescription(ext As %String, ByRef Description As %String(MAXLEN=500)) As %Status [ CodeMode = objectgenerator ]