IRISLIB database
CSP Class Reference

The <class>SYSTEM.CSP</class> class provides an interface for managing CSP pages. More...

Inheritance diagram for CSP:
Collaboration diagram for CSP:

Static Public Member Functions

_.Library.Status DeleteAllRules ()
 Delete all the user defined rules in the current namespace.
 
_.Library.Status DeletePage (_.Library.String pageURL, _.Library.String qspec)
 Delete a CSP page from the disk file pageURL specified as a URL. More...
 
_.Library.Status DeleteRule (_.Library.String rulename, _.Library.String flags)
 Delete a CSP rule. More...
 
_.Library.Status DeleteRuleFile (_.Library.String url, _.Library.String flags)
 Delete the rules that had been loaded by a CSP rule file specified. More...
 
 DisplayConfig ()
 Displays the current global CSP configuration parmeters and what they mean. More...
 
_.Library.List FilenameToUrls (_.Library.String filename)
 Take an absolute file name, e.g., "c:\dir1\dir2\myfile.dat". More...
 
_.Library.String GetAppName (_.Library.String url)
 Return the CSP application name from the url of a CSP page.
 
_.Library.String GetClassName (_.Library.String url, _.Library.String baseurl)
 Return the CSP class name for a url. More...
 
_.Library.String GetConfig (_.Library.String param)
 Get the value of a CSP configuration parameter. More...
 
_.Library.String GetDefaultApp (_.Library.String namespace)
 Return the default CSP application name for this namespace. More...
 
_.Library.String GetFileName (_.Library.String url)
 Return the filename for a url of a CSP page. More...
 
_.CSP.Mgr.GatewayRegistry GetGatewayRegistry ()
 The gateway registry gives access to the CSP Gateways connected to InterSystems IRIS.
 
_.Library.String GetPortalApp (_.Library.String namespace, _.Library.String page)
 Return the correct CSP application link for this portal page. More...
 
_.Library.Boolean IsUpToDate (_.Library.String url)
 Return true if this url is up to date and false otherwise.
 
_.Library.Status LoadPage (_.Library.String pageURL, _.Library.String flags)
 Load a CSP page from disk and compile it. More...
 
_.Library.Status LoadPageDir (_.Library.String dirURL, _.Library.String flags)
 Load all CSP pages in a directory from disk and compile them. More...
 
_.Library.Status LoadRule (_.Library.String file, _.Library.String flags)
 Load a CSP rule file. More...
 
_.Library.Status LoadRuleDir (_.Library.String directory, _.Library.String flags)
 Load all CSP rule files in a directory specified as a URL. More...
 
_.Library.Status LoadRuleFile (_.Library.String url, _.Library.String flags)
 Load a CSP rule file specified as a URL. More...
 
 SetConfig (_.Library.String param, _.Library.String val)
 Set a CSP configuration parameter. More...
 
 Shell ()
 Provide a shell to get CSP pages on the command line. More...
 
_.Library.String Show (_.Library.String url, _.Library.Boolean showhttp, _.CSP.Session session)
 Display a CSP page on the console. More...
 
_.Library.Boolean WebPage (_.Library.String class)
 Pass it a classname, e.g. More...
 
- Static Public Member Functions inherited from Help
_.Library.String Help (_.Library.String method)
 This is a helper class that is used by the various SYSTEM classes to provide a Help method. More...
 

Detailed Description

The <class>SYSTEM.CSP</class> class provides an interface for managing CSP pages.

You can use it via the special $system object:

Do $SYSTEM.CSP.LoadPage("/user/apps/page.csp","ck")

Member Function Documentation

◆ DeletePage()

_.Library.Status DeletePage ( _.Library.String  pageURL,
_.Library.String  qspec 
)
static

Delete a CSP page from the disk file pageURL specified as a URL.

as well as the associated class representation.

◆ DeleteRule()

_.Library.Status DeleteRule ( _.Library.String  rulename,
_.Library.String  flags 
)
static

Delete a CSP rule.

Deletes the CSP rule rulename in the current namespace.

◆ DeleteRuleFile()

_.Library.Status DeleteRuleFile ( _.Library.String  url,
_.Library.String  flags 
)
static

Delete the rules that had been loaded by a CSP rule file specified.

as a URL. DeleteRuleFile allows easy cleanup of previously loaded rules.

◆ DisplayConfig()

DisplayConfig ( )
static

Displays the current global CSP configuration parmeters and what they mean.

Displays a list of the current CSP configuration parameters, their values and what each of them means.

◆ FilenameToUrls()

