IRISLIB database
Base Class Reference

Studio extensibility superclass, this does nothing but provide interface for the real extensibility classes to use. More...

Inheritance diagram for Base:
Collaboration diagram for Base:

Public Member Functions

_.Library.Status AfterUserAction (_.Library.Integer Type, _.Library.String Name, _.Library.String InternalName, _.Library.Integer Answer, _.Library.String Msg, _.Library.Boolean Reload)
 This is called after the <method>UserAction</method> and after any template is run or dialog is displayed. More...
 
_.Library.String ExternalName (_.Library.String InternalName)
 Convert the internal name, e.g. More...
 
_.Library.Status GetStatus (_.Library.String InternalName, _.Library.Boolean IsInSourceControl, _.Library.Boolean Editable, _.Library.Boolean IsCheckedOut, _.Library.String UserCheckedOut)
 Return information about this entity.
 
_.Library.Boolean IsInSourceControl (_.Library.String InternalName)
 Returns true if this item is in source control and false otherwise.
 
_.Library.Boolean IsReadOnly (_.Library.String InternalName)
 Return true if this item should be marked as read only. More...
 
_.Library.Integer ItemIconState (_.Library.String InternalName)
 Used to allow Studio to display different icons in open dialog or project window etc. More...
 
_.Library.Status Login (_.Library.String Name, _.Library.String Password)
 Perform any login step here.
 
_.Library.Status Logout ()
 Perform any logout step here.
 
_.Library.Status OnAfterClassCompile (_.Library.String List, _.Library.Integer Level, _.Library.String qstruct, _.Library.Status Status)
 Called in the class compiler after we have compiled all the classes before we exit. More...
 
_.Library.Status OnAfterCompile (_.Library.String InternalName)
 Called after the compile of the item is done.
 
_.Library.Status OnAfterDelete (_.Library.String InternalName)
 Called after an item is deleted.
 
_.Library.Status OnAfterLoad (_.Library.String InternalName, _.Library.RegisteredObject Object)
 This is called after the item is loaded but before it is sent to Studio. More...
 
_.Library.Status OnAfterSave (_.Library.String InternalName, _.Library.RegisteredObject Object)
 This is called after the item has been saved to the database. More...
 
_.Library.Status OnAfterStorage (_.Library.String InternalName, _.Library.String Location)
 This is called if you compile a class and the compilation updates the class storage. More...
 
_.Library.Status OnBeforeClassCompile (_.Library.String List, _.Library.Integer Level, _.Library.String qstruct)
 Called in the class compiler after we have resolved the list of classes to be compiled but. More...
 
_.Library.Status OnBeforeCompile (_.Library.String InternalName, _.Library.String qstruct)
 Called before the compile of the item is done. More...
 
_.Library.Status OnBeforeDelete (_.Library.String InternalName)
 Called before an item is deleted. More...
 
_.Library.Status OnBeforeLoad (_.Library.String InternalName)
 This is called before the actual load of data to give the chance. More...
 
_.Library.Status OnBeforeSave (_.Library.String InternalName, _.Library.String Location, _.Library.RegisteredObject Object)
 Called before the item is saved to the database it is passed. More...
 
 OnBeforeTimestamp (_.Library.String InternalName)
 Called before Studio checks for the timestamp of an item.
 
_.Library.Status OnMenuItem (_.Library.String MenuName, _.Library.String InternalName, _.Library.String SelectedText, _.Library.Boolean Enabled, _.Library.String DisplayName)
 This is called for every menu item returned to Studio to allow the menu to be enabled/disabled without. More...
 
_.Library.Status UserAction (_.Library.Integer Type, _.Library.String Name, _.Library.String InternalName, _.Library.String SelectedText, _.Library.String Action, _.Library.String Target, _.Library.String Msg, _.Library.Boolean Reload)
 This is called when the user performs an action that may need to interact with. 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 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.String IsGenerated (_.Library.String Name)
 Return 1 if you wish this item to appear as if it is 'generated' when opened in Studio,. More...
 
_.Library.Status OnAfterAllClassCompile (_.Library.String List, _.Library.Integer Level, _.Library.String qstruct, _.Library.Status Status)
 Called in the activated source control class after we have compiled all the classes but before we exit. More...
 
