IRISLIB database
Routine Class Reference

Subclass of <CLASS>FileCharacterStream</CLASS> that is used to load, save, compile, delete, etc. More...

Inheritance diagram for Routine:
Collaboration diagram for Routine:

Public Member Functions

_.Library.Status Compile (_.Library.String qspec)
 Compile this CSP page. More...
 
_.Library.TimeStamp GetCurrentTimeStamp ()
 Get the timestamp for the routine.
 
_.Library.Status LinkToUrl (_.Library.String url)
 Link this stream to the file pointed to by this url.
 
_.Library.Status Lock ()
 Lock the current routine.
 
_.Library.Status OpenStream (_.Library.String url)
 Override of OpenStream method from FileCharacterStream to open a CSP.Routine.
 
_.Library.Status SaveStream (_.Library.Boolean supressbackup, _.Library.Boolean Refresh)
 Override of SaveStream method from FileCharacterStream to save this stream.
 
_.Library.Status Unlock ()
 Unlock the current routine.
 
- Public Member Functions inherited from FileCharacterStream
_.Library.Boolean IsFileUnicode ()
 Returns true if the file is Unicode. More...
 
_.Library.Integer SizeGet ()
 Return the current size of the data stream. More...
 
_.Library.Status TranslateTableSet (_.Library.String table)
 If translation table is set after the file has been opened. More...
 
- Public Member Functions inherited from Object
_.Library.Status AcquireLock (locktype)
 Acquires a lock for the current instance. More...
 
_.Library.Status OnAfterSave (_.Library.Boolean insert)
 This callback method is invoked by the <METHOD>Save</METHOD> method to. More...
 
_.Library.Status OnBeforeSave (_.Library.Boolean insert)
 This callback method is invoked by the <METHOD>Save</METHOD> method to. More...
 
_.Library.Status OnOpen ()
 This callback method is invoked by the <METHOD>Open</METHOD> method to. More...
 
_.Library.Status OnReload ()
 This callback method is invoked by the <METHOD>Reload</METHOD> method to. More...
 
_.Library.Status OnRollBack ()
 This callback method is invoked by the <METHOD>Save</METHOD> method to. More...
 
_.Library.Status Clear ()
 Clear the contents of this Stream from permanent storage. More...
 
_.Library.Status CopyFrom (_.Stream.Object source)
 Copies the contents of source into this Stream. More...
 
_.Library.Status CopyFromAndSave (_.Stream.Object source)
 Copy the stream from source into the current stream ignoring anything already in the current stream. More...
 
_.Library.Integer FindAt (_.Library.Integer position, _.Library.RawString target, _.Library.RawString tmpstr, _.Library.Boolean caseinsensitive)
 Find the first occurrence of target in the stream, starting the search at position. More...
 
_.Library.Status InputFromDevice (_.Library.Integer len, _.Library.Integer timeout)
 Input len characters from the current device into the stream. More...
 
_.Library.Boolean MoveTo (_.Library.Integer position)
 Move to this position in the stream. More...
 
_.Library.Status OutputToDevice (_.Library.Integer len)
 Write out len characters of the stream to the current device starting from the current position. More...
 
_.Library.Status OutputToDeviceAt (_.Library.Integer position, _.Library.Integer length)
 Output the stream to the current device starting at position of length. More...
 
_.Library.RawString Read (_.Library.Integer len, _.Library.Status sc)
 Reads up to len characters from the current position. More...
 
_.Library.RawString ReadLine (_.Library.Integer len, _.Library.Status sc, _.Library.Boolean eol)
 Read a line from the stream. More...
 
_.Library.String ReadSQL (_.Library.Integer start, _.Library.Integer end)
 SQL specific method for reading stream data.
 
_.Library.Status SerializeToSyncSet (_.SYNC.SyncSet ss, _.Library.Integer iPtr, _.Library.String property)
 SerializeToSyncSet copies the stream value from the current object to the sync set global. More...
 
_.Library.Status SyncStreamIn (_.SYNC.SyncSet ss, _.Library.Integer iPtr, _.Library.String property)
 SyncStreamIn copies the stream value from the sync set global into the current object.
 
_.Library.Status Write (_.Library.RawString data)
 Appends the string data to the stream and advances the. More...
 
_.Library.Status WriteLine (_.Library.RawString data)
 Appends the string data along with a line terminator to the stream and advances the. More...
 
- Public Member Functions inherited from RegisteredObject
_.Library.Status OnAddToSaveSet (_.Library.Integer depth, _.Library.Integer insert, _.Library.Integer callcount)
 This callback method is invoked when the current object is added to the SaveSet,. More...
 
