Skip to main content

%CSP.StudioTemplateInsert

abstract class %CSP.StudioTemplateInsert extends %CSP.StudioTemplateSuper

The %CSP.StudioTemplateInsert outputs the template for CSP with certain tags in front and at the end of the template so Studio can recognise this template and insert it into the current document.

This is automatically set as the superclass of the final page that generates the template by the rule.

Values can be returned to Studio by setting the %session.Data("Template") subnodes, for example to set the name of the class for a new class wizard use:

  Set %session.Data("Template","CLASS")="User.Test"
  
These %session.Data("Template") values must be set in the last page that generates the actual template. We provide methods to set values into this %session.Data("Template") nodes that Studio understands. These are AddToProject() and SetClassName().

Method Inventory

Parameters

parameter SECURITYRESOURCE = %Development;
Inherited description: This is a comma-delimited list of system Resources and associated permissions. A user must hold the specified permissions on all of the specified resources in order to view this page.
The format of each item in the list should be as follows:
Resource[:Permission]
Permission is optional, and defaults to USE if not supplied. If it is supplied, it should be one of USE, READ or WRITE. You can also specify or grouping using the '|' character, so 'R1,R2|R3,R3|R4' means you must have resource R1 and one of R2 or R3 and one of R3 or R4. So if you have R1,R3 it will pass, if you have R1,R4 it will not as it does not meet the R2|R3 condition. So the '|' or condition takes precedence over the ',' and condition.

Methods

classmethod AddToProject(Name As %String) as %Status
Add this named item to the current project in Studio. If you have multiple items then call this method multiple times. The Name must contain the type of the item e.g. 'User.Test.cls' is a class, and 'TEST.mac' is a MAC routine.
classmethod AddToSourceControl(Name As %String) as %Status
Add this item to source control. If you have multiple items then call this method multiple times. The Name must containt eh type of the item to add e.g. 'User.Test.cls'.
classmethod SetClassName(Name As %String) as %Status
If you are making a new class template then Studio needs to be told the name of this class. This is done by calling this method in the final page passing the name of the class.

Inherited Members

Inherited Methods

Subclasses

FeedbackOpens in a new tab