_.Library.Status OnBeforeAllClassCompile (_.Library.String List, _.Library.Integer Level, _.Library.String qstruct)
 Called in the activated source control class before starting a compile after we have resolved the list of classes. More...
 

Public Attributes

 IconStatus
 Can be set to determine if we wish to report the source control status of the document in the project window. More...
 
 MainJob
 $Job number of the main Studio process or blank if this is the main Studio connection. More...
 
 Modified
 If the root node is set to 1 then calls to the source control hooks will keep track if the. More...
 
 StudioVersion
 Version of Studio that is connecting to this server. More...
 
 Username
 The username of this source control user. More...
 

Private Member Functions

_.Library.Status OnClose ()
 This callback method is invoked by the <METHOD>Close</METHOD> method to. More...
 
_.Library.Status OnNew (_.Library.String initval)
 This just calls the <method>Login</method> to perform an initialisation. More...
 

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

Studio extensibility superclass, this does nothing but provide interface for the real extensibility classes to use.

Subclass from this and implement the methods you need.

Member Function Documentation

◆ OnClose()

_.Library.Status OnClose ( )
private

This callback method is invoked by the <METHOD>Close</METHOD> method to.

provide notification that the current object is being closed.

The return value of this method is ignored.

Reimplemented from RegisteredObject.

◆ OnNew()

_.Library.Status OnNew ( _.Library.String  initval)
private

This just calls the <method>Login</method> to perform an initialisation.

Note that this is called by Studio automatically via the <class>Studio.SourceControl.Interface</class> class, do not call New directly.

◆ AfterUserAction()

_.Library.Status AfterUserAction ( _.Library.Integer  Type,
_.Library.String  Name,
_.Library.String  InternalName,
_.Library.Integer  Answer,
_.Library.String  Msg,
_.Library.Boolean  Reload 
)

This is called after the <method>UserAction</method> and after any template is run or dialog is displayed.

For a list of input arguments see <method>UserAction</method>. In the case of the dialog the button pushed by the user is passed in Answer:

  • 0 - No
  • 1 - Yes
  • 2 - Cancel

For the dialog that contains a textbox field the text of this field is passed in 'Msg' argument. In the case of a template if the template was closed from the 'x' button then Answer=2 to indicate the user attempted to cancel the operation. Otherwise if the template closed normally by getting to the end Answer=1. For the cases where Studio did not perform any interaction this method is not called. The default implementation is to call the standard source control tags . If the Reload argument is set to true by this method then the current document will be reloaded in Studio.

Reimplemented in ISC, and Base.

◆ ExternalName()

_.Library.String ExternalName ( _.Library.String  InternalName)

Convert the internal name, e.g.

TEST.MAC, to an external name that is used to export

the routine/class/csp item. This is often a filename to write the file out to.

Reimplemented in ISC, and File.

◆ IsGenerated()

_.Library.String IsGenerated ( _.Library.String  Name)
static

Return 1 if you wish this item to appear as if it is 'generated' when opened in Studio,.

return 0 to force this item not to appear as 'generated' and return "" to use normal processing.

Reimplemented in ISC.

◆ IsReadOnly()

_.Library.Boolean IsReadOnly ( _.Library.String  InternalName)

Return true if this item should be marked as read only.

This is called when Studio opens a document. It is set to indicate that the user checked the 'read only' checkbox in the open dialog in Studio.

◆ ItemIconState()

_.Library.Integer ItemIconState ( _.Library.String  InternalName)

Used to allow Studio to display different icons in open dialog or project window etc.

Return values are:

  • 0 - Not in source control
  • 1 - In source control, not checked out
  • 2 - In source control and checked out so item is editable

◆ OnAfterAllClassCompile()

_.Library.Status OnAfterAllClassCompile ( _.Library.String  List,
_.Library.Integer  Level,
_.Library.String  qstruct,
_.Library.Status  Status 
)
static

Called in the activated source control class after we have compiled all the classes but before we exit.

