IRISLIB database
RoutineMgr Class Reference

This class is used internally by InterSystems IRIS. More...

Inheritance diagram for RoutineMgr:
Collaboration diagram for RoutineMgr:

Public Member Functions

_.Library.Status Compile (_.Library.String qspec)
 Compile the routine associated with this object.
 
_.Library.TimeStamp GetCurrentTimeStamp (_.Library.TimeStamp compiletime, _.Library.Boolean uptodate)
 Get the on-disk timestamp for the routine associated with this object.
 
_.Library.Status Lock ()
 Lock this routine, return true if it worked and false if it did not.
 
_.Library.Status Unlock ()
 Unlock this routine, return a status code.
 
- 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 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.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...
 

Static Public Member Functions

_.Library.Status AutoComplete (_.Library.String name, _.Library.String mask, _.Library.String complete, _.Library.Boolean generated, _.Library.String directory, _.Library.Boolean saveas)
 Used to provide autocomplete in the open dialog, you pass in the name the user. More...
 
_.Library.String BestRoutineMatch (_.Library.String name)
 Given a routine name return the name including extension that is most suitable for. More...
 
_.Library.Status CheckSQLIdentifier (_.Library.String ident)
 Used by Studio to avoid calling SQL.
 
_.Library.Status CompileClass (_.Library.String class, _.Library.String qspec, _.Library.Boolean Reload)
 For internal use only.
 
_.Library.Status ConstructEditError (_.Library.String name, _.Library.Boolean isinsourcecontrol, _.Library.Boolean ischeckedout, _.Library.String user)
 Internal method to construct the correct error code if the item is not editable because. More...
 
_.Library.String ConvertVersion (name, type, version)
 Internal function to return absolute version number.
 
_.Library.Status CreateCSPDirectory (directory)
 Given a CSP path create the associated directory.
 
_.Library.Status Delete (_.Library.String name)
 Delete the routine name.
 
_.Library.Status DeletePackage (package)
 Used to delete the files associated with a directory from the open dialog.
 
_.Library.Boolean Exists (_.Library.String name)
 Return true if the routine/csp/class/project/global/object code exists and false otherwise.
 
_.Library.TimeStamp GetDate (_.Library.String name)
 Return the timestamp of this routine/csp/class/project/global/object code if it exists. More...
 
_.Library.String GetOther (_.Library.String name, _.Library.String type, _.Library.Integer direction, _.Library.String label)
 For a given source item, this function returns the source item(s) generated. More...
 
_.Library.Status ImportItemListFetchRows (_.Library.Binary QHandle, _.Library.Integer FetchCount, _.Library.List RowSet, _.Library.Integer ReturnCount, _.Library.Integer AtEnd)
 Returns the next FetchCount rows in the query.
 
_.Library.Boolean IsCSPName (_.Library.String name)
 Return true if this is item is a file under a CSP application.
 
_.Library.Boolean IsClassGenerated (_.Library.String classname)
 Return true if this classname is a generated class, and false otherwise.
 
_.Library.Boolean IsGenerated (_.Library.String name)
 Return true if this document is generated and false otherwise.
 
_.Library.Boolean IsMapped (_.Library.String name, _.Library.String sourcedb)
 Return true if this item is mapped from a database other than the default routine database. More...
 
_.Library.Status LockItem (_.Library.String name, _.Library.Boolean lock, _.Library.Boolean checksource)
 Get or release a lock on a document. More...
 
_.Library.Status OutOfDateDocuments (_.Library.String pDocumentList, _.Library.String pSpec, _.Library.Boolean pSystem, _.Library.Boolean pGenerated, _.Library.Boolean pMapped)
 Calculates the names of all documents that are not up-to-date with their compiled code and returns their names as a subscripted array. More...
 
_.Library.Status StudioOpenDialogFetch (_.Library.Binary QHandle, _.Library.List Row, _.Library.Integer AtEnd)
 Fetch returns the next row in the query.
 
_.Library.Status StudioOpenDialogFetchRows (_.Library.Binary QHandle, _.Library.Integer FetchCount, _.Library.List RowSet, _.Library.Integer ReturnCount, _.Library.Integer AtEnd)
 StudioOpenDialogFetchRows returns the next FetchCount rows in the query.
 
_.Library.TimeStamp TS (_.Library.String name, _.Library.TimeStamp compiletime, _.Library.Boolean uptodate)
 Return the timestamp for this item. More...
 
