Class Reference
IRIS for UNIX 2019.2
InterSystems: The power behind what matters   
Documentation  Search
  [ENSLIB] >  [%Studio] >  [Project]
Private  Storage   

persistent class %Studio.Project extends %Persistent, %XML.Adaptor

Represents a Studio Project.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
20 80 5 1


Summary

Properties
BreakPoints DebugStepping Defines Description
HttpServer Items LastModified Locked
Name Projections RunInTerminal Stream
StreamName Target TargetType TerminalPassword
TerminalPort TerminalUsername WatchPoints WatchVariables

Methods
%AddToSaveSet %AddToSyncSet %BMEBuilt %CheckConstraints
%CheckConstraintsForExtent %ClassIsLatestVersion %ClassName %ComposeOid
%ConstructClone %Delete %DeleteExtent %DeleteId
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Exists
%ExistsId %Extends %GUID %GUIDSet
%GetLock %GetParameter %GetSwizzleObject %Id
%InsertBatch %IsA %IsModified %IsNull
%KillExtent %KillExtentData %LoadFromMemory %LockExtent
%LockId %New %NormalizeObject %ObjectIsNull
%ObjectModified %Oid %OnBeforeAddToSync %OnDetermineClass
%OnNew %Open %OpenId %OriginalNamespace
%PackageName %PhysicalAddress %PurgeIndices %Reload
%RemoveFromSaveSet %ResolveConcurrencyConflict %RollBack %Save
%SaveDirect %SaveIndices %SerializeObject %SetModified
%SortBegin %SortEnd %SyncObjectIn %SyncTransport
%UnlockExtent %UnlockId %ValidateIndices %ValidateObject
AddBreakPoint AddItem AddWatchPoint AddWatchVariable
ArrayToStream BackupDeployContent Check Compile
CreateClone Delete DeleteItem Deploy
DeployToFile DeployToGbl DeployToStream Export
ExportCDLToStream ExportList ExportListToStream ExportRtn
ExportRtnToStream ExportToStream FindInFiles FindInFilesRegex
FindInProject GetCurrentTimeStamp GetDate GetStreamName
Import ImportFromStream InstallFromFile InstallFromGbl
ListWebPages Lock LockItem NameIsValid
NameSet Normalize NormalizeName ProjectItemsListClose
ProjectItemsListExecute ProjectItemsListFetch ProjectItemsListFetchRows RemoveAllBreakPoints
RemoveAllWatchPoints RemoveAllWatchVariables RemoveBreakPoint RemoveBreakPointsForRoutine
RemoveItem RemoveWatchPoint RemoveWatchVariable SetStreamName
StreamToArray TargetNormalize Unlock XMLDTD
XMLExport XMLExportToStream XMLExportToString XMLNew
XMLSchema XMLSchemaNamespace XMLSchemaType realCompile
sCompileLargeList sLoadLargeList sLoadStreamLargeList


Properties

• relationship BreakPoints as BreakPoint(XMLITEMNAME="BreakPoint",XMLPROJECTION="wrapped") [ Inverse = Project,Cardinality = children ];
• property DebugStepping as %String(MAXLEN=64,XMLPROJECTION="none");
• property Defines as %String(MAXLEN=4000,XMLPROJECTION="attribute");
• property Description as %String(MAXLEN=4000,XMLNAME="ProjectDescription",XMLPROJECTION="element");
• property HttpServer as %String(MAXLEN=256,XMLPROJECTION="attribute");
• relationship Items as ProjectItem(XMLITEMNAME="ProjectItem",XMLPROJECTION="wrapped") [ Inverse = Project,Cardinality = children ];
• property LastModified as %Studio.TimeStamp(XMLPROJECTION="attribute");
• property Locked as %Integer(XMLPROJECTION="none") [ Transient ];
• property Name as %String(MAXLEN=64,XMLNAME="name",XMLPROJECTION="attribute");
• property Projections as list of %String(MAXLEN=128,XMLPROJECTION="none");
• property RunInTerminal as %Boolean(XMLPROJECTION="attribute");
• property Stream as %FileBinaryStream(XMLPROJECTION="none") [ Transient ];
Temporary stream for passing information between InterSystems IRIS and client system.
• property StreamName as %String(MAXLEN=256,XMLPROJECTION="none") [ Transient ];
Temporary name of the stream
• property Target as %String(MAXLEN=256,XMLPROJECTION="attribute");
• property TargetType as %Integer(XMLPROJECTION="attribute");
• property TerminalPassword as %String(MAXLEN=64,XMLPROJECTION="attribute");
• property TerminalPort as %Integer(XMLPROJECTION="attribute");
• property TerminalUsername as %String(MAXLEN=64,XMLPROJECTION="attribute");
• relationship WatchPoints as WatchPoint(XMLITEMNAME="WatchPoint",XMLPROJECTION="wrapped") [ Inverse = Project,Cardinality = children ];
• relationship WatchVariables as WatchVariable(XMLITEMNAME="WatchVariable",XMLPROJECTION="wrapped") [ Inverse = Project,Cardinality = children ];