Note that this is a class method and it does not require the source control class to be instantiated in order for it to be called. By default it will call the <method>OnAfterClassCompile</method> if there is a source control class instantiated, but you can override this to do whatever you require. List is a subscripted array of items that were compiled. Status is the current compile return error Status, so the callback can check if there was any error in compiling the list of classes.

Reimplemented in SourceControl.

◆ OnAfterClassCompile()

_.Library.Status OnAfterClassCompile ( _.Library.String  List,
_.Library.Integer  Level,
_.Library.String  qstruct,
_.Library.Status  Status 
)

Called in the class compiler after we have compiled all the classes before we exit.

List is a subscripted array of items that were compiled. Status is the current compile return error Status, so the callback can check if there was any error in compiling the list of classes.

Reimplemented in SourceControl.

◆ OnAfterLoad()

_.Library.Status OnAfterLoad ( _.Library.String  InternalName,
_.Library.RegisteredObject  Object 
)

This is called after the item is loaded but before it is sent to Studio.

so you have a chance to modify this copy before it appears in the editor. It is passed a reference to the object that represents this item so it can be modified before Studio reads this information.

Reimplemented in SourceControl.

◆ OnAfterSave()

_.Library.Status OnAfterSave ( _.Library.String  InternalName,
_.Library.RegisteredObject  Object 
)

This is called after the item has been saved to the database.

It may be passed a reference to the object representing the item just saved. It can be use to export this documement to an external form for example.

Reimplemented in ISC, File, and SourceControl.

◆ OnAfterStorage()

_.Library.Status OnAfterStorage ( _.Library.String  InternalName,
_.Library.String  Location 
)

This is called if you compile a class and the compilation updates the class storage.

It is called after the storage has been updated so you can determine how to deal with this change in the class. The Location is the global reference to the class definition that was changed.

Reimplemented in ISC, and SourceControl.

◆ OnBeforeAllClassCompile()

_.Library.Status OnBeforeAllClassCompile ( _.Library.String  List,
_.Library.Integer  Level,
_.Library.String  qstruct 
)
static

Called in the activated source control class before starting a compile after we have resolved the list of classes.

but before we have started the compile itself. Note that this is a class method and it does not require the source control class to be instantiated in order for it to be called. By default it will call the <method>OnBeforeClassCompile</method> if there is a source control class instantiated, but you can override this to do whatever you require. Returning an error here will abort the compile. List is a subscripted array of items that will be compiled.

Reimplemented in SourceControl.

◆ OnBeforeClassCompile()

_.Library.Status OnBeforeClassCompile ( _.Library.String  List,
_.Library.Integer  Level,
_.Library.String  qstruct 
)

Called in the class compiler after we have resolved the list of classes to be compiled but.

before we have started the compile itself. List is a subscripted array of items that will be compiled.

Reimplemented in SourceControl.

◆ OnBeforeCompile()

_.Library.Status OnBeforeCompile ( _.Library.String  InternalName,
_.Library.String  qstruct 
)

Called before the compile of the item is done.

It is passed a qstruct which can be inspected and modified.

Reimplemented in SourceControl.

◆ OnBeforeDelete()

_.Library.Status OnBeforeDelete ( _.Library.String  InternalName)

Called before an item is deleted.

Returning an error code prevents the delete from occurring.

Reimplemented in SourceControl.

◆ OnBeforeLoad()

_.Library.Status OnBeforeLoad ( _.Library.String  InternalName)

This is called before the actual load of data to give the chance.

to load the item from an external format.

Reimplemented in SourceControl.

◆ OnBeforeSave()

_.Library.Status OnBeforeSave ( _.Library.String  InternalName,
_.Library.String  Location,
_.Library.RegisteredObject  Object 
)

Called before the item is saved to the database it is passed.

a reference to the current temporary storage of this item so that it can be modified before the save completes. If you quit with an error value then it will abort the save.

Reimplemented in ISC, and SourceControl.

◆ OnMenuItem()

_.Library.Status OnMenuItem ( _.Library.String  MenuName,
_.Library.String  InternalName,
_.Library.String  SelectedText,
_.Library.Boolean  Enabled,
_.Library.String  DisplayName 
)

