%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
Method Inventory
- AtEndGet()
- AtEndSet()
- Clear()
- Compile()
- CompileDocument()
- CompileTime()
- CompileTimeGet()
- Delete()
- Exists()
- ExportToXML()
- Flush()
- GetOther()
- GetPrevious()
- ImportFromXML()
- IsEnabled()
- IsGenerated()
- IsMapped()
- IsUpToDate()
- ItemList()
- ListClose()
- ListExecute()
- ListFetch()
- Load()
- LocalizeDescription()
- Lock()
- LockName()
- MoveToEnd()
- Read()
- ReadLine()
- Rewind()
- Save()
- SaveAs()
- SaveStream()
- Search()
- SearchRegex()
- SizeGet()
- TimeStamp()
- TimeStampGet()
- TranslateExportName()
- Unlock()
- UnlockName()
- UpToDateGet()
- Write()
- WriteLine()
Parameters
Properties
Methods
Returns a %Status value indicating success or failure.
^||%RoutineList(Idx,dirtype,order_$char(0)_index)=$listbuild(name,dirsymbol,type,size,date/time,description)
- Idx - The index provided in the 'Idx' parameter
- dirtype - This is 1 if this is a regular openable item and 0 if this is a directory so that directories show up before the other items in the open dialog
- order - The value based on the sorting order of items, e.g. size or date/time last modified, more information on this below
- index - An integer index to prevent multiple items with for example the same size from over writing each other.
- name - The name to display in the open dialog
- dirsymbol - The symbol to use to navigate directories, for regular items this is "" but for directories this should be the character to append to the directory in order to browse into this directory. Do not use '/' or '\' as these are reversed for CSP files
- type - This is an integer version of the type of the item, see the list below for details
- size - The size of this item as an integer
- date/time - The date/time this item was last modified in %TimeStamp format, or "" if not known
The type of the item which can be one of:
- 0 - MAC file, a routine containing macros
- 1 - INT file, a standard routine
- 2 - INC file, an include file
- 3 - BAS file, a Cache Basic routine
- 4 - CLS, a class
- 5 - CSP, a Cache Server Page or another file in this directory
- 7 - GBL, a Global
- 8 - PRJ, a Project
- 9 - a Package
- 10 - a CSP application
order is one of:
- 1 - Name of the file non case sensitive (the default)
- 2 - Date/Time the file was saved
- 3 - Size of the file
- 4 - Type of the file i.e. the number from the 'type' list
- 5 - Name of the file (case sensitive)
The arguments to this method are:
- Idx - Index into ^CacheTemp to write data
- Ext - Extension name we are processing
- Work - Array of pattern match information that we test each item against, root node is $listbuild(mapped) so you can see if we want to return mapped items
- Start - First possible match, can be used to optimise the query
- End - Last possible match, can be used to optimise the query
- Directory - The directory name we are searching
- Sort - The entry to sort by, same as the list for 'order'
- System - If true then include the '%' routines/classes
- Flat - If true then flatten directories to return items inside them, this is used by the 'Namespace' tab in Studio to display all items in the system
- ShowGenerated - If false then do not show items generated from something else, e.g. do not show TEST.INT if this is compiled from TEST.MAC
- NewFormat - Returned by reference, if set to true use the new ^||%RoutineList format, else caller will convert output to the new format
Returns a %Status value indicating success or failure.
You must call Rewind() if you want to read a stream from the beginning again. Calling Read() after Write() implicitly ends the Write() operation and rewinds to the start of the stream.
Returns a string up to len characters long. The byref argument sc will return a %Status if any error occurred during the read.
While 'stream.AtEnd { Write stream.ReadLine(,.sc,.eol) If $$$ISERR(sc) { Write "ERROR" Quit } If eol { Write ! } }
Returns a %Status value indicating success or failure.
- Name - Name of document to search
- Pattern - String to search for
- WholeWords - True if we only want to find whole words, false otherwise
- CaseSensitive - True if this is a case sensitive search
- Max - The maximum number of items to find, if we get to this limit stop outputting results and return
- Found - Passed by reference, contains a count of the number of matches we find. Increment by one for each match
<CrLf><Name>(<Line offset>): <Match line>
- Name - Name of document to search
- Matcher - A %Regex.Matcher object initialised with the search expression
- Max - The maximum number of items to find, if we get to this limit stop outputting results and return
- Found - Passed by reference, contains a count of the number of matches we find. Increment by one for each match
<CrLf><Name>(<Line offset>): <Match line>
Set items("User.abc.cls")=""
Note that a write operation immediately following a read or rewind will clear out the existing data in the stream.
Returns a %Status value indicating success or failure.
Returns a %Status value indicating success or failure.
Queries
This should return a row form by:
$listbuild(name,date/time modified,size,directory delimitor)
- name - The name to display in the open dialog
- date/time modified - In %TimeStamp format the date/time this item was last modified
- size - The size of this item
- directory delimitor - If this is not an directory then return "" here, if it is a directory then return the type of delimitor to use when they double click on this directory
Inherited Members
Inherited Properties
Inherited Methods
- %AddToSaveSet()
- %CheckUnique()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %Delete()
- %DeleteExtent()
- %DeleteId()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Exists()
- %ExistsId()
- %Extends()
- %GetParameter()
- %GetSwizzleObject()
- %Id()
- %IsA()
- %IsModified()
- %IsNull()
- %KillExtent()
- %LOBPrefetch()
- %LocationSet()
- %LockStream()
- %New()
- %NormalizeObject()
- %ObjectIsNull()
- %ObjectModified()
- %ObjectSize()
- %Oid()
- %Open()
- %OpenId()
- %OriginalNamespace()
- %PackageName()
- %ReleaseLock()
- %Reload()
- %RemoveFromSaveSet()
- %RollBack()
- %Save()
- %SerializeObject()
- %SetModified()
- %UnlockStream()
- %ValidateObject()
- CopyFrom()
- CopyFromAndSave()
- DeleteAttribute()
- DeleteStream()
- FindAt()
- GetAttribute()
- GetAttributeList()
- GetStreamId()
- InputFromDevice()
- IsCharacter()
- IsDefinedAttribute()
- IsNull()
- LastModifiedGet()
- LineTerminatorSet()
- MoveTo()
- NextAttribute()
- OpenStream()
- OutputToDevice()
- OutputToDeviceAt()
- ReadLineIntoStream()
- ReadSQL()
- SerializeToSyncSet()
- SetAttribute()
- SetAttributeList()
- StreamOIDIsNull()
- SyncStreamIn()
Subclasses
- %DeepSee.UI.FolderItemDocument
- %MV.StudioRoutines
- %ZEN.StudioDocument.AbstractDocument
- Ens.Rule.UI.RuleDocument
- Ens.Util.AbstractDocument
- Ens.Util.LookupTableDocument
- Ens.Util.ProjectTextDocument
- Ens.Util.SettingsDocument
- EnsLib.EDI.ASTM.SchemaDocument
- EnsLib.EDI.X12.SchemaDocument
- EnsLib.HL7.SchemaDocument