_.Library.Status OnNew ()
 This callback method is invoked by the <METHOD>New</METHOD> method to. More...
 
_.Library.Status OnValidateObject ()
 This callback method is invoked by the <METHOD>ValidateObject</METHOD> method to. More...
 
- Public Member Functions inherited from FileStreamAdaptor
_.Library.Status OnClose ()
 This callback method is invoked by the <METHOD>Close</METHOD> method to. More...
 
_.Library.Status OnConstructClone (_.Library.RegisteredObject object, _.Library.Boolean deep, _.Library.String cloned)
 This callback method is invoked by the <METHOD>ConstructClone</METHOD> method to. More...
 
_.Library.Integer FileBinarySize ()
 Return the current size of the file in bytes.
 
_.Library.Status Flush ()
 Flush any output in the stream not already saved.
 
_.Library.Status LinkToFile (_.Library.String filename)
 This method lets you connect a file stream to a file called filename without. More...
 
_.Library.Status MoveToEnd ()
 Move to the end of the stream so the next <METHDO>Write</METHOD> will be appended to the end. More...
 
_.Library.Status OpenStream (_.Library.String sid)
 Open a stream given a stream id.
 
_.Library.RawString ReadLine (_.Library.Integer len, _.Library.Status sc, _.Library.Boolean eol, _.Library.String term)
 Read a line from the file. More...
 
_.Library.Status Rewind ()
 Go back to the start of the stream.
 
_.Library.Status SaveStream ()
 Deprecated method, use <method>Save</method> instead. More...
 
- Public Member Functions inherited from AbstractStream
_.Library.Status CopyFrom (_.Stream.Object source)
 Copies the contents of source into this Stream. More...
 
_.Library.Boolean DeleteAttribute (_.Library.String name)
 Removes this attribute variable from the collection. More...
 
_.Library.String GetAttribute (_.Library.String name, _.Library.String default)
 Retrieves the named attribute value.
 
_.Library.String GetStreamId ()
 Returns an full id value (including class name) with which the Stream implementation has stored. More...
 
_.Library.Boolean IsDefinedAttribute (_.Library.String name)
 Returns true if the named attribute variable exists in the collection, false otherwise.
 
_.Library.Boolean IsNull ()
 Returns true if this is a "NULL" stream; that is, a stream which has never. More...
 
_.Library.String NextAttribute (_.Library.String name)
 Retrieves the next attribute variable name in the sequence, skip any '' names.
 
_.Library.AbstractStream ReadLineIntoStream ()
 This reads from the stream until it find the <property>LineTerminator</property> and returns. More...
 
 SetAttribute (_.Library.String name, _.Library.String value)
 Inserts an attribute variable by name into the collection.
 
_.Library.Status WriteLine (_.Library.RawString data)
 Appends the string data along with a line terminator to the stream and advances the. More...
 

Static Public Member Functions

_.Library.Status ClearGatewayCache (_.Library.String url, _.Library.List clear)
 If needed this will clear the gateway cache of this static url.
 
_.Library.Status Delete (_.Library.String url)
 Delete the file associated with this CSP url.
 
_.Library.Boolean Exists (_.Library.String url)
 Return true if the CSP file exists (not the class) and false otherwise.
 
_.Library.TimeStamp GetDate (_.Library.String url)
 Return the timestamp of this CSP/CSR file. More...
 
_.Library.Status LockRoutine (_.Library.String name, _.Library.Boolean lock, _.Library.Boolean checkfile)
 Lock or unlock a particular routine <parameter>name</parameter>. More...
 
- Static Public Member Functions inherited from Object
_.Library.String GetLockReference (_.Library.String pLocation, _.Library.String pId)
 Returns the global reference used to lock the current stream object. More...
 
_.Library.Status OnDelete (_.Library.ObjectIdentity oid)
 This callback method is invoked by the <METHOD>Delete</METHOD> method to. More...
 
_.Library.String IsCharacter ()
 Return true if this is a character stream and false if it is a binary stream.
 
_.Library.Boolean StreamOIDIsNull (_.Library.ObjectIdentity soid)
 Return true if this stream oid is a null stream and false if the stream is not null.
 
- Static Public Member Functions inherited from FileStreamAdaptor
_.Library.String GetStreamIdForFile (_.Library.String file, _.Library.String contenttype, _.Library.String charset)
 Generate a stream OId that links to this file. More...
 
- Static Public Member Functions inherited from AbstractStream
_.Library.Status DeleteStream (_.Library.ObjectIdentity oid, _.Library.Integer concurrency)
 Deprecated method, use <method>Delete</method> instead. More...
 