_.Library.Status UpdateTemplates (_.Library.String qspec)
 Used by Studio because it is hard to call Studio.TemplateMgr directly.
 
 getPackageList (_.Library.Integer idx, _.Library.String directory, _.Library.Boolean SystemFiles, _.Library.String namespace, _.Library.String work)
 Fill up the list of packages for this directory.
 

Public Attributes

 Code
 A stream (<class>Routine</class> or <class>CSP.Routine</class>) containing the routine. More...
 
 Generated
   More...
 
 IsCSP
 True is this is a CSP/CSR file, else false. More...
 
 Name
 The name of the routine associated with this object. More...
 
 Namespace
 Return the namespace this routine/csp file exists in. More...
 
 Protected
 Deprecated. More...
 
 TimeStamp
 The timestamp of the routine associated with this object. More...
 
 UpToDate
   More...
 

Private Member Functions

_.Library.Status Save (_.Library.Boolean Refresh)
 Save the routine associated with this object. More...
 

Static Private Member Functions

_.Library.String OpenId (_.Library.String id, _.Library.Integer concurrency)
 Open an instance of <class>RoutineMgr</class> for routine with name. More...
 
 __genPattern (_.Library.String pSpec, _.Library.String prAS, _.Library.String prAE, _.Library.String prPattern, _.Library.Integer pFlag)
 Passed a pattern match this returns an COS style pattern and a start and stop point.
 
 __getBackupList (_.Library.Integer idx, _.Library.String w, _.Library.String directory, _.Library.Integer sort, _.Library.String bkpstart, _.Library.String bkpend)
 Add the list of backup items that match these patterns.
 
 __getCSPList (_.Library.Integer idx, _.Library.String w, _.Library.String directory, _.Library.Integer sort, _.Library.Boolean flat, _.Library.String visited, _.Library.String origdir)
 Fill up the list of CSP applications and files that match the pattern in w.
 
 __getClassList (_.Library.Integer idx, _.Library.String work, _.Library.String directory, _.Library.Integer sort, _.Library.String clsStart, _.Library.String clsEnd, _.Library.Boolean SystemFiles, _.Library.Boolean flat, _.Library.Boolean ShowGenerated, _.Library.Boolean RoundTime)
 Fill up the list of class that match the pattern in w.
 
_.Library.Status __getGlobalList (_.Library.Integer idx, _.Library.String w, _.Library.String directory, _.Library.Integer sort, _.Library.Boolean SystemFiles)
 Fill up the list of globals that match the pattern in w.
 
 __getProjectList (_.Library.Integer idx, _.Library.String w, _.Library.String directory, _.Library.Integer sort, _.Library.Boolean RoundTime)
 Fill up the list of projects that match the pattern in w.
 
 __getRoutineList (_.Library.Integer idx, _.Library.String work, _.Library.String directory, _.Library.Integer sort, _.Library.String rtnStart, _.Library.String rtnEnd, _.Library.Boolean SystemFiles, _.Library.Boolean flat, _.Library.Boolean ShowGenerated, _.Library.Boolean notlist, _.Library.Boolean RoundTime)
 Fill up the list of packages for this directory.
 
_.Library.Status __getUserDocument (_.Library.Integer idx, _.Library.String w, _.Library.String ext, _.Library.String directory, _.Library.Integer sort, _.Library.Boolean system, _.Library.Boolean flat, _.Library.Boolean ShowGenerated, _.Library.Boolean Mapped)
 User defined document types.
 

Additional Inherited Members

- 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...
 

Detailed Description

This class is used internally by InterSystems IRIS.

You should not make direct use of it within your applications. There is no guarantee made about either the behavior or future operation of this class.

This is a wrapper class used by Studio to manipulate routines.

Member Function Documentation

◆ OpenId()

_.Library.String OpenId ( _.Library.String  id,
_.Library.Integer  concurrency 
)
staticprivate

Open an instance of <class>RoutineMgr</class> for routine with name.

id.

◆ Save()

_.Library.Status Save ( _.Library.Boolean  Refresh)
private

Save the routine associated with this object.

Return Refresh=1 if the save has changed the document so it should be refreshed in the client

◆ AutoComplete()

_.Library.Status AutoComplete ( _.Library.String  name,
_.Library.String  mask,
_.Library.String  complete,
_.Library.Boolean  generated,
_.Library.String  directory,
_.Library.Boolean  saveas 
)
static

Used to provide autocomplete in the open dialog, you pass in the name the user.

has entered and the mask</mask> which is the current pattern mask and it will return null if it can not find a match or the next name that does match.