This is called for every menu item returned to Studio to allow the menu to be enabled/disabled without.

having to write a custom query for <query>MenuItems</query>. The DisplayName of this menu is also passed by reference and this may be modified to change the appearance of this menu item. The MenuName is the main menu name then the submenu name separated by a ','. If Enabled is set to -1 then it will remove this menu item from the list totally, 0 will gray the menu item out, and the default 1 will display the menu item as normal.

Reimplemented in ISC, Base, and SourceControl.

◆ UserAction()

_.Library.Status UserAction ( _.Library.Integer  Type,
_.Library.String  Name,
_.Library.String  InternalName,
_.Library.String  SelectedText,
_.Library.String  Action,
_.Library.String  Target,
_.Library.String  Msg,
_.Library.Boolean  Reload 
)

This is called when the user performs an action that may need to interact with.

the server, such as selecting a menu or adding a new document. This encompases what the deprecated Flags parameter did and allows additional flexibility.

The Type argument values are:

  • 0 : Server defined menu item selected
  • 1 : Other Studio action

When a menu item is selected the Name argument is the name of this menu item in the format '<MainMenu>,<SubMenu>'. For other Studio actions the Name argument is one of:

  • 0 : User has tried to change a document that is locked in source control
  • 1 : User has created a new document
  • 2 : User has deleted a document
  • 3 : User has opened a document
  • 4 : User has closed a document
  • 5 : User has connected to a new namespace
  • 6 : User has selected to import comma delimetered list of documents
  • 7 : User has saved a new document for the first time

The InternalName argument is the name of the document about which this action occurs. If there is any selected text in the document which has focus this is sent in the SelectedText argument. The Action argument is set by this method to tell Studio what to do. Possible return values for this are:

  • 0 : Do nothing, note that this method can still perform some action such as check an item out of source control, but Studio will not ask for user input.
  • 1 : Display the default Studio dialog with a yes/no/cancel button. The text for this dialog is provided in the 'Target' return argument.
  • 2 - Run a CSP page/Template. The Target is the full url to the CSP page/Template, as usual the page will be passed the current document name, any selected text, the project name, the namespace.
  • 3 - Run an EXE on the client. The Target is the name of an executable file on the client machine. It is the responsibility of the customer to ensure this EXE is installed in a suitable location.
  • 4 - Insert the text in Target in the current document at the current selection point.
  • 5 - Studio will open the documents listed in Target. If there are multiple documents to open they will be separated with commas. If the document name is 'test.mac:label+10' it will open the document 'test.mac' and goto 'label+10'.
  • 6 - Display an alert dialog in Studio with the text from the Target variable.
  • 7 - Display a dialog with a textbox and Yes/No/Cancel buttons. The text for this dialog is provided by the 'Target' return argument. The initial text for the textbox is provided by the 'Msg' return argument.

If the Reload argument is set to true then the current document will be reloaded in Studio. This is useful if you change the document to change its attribute so Studio will pick up these changes.

Reimplemented in ISC, and Base.

Member Data Documentation

◆ IconStatus

IconStatus

Can be set to determine if we wish to report the source control status of the document in the project window.

or in the open dialog. This property should be set when the source control class is initialized. As this can be a large number of callbacks the default is not to call the <method>ItemIconState</method> method at all. Do not enable this unless the information needed is available directly in InterSystems IRIS or the performance will be too slow. Values are:

  • 0 - Disabled
  • 1 - Use <method>ItemIconState</method> callback in project window
  • 2 - Use <method>ItemIconState</method> callback in open dialog window (and namespace window)
  • 3 - Use <method>ItemIconState</method> callback everywhere

 

◆ MainJob

MainJob

$Job number of the main Studio process or blank if this is the main Studio connection.

This can be used to help co-ordinate between the jobs if Studio is using another server process for things like find in files or a big compile.  

◆ Modified

Modified

If the root node is set to 1 then calls to the source control hooks will keep track if the.

source control hook modifies the document and if it does then it will set SourceControl.Modified(docname)=1.  

◆ StudioVersion

StudioVersion

Version of Studio that is connecting to this server.

 

◆ Username

Username

The username of this source control user.