Public Attributes

 Generated
 True if this routine is generated from something else. More...
 
 IsModified
   More...
 
 Locked
 Number of times this routines has been locked. More...
 
 Namespace
 Readonly property holding the namespace for this CSP application. More...
 
 TimeStamp
 Caclulated property that contains the current timestamp for the routine. More...
 
 UpToDate
   More...
 
 Url
 Property holding the URL for this CSP application. More...
 
- Public Attributes inherited from FileCharacterStream
 BOM
 BOM characters that appear at start of file to signify which encoding it is using. More...
 
 StreamFormatWrite
 The StreamFormatWrite property controls whether file output is in stream or undefined format. More...
 
 TranslateTable
 The translation table to be used when reading or writing the file. More...
 
- Public Attributes inherited from Object
 AtEnd
 The AtEnd property is set to true (1) when, during a read,. More...
 
 LastModified
 LastModified is a read-only property containing the <class>TimeStamp</class> of More...
 
 Size
 Size is a read-only property containing the current size of the stream (in bytes More...
 
- Public Attributes inherited from FileStreamAdaptor
 CanonicalFilename
 Read only property that returns the canonical filename if the file is open and "" if the file is not open. More...
 
 Directory
 Directory where stream files are located. More...
 
 Filename
 The filename that this stream is currently using. More...
 
 LineTerminator
 For file streams the line will terminate on any of the characters set in the LineTerminator, it does not support. More...
 
 ReadSize
 While reading this holds the file size. More...
 
 RemoveOnClose
 If true then remove the permanent file as well as any temp file when this object is closed. More...
 
- Public Attributes inherited from AbstractStream
 Attributes
 An array of strings containing any attribute values associated with this stream. More...
 
 LineTerminator
 Type of line terminator we use for this stream, defaults to Cr/Lf. More...
 

Static Public Attributes

 FILEEXT = None
 Subclass of <CLASS>FileCharacterStream</CLASS> that is used to load, save, compile, delete, etc. More...
 
- Static Public Attributes inherited from Object
 DEFAULTCONCURRENCY = None
 
- Static Public Attributes inherited from RegisteredObject
 CAPTION = None
 Optional name used by the Form Wizard for a class when generating forms. More...
 
 JAVATYPE = None
 The Java type to be used when exported.
 
 PROPERTYVALIDATION = None
 This parameter controls the default validation behavior for the object. More...
 
- Static Public Attributes inherited from FileStreamAdaptor
 FILEEXT = None
 Deprecated internal class. More...
 
- Static Public Attributes inherited from AbstractStream
 MAXLEN = None
 The maximum number of characters (or bytes) allowed in a stream.
 
 PROPERTYVALIDATION = None
 Turns off property validation.
 

Detailed Description

Subclass of <CLASS>FileCharacterStream</CLASS> that is used to load, save, compile, delete, etc.

CSP files. To create one you pass it the URL of the CSP file you wish to manipulate such as:

Set stream=##class(CSP.Routine).New("/csp/samples/inspector.csp") Do stream.OutputToDevice()

Member Function Documentation

◆ Compile()

_.Library.Status Compile ( _.Library.String  qspec)

Compile this CSP page.

This calls <METHOD>SaveStream</METHOD> to flush the stream

out to disk before calling compile.

◆ GetDate()

_.Library.TimeStamp GetDate ( _.Library.String  url)
static

Return the timestamp of this CSP/CSR file.

If there is no file then return -1

◆ LockRoutine()

_.Library.Status LockRoutine ( _.Library.String  name,
_.Library.Boolean  lock,
_.Library.Boolean  checkfile 
)
static

Lock or unlock a particular routine <parameter>name</parameter>.

If <parameter>lock</parameter>

is true then it will be locked else it will be unlocked.

Member Data Documentation

◆ FILEEXT

FILEEXT = None
static

Subclass of <CLASS>FileCharacterStream</CLASS> that is used to load, save, compile, delete, etc.

CSP files. To create one you pass it the URL of the CSP file you wish to manipulate such as:

Set stream=##class(CSP.Routine).New("/csp/samples/inspector.csp") Do stream.OutputToDevice()

Override of file extension from FileCharacterStream.

◆ Generated

Generated

True if this routine is generated from something else.

 

◆ IsModified

IsModified

 

 

◆ Locked

Locked

Number of times this routines has been locked.

 

◆ Namespace

Namespace

Readonly property holding the namespace for this CSP application.

 

◆ TimeStamp

TimeStamp

Caclulated property that contains the current timestamp for the routine.

 

◆ UpToDate

UpToDate

 

 

◆ Url

Url

Property holding the URL for this CSP application.