◆ BestRoutineMatch()

_.Library.String BestRoutineMatch ( _.Library.String  name)
static

Given a routine name return the name including extension that is most suitable for.

Studio to open

◆ ConstructEditError()

_.Library.Status ConstructEditError ( _.Library.String  name,
_.Library.Boolean  isinsourcecontrol,
_.Library.Boolean  ischeckedout,
_.Library.String  user 
)
static

Internal method to construct the correct error code if the item is not editable because.

of source control hooks

◆ GetDate()

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

Return the timestamp of this routine/csp/class/project/global/object code if it exists.

or -1 if it does not exist

◆ GetOther()

_.Library.String GetOther ( _.Library.String  name,
_.Library.String  type,
_.Library.Integer  direction,
_.Library.String  label 
)
static

For a given source item, this function returns the source item(s) generated.

from it or from which it was generated (depending on the 'direction' flag).

  • name - string containing name of source item. For example: "Test" or "Sample.Person" There is NO ".MAC" etc in this name.
  • type - string containing type of source item: This can be one of: "INT","MAC","BAS","MVB","MVI","CLS","CSP","CSR"
  • direction - direction flag: +1 will go in the direction that files are compiled in, for example MAC to INT or CLS to MAC, -1 will go in the opposite direction, INT to MAC, MAC to CLS etc.

Returns comma-delimited list of source names (including type string appended to the end) or "" if there is no corresponding other. Example:

  • ("Test","INT",-1) --> "Test.MAC"
  • ("Test","MAC",1) --> "Test.INT"
  • ("Sample.Person","CLS",1) --> "Sample.Person.1.MAC,Sample.Person.2.MAC"
  • ("/csp/samples/menu","CSP",1) --> "csp.menu.CLS"
  • ("Sample.Person.1","MAC",-1) --> "Sample.Person.CLS"

Note that for classes the routines shown do not include the method generator routines.

The label is of the form 'label+offset', if included then this will return the routine name followed by a ':' and then the offset corresponding to this position

◆ IsMapped()

_.Library.Boolean IsMapped ( _.Library.String  name,
_.Library.String  sourcedb 
)
static

Return true if this item is mapped from a database other than the default routine database.

Also return the source database in sourcedb.

◆ LockItem()

_.Library.Status LockItem ( _.Library.String  name,
_.Library.Boolean  lock,
_.Library.Boolean  checksource 
)
static

Get or release a lock on a document.

If <parameter>lock</parameter> is true (the default) then it will be locked else it will be unlocked.

◆ OutOfDateDocuments()

_.Library.Status OutOfDateDocuments ( _.Library.String  pDocumentList,
_.Library.String  pSpec,
_.Library.Boolean  pSystem,
_.Library.Boolean  pGenerated,
_.Library.Boolean  pMapped 
)
static

Calculates the names of all documents that are not up-to-date with their compiled code and returns their names as a subscripted array.

Arguments:

  • pDocumentList - A subscripted array of document names with the format pDocumentList("User.Test.cls")="". Can be used as the first argument to $SYSTEM.OBJ.CompileList().
  • pSpec - Check documents that match this spec. May contain both * and ? as wildcards. It may also consist of more than one, comma-delimited selections. If you wish to exclude items then prefix the pattern with ' symbol.
  • pSystem - Check system documents.
  • pGenerated - Check generated documents.
  • pMapped - Check documents that are mapped from another code database.

◆ TS()

_.Library.TimeStamp TS ( _.Library.String  name,
_.Library.TimeStamp  compiletime,
_.Library.Boolean  uptodate 
)
static

Return the timestamp for this item.

Also returns two output parameters compiletime is the time when this item was compiled, or null if not compiled. uptodate returns true if the named document is up to date with the compiled version, and false if the named document has been modified but not compiled, or a compiled subitem has been modified.

Member Data Documentation

◆ Code

Code

A stream (<class>Routine</class> or <class>CSP.Routine</class>) containing the routine.

associated with this object.  

◆ Generated

Generated

 

 

◆ IsCSP

IsCSP

True is this is a CSP/CSR file, else false.

 

◆ Name

The name of the routine associated with this object.

 

◆ Namespace

Namespace

Return the namespace this routine/csp file exists in.

Mainly used for CSP file for the Studio.

 

◆ Protected

Protected

Deprecated.

 

◆ TimeStamp

The timestamp of the routine associated with this object.

 

◆ UpToDate

UpToDate