This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.

For information on migrating to InterSystems IRIS, see Why Migrate to InterSystems IRIS?

%Studio.SourceControl.Interface

class %Studio.SourceControl.Interface

This class is used internally by Caché. 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 provides the interface that Studio uses to talk to the source control class.

Method Inventory (Including Private)

Methods

classmethod AfterUserAction(Type As %Integer, Name As %String, InternalName As %String, Answer As %Integer, Msg As %String = "", ByRef Reload As %Boolean, ByRef Editable As %Boolean) as %Status
Called after Studio brings up its default dialog from calling OnUserAction() to tell the server what the answer was
classmethod ExtensionClassesClose(ByRef qHandle As %Binary) as %Status
classmethod ExtensionClassesExecute(ByRef qHandle As %Binary) as %Status
classmethod ExtensionClassesFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status
classmethod ExternalName(InternalName As %String) as %String
Returns the external name of this file
classmethod GetStatus(InternalName As %String, ByRef IsInSourceControl As %Boolean, ByRef Editable As %Boolean, ByRef IsCheckedOut As %Boolean, ByRef UserCheckedOut As %String, ByRef Reload As %Boolean) as %Status
Return information about this entity. The Reload parameter is returned by this function and is true if the status check changed the item in Cache and so may need to be reloaded.
classmethod IsGenerated(InternalName As %String) as %Boolean
Return true if this document is generated from some other item
classmethod OnBeforeTimestamp(class As %String(MAXLEN="")) as %Status
final classmethod SourceControlClassGet(namespace As %String) as %String
Return the name of the source control class we should use for this namespace. If we return "" then source control is not enabled in this namespace.
final classmethod SourceControlClassSet(val As %String = "", namespace As %String, sys As %Boolean = 0) as %Status
Set the name of the source control class we should use for this namespace. Set the value to "" to disable source control in this namespace. Set the value to $char(0) to remove the source control node for this namespace, this is different to setting it to "" which disables it as removing the node for this namespace will allow a look through to the default source control class for all namespaces.
final classmethod SourceControlCreate(Name As %String, Password As %String, ByRef Created As %Boolean, ByRef Flags As %Integer, Output Username As %String, Version As %String = "", ByRef Reload As %String, MainJob As %String = "", ByRef IconStatus As %Integer) as %Status
Creates an instance of the source control class stored in the local variable '%SourceControl' this is used by the load/save/compile functions to import export the routine to the external source control class.

It also returns Created which is true if the source control class was created correctly. Then Flags returns a integer set of flags to determine which dialogs to display in Studio. Studio passes its Version to the server so the server can modify its behavior based on this. The server returns Reload which if "" is set in Studio on a per user basis, but if set to 1 or 0 then this forces the auto reload behavior in Studio to follow this server setting. The MainJob is blank if this process is the main Studio connection, but is the $job of the initial Studio connection job if this is a background job for doing things like find in files, or a big compile. My passing the $job of the main process this background process and co-ordinate with the main job.

classmethod Test()
Test the creation of the source control class
classmethod UserAction(Type As %Integer, Name As %String, InternalName As %String, SelectedText As %String, ByRef Action As %String, ByRef Target As %String, ByRef Msg As %String, ByRef Reload As %Boolean, ByRef Editable As %Boolean) as %Status
Called when the user makes a change that may require some source control hook interaction
classmethod normalizeName(InternalName As %String) as %String
Reformat the InternalName to make sure the type is all in upper case

Queries

query ExtensionClasses()
Selects Name As %String, Description As %String
Selects Name As %String(MAXLEN=32767), Type As %Integer, DisplayName As %String(MAXLEN=32767)
Selects Name As %String(MAXLEN=32767), Type As %Integer, DisplayName As %String(MAXLEN=32767), SaveFlag As %String, Separator As %Boolean
Feedback