Methods

• method %IsModified() as %Integer
Returns true (1) if a property of this instance has been modified, otherwise false (0). A TRUE result does not necessarily mean that any property has actually been changed. If %IsModified() returns false then the object has not been modified. There are some situations where we simply cannot efficiently detect a change in value. In these cases we will set the modified status of the property.
• method %ObjectModified() as %Integer
This method is somewhat similar to %IsModified but it also checks to see if swizzled references would cause the object to become modified should they be serialized. This works on the assumption that a reference to a persistent object will never be modified if the ID has already been assigned. For references to serial objects, a call to %ObjectModified indicates whether or not the serialized value is different. If the reference to a swizzled object is different from the initial object state then the $$$objModAll macro will already return true. Reference the Set code. Returns true (1) if this instance has been modified, otherwise false (0).
• method %OnNew(initvalue) as %Status
This callback method is invoked by the %New method to provide notification that a new instance of an object is being created.

If this method returns an error then the object will not be created.

It is passed the arguments provided in the %New call. When customizing this method, override the arguments with whatever variables and types you expect to receive from %New(). For example, if you're going to call %New, passing 2 arguments, %OnNew's signature could be:

Method %OnNew(dob as %Date = "", name as %Name = "") as %Status If instead of returning a %Status code this returns an oref and this oref is a subclass of the current class then this oref will be the one returned to the caller of %New method.

• method AddBreakPoint(rtn As %String, offset As %Integer, condition As %String = "", label As %String = "") as %Status
• method AddItem(name As %String, type As %String = "") as %Status
Add an item to the project, you can just pass the full name in the name argument and nothing in the type argument and this will add the correct type information automatically.
• method AddWatchPoint(var As %String, condition As %String = "") as %Status
• method AddWatchVariable(variable As %String, pane As %Integer) as %Status
• classmethod ArrayToStream(ByRef array As %String, stream As %Stream.Object)
• classmethod BackupDeployContent(gbl As %String, backupgbl As %String, qspec As %String) as %Status
Backup the items that will be replaced when installing a deployed set of items to backupgbl
• method Check() as %Status
Check the project so that if any items are do not exist then we will remove them from the project
• method Compile(qspec As %String = "", ByRef %errorlog As %String) as %Status
Compile all the items in this project, using the qspec. The order of compilation is INT, CLS, MAC, CSR, CSP, other.
• method CreateClone(name As %String) as %Status
Create a clone of this project and then save it with a new name. Note that if the target name already exists then it will be deleted without warning. It is the responsibility of the caller to check if it wishes to overwrite the new name or not.
• classmethod Delete(id As %String) as %Status
Delete this project
• classmethod DeleteItem(name As %String)
• method Deploy(ByRef deploydir As %String, qspec As %String, ByRef %errorlog As %String, ShowFilename As %Boolean = 1, gbl As %String = "", removesource As %Boolean = 0) as %Status
Export this project to a DAT file or a global for deployment. The DAT file will be stored in the deploydir directory.

The qspec are the standard cache objects qualifiers.