_.Library.List FilenameToUrls ( _.Library.String  filename)
static

Take an absolute file name, e.g., "c:\dir1\dir2\myfile.dat".

Search the lists of files for the CSP applications to find a match. (There may be more than one.) The matches are returned as a list of urls to the file: {"/csp/app1/myfile.dat","/csp/otherapp/myfile.dat"}

◆ GetClassName()

_.Library.String GetClassName ( _.Library.String  url,
_.Library.String  baseurl 
)
static

Return the CSP class name for a url.

Return the class name of the class that will be generated from url. If you use a relative URL then you should also specify baseurl which is the URL this page is relative to.

◆ GetConfig()

_.Library.String GetConfig ( _.Library.String  param)
static

Get the value of a CSP configuration parameter.

Gets the value of one of the CSP configuration parameters that effect how CSP runs on this entire machine. Pass in the param name and it returns the current value.

◆ GetDefaultApp()

_.Library.String GetDefaultApp ( _.Library.String  namespace)
static

Return the default CSP application name for this namespace.

The default application may be explicitly defined by going to the desired appliction, setting its namespace, and then checking the Is-Namespace-Default checkbox.

If there is no explicitly defined default, the following rules apply. If /csp/<namespace> is defined then this will be the default application name, otherwise it will return the first CSP application that maps to this namespace.

◆ GetFileName()

_.Library.String GetFileName ( _.Library.String  url)
static

Return the filename for a url of a CSP page.

Return the file name associated with the page url.

◆ GetPortalApp()

_.Library.String GetPortalApp ( _.Library.String  namespace,
_.Library.String  page 
)
static

Return the correct CSP application link for this portal page.

Return

  1. "" if we can not link to portal application in this namespace,
  2. otherwise return either the default application i.e. /csp/<namespace>/ for this namespace if this is linking to something like ensemble or deepsee portal page which have to run in an application defined in this namespace
  3. or return /csp/sys/ if this is a system management portal page which always runs in /csp/sys/ application (or subapplication) and handles namespace switching itself.

◆ LoadPage()

_.Library.Status LoadPage ( _.Library.String  pageURL,
_.Library.String  flags 
)
static

Load a CSP page from disk and compile it.

Load a CSP page from the file pageURL specified as a URL and create a class representation of them. The class created will be compiled unless you pass the qualifier /cspcompileclass=0.

◆ LoadPageDir()

_.Library.Status LoadPageDir ( _.Library.String  dirURL,
_.Library.String  flags 
)
static

Load all CSP pages in a directory from disk and compile them.

Load all CSP page from the directory dirURL specified as a URL and create a class representation of them. The classes created will be compiled unless you pass the qualifier /cspcompileclass=0.

◆ LoadRule()

_.Library.Status LoadRule ( _.Library.String  file,
_.Library.String  flags 
)
static

Load a CSP rule file.

Loads the CSP rule file file (.csr file) into the current namespace and compiles it.

◆ LoadRuleDir()

_.Library.Status LoadRuleDir ( _.Library.String  directory,
_.Library.String  flags 
)
static

Load all CSP rule files in a directory specified as a URL.

Loads all the CSP rule files in directory (.csr files) into the current namespace and compiles it.

◆ LoadRuleFile()

_.Library.Status LoadRuleFile ( _.Library.String  url,
_.Library.String  flags 
)
static

Load a CSP rule file specified as a URL.

Loads the CSP rule file url (.csr file) into the current namespace and compiles it.

◆ SetConfig()

SetConfig ( _.Library.String  param,
_.Library.String  val 
)
static

Set a CSP configuration parameter.

Set one of the CSP configuration parameters that effect how CSP runs on this entire machine. Pass in the param name and the val that you wish to set.

◆ Shell()

Shell ( )
static

Provide a shell to get CSP pages on the command line.

Provide a command line interface to display CSP pages. This is useful for debugging.

◆ Show()

_.Library.String Show ( _.Library.String  url,
_.Library.Boolean  showhttp,
_.CSP.Session  session 
)
static

Display a CSP page on the console.

Displays the CSP page with URL url to the primary device (console). If auto-compiling is enabled, it checks the timestamp of the source file to see if a recompilation is required and peforms it if necessary.
showhttp if false will skip the HTTP headers and the OnPreHTTP callback
session if you pass in an existing CSP.Session object it will use this one rather than making a new one.

◆ WebPage()

_.Library.Boolean WebPage ( _.Library.String  class)
static

Pass it a classname, e.g.

'User.Test' and it returns if this is a CSP page or not

by looking if it extends CSP.Page class.