• method DeployToFile(file As %String, qspec As %String, removesource As %Boolean = 0) as %Status
Package up this project into a global for deployment and then export this global to the file specified. This can be imported using the InstallFromFile. The qualifiers are used to determine if we should export selectivity information using the /exportselectivity qualifier. Also the /keepsource will determine if we add intermediate compilation files such as User.Test.1.int when you are creating a package containing User.Test.cls. If you pass removesource=1 then it will strip out all source code in the package including class method code, and routines. If the filename ends in .gz or .gzip it will automatically gzip the file.
• method DeployToGbl(gbl As %String, qspec As %String, removesource As %Boolean = 0) as %Status
Package up this project into a global for deployment. This can be imported using the InstallFromGbl. The qualifiers are used to determine if we should export selectivity information using the /exportselectivity qualifier. Also the /keepsource will determine if we add intermediate compilation files such as User.Test.1.int when you are creating a package containing User.Test.cls. If you pass removesource=1 then it will strip out all source code in the package including class method code, and routines.
• method DeployToStream(qspec As %String, ByRef %errorlog As %String) as %Status
Wrapper to Deploy which returns a binary stream in Stream rather than writing to a file.
• method Export(ByRef filename As %String, qspec As %String, justproject As %Boolean, ByRef %errorlog As %String, Charset As %String = "", ShowFilename As %Boolean = 1) as %Status
Export this project in XML format to the filename.

If the justproject is true then it will only export the project definition, but not any items in this project, otherwise the default behavour is to export all the items in the project to the same XML file.

The qspec are the standard cache objects qualifiers.

• method ExportCDLToStream(classname As %String = "", qspec As %String = "", file As %String = "", Charset As %String = "") as %Status
Wrapper to ExportCDLList^%apiOBJ which returns a stream in stream rather than writing to a file. You pass this a comma separated list of classes, or an array subscripted by the class name. The file is the filename to output this to without the directory.
• classmethod ExportList(ByRef filename As %String, ByRef list As %String, qspec As %String, Charset As %String = "", ShowFilename As %Boolean = 1) as %Status
Export a list of items to the filename specified. The list can either be comma delimited such as 'TEST.MAC,Example.CLS,/csp/samples/loop.csp' or a subscripted array with the first subscript being the name of the item to export. The qspec are the standard ObjectScript qualifiers, if the "d" is passed then it will output status information to the current device.
• method ExportListToStream(ByRef list As %String, qspec As %String, file As %String = "", Charset As %String = "") as %Status
Wrapper to ExportList which returns a stream in Stream rather than writing to a file.
• classmethod ExportRtn(rtnlist As %String = "", qspec As %String = "", file As %String = "", Charset As %String = "", ShowFilename As %Boolean = 1) as %Status
Wrapper to Export^%apiRTN which returns a stream in stream rather than writing to a file. You pass this a comma separated list of routines or an array subscripted by the routine name. The file is the filename to output this to without the directory.
• method ExportRtnToStream(rtnlist As %String = "", qspec As %String = "", file As %String = "", Charset As %String = "") as %Status
Wrapper to Export^%apiRTN which returns a stream in stream rather than writing to a file. You pass this a comma separated list of routines or an array subscripted by the routine name. The file is the filename to output this to without the directory.
• method ExportToStream(qspec As %String, justproject As %Boolean, ByRef %errorlog As %String, file As %String = "", Charset As %String = "") as %Status
Wrapper to Export which returns a stream in Stream rather than writing to a file.
• classmethod FindInFiles(String As %String, PatternList As %String, pSystem As %Boolean = 0, WholeWords As %Boolean = 0, CaseSensitive As %Boolean = 1, Max As %Integer = 200, Filter As %String(MAXLEN=512)="", wild As %Boolean = 1) as %Status
Find a particular string inside a list of files.
String is the string to search for. The PatternList is the list of items to search. Typically this will be '*.*' but you can specify just MAC and INC files with '*.mac,*.inc' or a list of individual files with 'abc.mac,def.cls'. The acceptable extensions at this time are int,mac,inc,bas,cls,csp,csr,prj,mvm,bam,mvb. The list of matches is written to the screen. If pSystem is true then it also searches system routines and classes (where the source is available) when searching the entire namespace. If WholeWords is true then it will only find whole words and not fragments, it defaults to false. If CaseSensitive is true (the default) then the search is case sensitive, otherwise it is case insensitive. The maximum number of matches it will find can be specified in Max which defaults to 200. If wild is false then the String does not contain any wild cards and so should be treated as a string literal search even if it contains ?*\ characters.
• classmethod FindInFilesRegex(Regex As %String, ItemList As %String, pSystem As %Boolean = 0, pGenerated As %Boolean = 0, Max As %Integer = 200) as %Status
Search a list of files, using a Regular Expression.
Regex is the Regular Expression for the search. The ItemList is the list of items to search. Typically this will be '*.*' but you can specify just MAC and INC files with '*.mac,*.inc' or a list of individual files with 'abc.mac,def.cls'. The acceptable extensions at this time are int,mac,inc,bas,cls,csp,csr,prj,mvm,bam,mvb.
The list of matches is written to the current device.
If pSystem is true then it also searches system routines and classes (where the source is available). If pGenerated is true then it also searches generated items. The maximum number of matches it will find can be specified in Max which defaults to 200.
• method FindInProject(String As %String, WholeWords As %Boolean = 0, CaseSensitive As %Boolean = 1, Max As %Integer = 200, wild As %Boolean = 1) as %Status
Find a particular string inside this project.
String is the string to search for. The list of matches is written to the screen. If WholeWords is true then it will only find whole words and not fragments, it defaults to false. If CaseSensitive is true (the default) then the search is case sensitive, otherwise it is case insensitive. The maximum number of matches it will find can be specified in Max which defaults to 200. If wild is false then the PatternList does not contain any wild cards and so should be treated as a string literal search even the pattern contains ?*\ characters.
• method GetCurrentTimeStamp() as %TimeStamp
Get the on-disk timestamp for the project.
• classmethod GetDate(name As %String) as %TimeStamp
Return the timestamp the project with name was last updated.
• method GetStreamName() as %String
Return the name of the stream. Used by Studio because it can not access the Stream property directly
• classmethod Import(filename As %String, qspec As %String, ByRef %errorlog As %String, ByRef imported As %String, listonly As %Boolean = 0, selecteditems As %String = "", displayname As %String) as %Status
Import the XML description of routines, classes, CSP files, and projects into this namespace. This returns the list of items imported in imported separated by commas. You can pass in the qspec to tell it if it should compile these imported elements as well. If listonly is true then it will just return the list of items to import and not import anything. selecteditems is an optional comma separated list of items, if present then it will only import these items and it will skip any item not in this list. The filename may be a comma separated list of files.
• method ImportFromStream(qspec As %String, ByRef %errorlog As %String, ByRef imported As %String, listonly As %Boolean = 0, selecteditems As %String = "") as %Status
Wrapper to Import which is passed a stream in Stream rather than a file.
• classmethod InstallFromFile(file As %String, qspec As %String, runinstall As %Boolean = 1, ByRef project As %Studio.Project, listonly As %Boolean = 0, backupgbl As %String = "", validatesig As %Boolean = 0, transaction As %Boolean = 1)
This will install any routines, classes and globals into the current namespace from a file created with the DeployToFile. The qualifiers respects the /importselectivity item to determine of we should import selectivity information from this package. If you pass in a %Studio.Project in project then this will be returned with all the items in the deployment in gbl added to the project. If listonly is true then nothing will be actually changed in the database, so you can list items. If runinstall is false then if the deployment contains a routine called 'INSTALL' (note not in the database, but in the deployment) then we will not automatically run this after installing the items in this deployment. The default is to run the INSTALL routine if present.
• classmethod InstallFromGbl(gbl As %String, qspec As %String, runinstall As %Boolean = 1, ByRef project As %Studio.Project, listonly As %Integer = 0, backupgbl As %String = "", validatesig As %Boolean = 0, transaction As %Boolean = 1)
This will install any routines, classes and globals into the current namespace from a global created with the DeployToGbl. The qualifiers respects the /importselectivity item to determine if we should import selectivity information from this package. If you pass in a %Studio.Project in project then this will be returned with all the items in the deployment in gbl added to the project. If listonly is true then nothing will be actually changed in the database, so you can list items. If runinstall is true then if the deployment contains a routine called 'INSTALL' (note not in the database, but in the deployment) then we will automatically run PRE^INSTALL before the installation and ^INSTALL after installing the items in this deployment. The default is to run the INSTALL routine if present. If backupgbl is defined then any items which will be replaced by items in the package are backed up to this global location first. Also if the deployment contains an INSTALL routine then this will be placed in the backup as UNINSTALL, and if the deployment contains an UNINSTALL routine this will be placed in the backup as INSTALL. So when the backup is installed (do you uninstall this deployment) it will run the PRE^UNINSTALL routine of the original deployment and after it is uninstalled it will run ^UNINSTALL. If transaction is false then we will not use a transaction to allow rolling back the install. If validatesig is true we will validate any code being replaced is the original version installed from InterSystems.
• method ListWebPages(ByRef pages As %String(MAXSTRING=""), qspec As %String = "") as %Status
Return comma separated list of items in this project which can be called as web pages
• method Lock() as %Status
Lock the project.
• classmethod LockItem(name As %String, lock As %Boolean) as %Status
Lock a project with the name. If lock is true then it is locked and if it is false then it is unlocked.
• classmethod NameIsValid(val As %String) as %Status
• method NameSet(val As %String) as %Status
This is a Set accessor method for the Name property.
• classmethod Normalize() as %Status
• classmethod NormalizeName(ByRef name As %String, ByRef type As %String = "", skiptype As %Boolean = 0) as %Status
Normalize the name passed in and determine its type
• classmethod ProjectItemsListClose(QHandle As %Binary) as %Status
• classmethod ProjectItemsListExecute(ByRef QHandle As %Binary, project As %String(MAXLEN=512), noexpandpackages As %Boolean = 0) as %Status
• classmethod ProjectItemsListFetch(ByRef QHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status
• classmethod ProjectItemsListFetchRows(ByRef QHandle As %Binary, FetchCount As %Integer = 0, ByRef RowSet As %List, ByRef ReturnCount As %Integer, ByRef AtEnd As %Integer) as %Status
ProjectItemsListFetchRows returns the next FetchCount rows in the query.
• method RemoveAllBreakPoints() as %Status
Remove all break points from a project.
• method RemoveAllWatchPoints() as %Status
Remove all break points from a project.
• method RemoveAllWatchVariables() as %Status
Remove all watch variables from a project.
• method RemoveBreakPoint(rtn As %String, offset As %Integer, label As %String = "") as %Status
• method RemoveBreakPointsForRoutine(rtn As %String) as %Status
• method RemoveItem(name As %String, type As %String = "") as %Status
• method RemoveWatchPoint(var As %String, condition As %String = "") as %Status
• method RemoveWatchVariable(variable As %String, pane As %Integer) as %Status
• method SetStreamName(file As %String = "") as %Status
This will try and set the Stream to point to the filename file. This is used by the Studio so the Import method shows the filename the user expects.
• classmethod StreamToArray(stream As %Stream.Object, ByRef array As %String, delim As %String = ",")
• classmethod TargetNormalize(val As %String) as %String
• method Unlock() as %Status
Unlock the project.
• classmethod realCompile(qstruct, ByRef %errorlog As %String, ByRef itemlist As %String, ByRef updatedlist As %String) as %Status
Compile all the items in itemlist. Used by Compile and Import.
• classmethod sCompileLargeList(itemliststream As %GlobalCharacterStream, qspec As %String, ByRef errorlog As %String) as %Status
• classmethod sLoadLargeList(filestream As %GlobalCharacterStream, qspec As %String, ByRef errorlog As %String, loadedliststream As %GlobalCharacterStream, listonly As %Boolean, selecteditemstream As %GlobalCharacterStream) as %Status
• method sLoadStreamLargeList(qspec As %String, ByRef errorlog As %String, loadedliststream As %GlobalCharacterStream, listonly As %Boolean, selecteditemstream As %GlobalCharacterStream) as %Status

Queries

• query BreakPointsList(projectID As %String(MAXLEN=512))
Selects ID, Routine, Offset, Condition
SQL Query :
SELECT ID, Routine, Offset,Condition
FROM %Studio.BreakPoint
WHERE Project = :projectID
List of all break points for a project
• query ProjectItemsList(project As %String(MAXLEN=512), noexpandpackages As %Boolean = 0)
Selects ID, Name, Type, InSourceControl, Package, CSPApp
List of all items for a project
• query ProjectList()
Selects ID, Name, LastModified
SQL Query :
SELECT ID, Name, LastModified
FROM %Studio.Project
ORDER BY Name
List of all projects
• query WatchPointsList(projectID As %String(MAXLEN=512))
Selects ID, Variable, Condition
SQL Query :
SELECT ID, Variable, Condition
FROM %Studio.WatchPoint
WHERE Project = :projectID
List of all break points for a project
• query WatchVariablesList(projectID As %String(MAXLEN=512))
Selects ID, Variable, Pane
SQL Query :
SELECT ID, Variable, Pane
FROM %Studio.WatchVariable
WHERE Project = :projectID
List of all watch variables for a project

Indices

•index (NameIdx on Name) [IdKey];


Copyright (c) 2019 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.