Class Reference
%CSP.Documatic
Server:irisdocs2
Instance:IRISLATEST
User:UnknownUser
 
-
  [%SYS] >  [%CSP] >  [Documatic]
Private  Storage

class %CSP.Documatic extends %CSP.Page

This class is used internally by InterSystems IRIS. 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.

Automatic HTML Document Generator for InterSystems IRIS classes.

To use, point a browser at: http://127.0.0.1:1972/csp/documatic/%25CSP.Documatic.cls.

The documentation for a class can consist of just plain text, or it may have embedded HTML tags. When present, these tags are also sent to the browser displaying the class page. Thus, it is possible to exert finer control over the presentation of class information such as list formatting, definitions, even tables.

If HTML is used to enhance the display, the user should take care to follow the HTML standard and insert as little markup as necessary to accomplish the job. The reason for this is that the class documentation may be viewed on many different browsers, each of which has its own extensions. The closer the HTML is to the standard (and to those features of the standard that all browsers support), the better the chance that the information will appear the same on all displays.

Documatic also supports several special tags in addition to those defined by HTML:

  1. <CLASS>Classname</CLASS> This produces a link that when clicked on will take you to the documentation for the class named 'Classname'.
  2. <METHOD>Method</METHOD> Produces a link that will take you to the method called 'Method' in the current class.
  3. <PROPERTY>Property</PROPERTY> Produces a link that will take you to the documentation for property 'Property' in the current class.
  4. <QUERY>Query</QUERY> Produces a link that will take you to the documentation for the query 'Query' in the current class.
  5. <PARAMETER>Parameter</PARAMETER> formats the method parameter 'Parameter' in the parameter style.
  6. <EXAMPLE>Set A="Test</EXAMPLE> Formats the text enclosed in the <EXAMPLE></EXAMPLE> tags as a code example. This will syntax highlight the code if possible, as well as formatting it to look pretty. You can include the other tags 1-5 inside an <EXAMPLE> tag, however no other HTML formatting will work inside an <EXAMPLE> tag. By default it assumes the language you are entering the example in is COS, if you wish to specify another language use <EXAMPLE LANGUAGE=BAS> for Basic, if you do not wish it to attempt to color the language enter <EXAMPLE LANGUAGE=NONE>.
  7. <link href="/AboutStreams.html"> Documentation on streams</link> Creates a link to this document using the stream server when coming from CSP so that this document can still be served when you are going through a web server or when you are going to the built in web server.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
5 78 3


Summary

Methods
%ClassIsLatestVersion %ClassName %Close %DispatchClassMethod
%DispatchGetModified %DispatchGetProperty %DispatchMethod %DispatchSetModified
%DispatchSetMultidimProperty %DispatchSetProperty %Extends %GetParameter
%IncrementCount %IsA %New %OriginalNamespace
%PackageName %SetModified ConvertParameter Decrypt
DefaultNS DefinedByClose DefinedByExecute DefinedByFetch
DrawUsername Encrypt EncryptBroker EndFmt
EscapeHTML EscapeURL FmtInternal GetGTMBodyCode
GetGTMCode HyperEventBody HyperEventCall HyperEventFrame
HyperEventHead ImplementedByClose ImplementedByExecute ImplementedByFetch
Include InsertHiddenField InsertHiddenFields IsHidden
IsInternal IsObsolete IsPrivate Link
MakeCopyrightDiv OnHTTPHeader OnPage OnPageError
OnPostHTTP OnPostHyperEvent OnPreHTTP OnPreHyperEvent
Page QuoteJS ReferencedByClose ReferencedByExecute
ReferencedByFetch RenderClassPage RenderCode RenderDefaultStorageDef
RenderDescription RenderIndexPage RenderNameSpaceList RenderNameSpacePage
RenderPackageInfo RenderPackagePage RenderSQLStorageDef RenderStorageDef
RenderStoragePage RewriteURL ShowError ShowInternal
StartTimer StopTimer SwapNS ThrowError
UnescapeHTML UnescapeURL zzzText zzzTextHTML
zzzTextJS

Subclasses
%CSP.Documatic.CubeInfo %CSP.Documatic.PrintClass

Parameters

• parameter CSPURL = "/csp/documatic/%CSP.Documatic.cls";
This parameter is used to make sure that if multiple CSP applications are mapped to the same namespace that the CSP engine can correctly identify which class corresponds with which URL. If 'LockCSPName' is true (the default, defined in the CSP application) then you can only access this page if the url exactly matches this 'CSPURL'. You can set this parameter to "" if you wish to disable this check for this class. This check is applied for all CSP urls (cls/csp/zen).
If this page was compiled from a .csp file, then this parameter is automatically set to contain the url of this file used for compilation.
• parameter DEFAULTNS = "%SYS";
• parameter DOMAIN = "%Utility";
Default Localization Domain
• parameter EMPTYNS = "-EMPTY NAMESPACE-";
• parameter URL = "%25CSP.Documatic.cls";

Methods

• private classmethod ClassToLink(name As %String, openhtml As %String = "<", %library As %String = "%SYS") as %String
Convert a classname to an HTML hyperlink.
• private classmethod ClassToUrl(name As %String, %library As %String = "%SYS", anchor As %String = "") as %String
Convert a classname to a URL.
anchor is an anchor within the page. Normalize this name for package support with the current class name.
• private classmethod ConvertClassList(list As %String) as %String
Convert a list of class names (such as a super list) to an HTML string with hyperlinks.
• private classmethod ConvertFormalSpec(spec As %String) as %String
Convert a formal spec to an HTML string with hyperlinks.
• classmethod DefaultNS() as %String
• classmethod DefinedByClose(QHandle As %Binary) as %Status
• classmethod DefinedByExecute(ByRef QHandle As %Binary, type As %String, member As %String) as %Status
• classmethod DefinedByFetch(ByRef QHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status
• classmethod DrawUsername()
Draw username or server name depend on setup.
• classmethod EndFmt(internal As %Integer) as %String
• classmethod FmtInternal(internal As %Integer) as %String
• private classmethod GetClassList(ByRef classlist As %String, local As %Boolean, system As %Boolean)
Build a list of classes and return it via classlist.

If local then show local classes.

If system then show system classes.

• private classmethod GetCurrentStorageDef(cdef As %ClassDefinition) as %StorageDefinition
Returns an OREF to the current storage definition for the given class.
• private classmethod GetDataLocation(sdef As %StorageDefinition) as %String
Find the data location for this storage definition.
• classmethod GetGTMBodyCode(text As %String) as %String
• classmethod GetGTMCode(text As %String) as %String
• classmethod ImplementedByClose(QHandle As %Binary) as %Status
• classmethod ImplementedByExecute(ByRef QHandle As %Binary, type As %String, member As %String) as %Status
• classmethod ImplementedByFetch(ByRef QHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status
• classmethod IsHidden(classname As %String) as %Integer
• classmethod IsInternal(item, desc As %String) as %Integer
• classmethod IsObsolete(classname As %String) as %Integer
• classmethod MakeCopyrightDiv()
• classmethod OnPage() as %Status
Event handler for PAGE event: this is invoked in order to display a csp page. This method is called to render a class document to a browser.
• classmethod OnPreHTTP() as %Boolean
Write out any cookies we want to hold onto.
• private classmethod PackageToUrl(name As %String, %library As %String = "%SYS", anchor As %String = "") as %String
Convert a package name to a URL.
anchor is an anchor within the page.
• classmethod ReferencedByClose(QHandle As %Binary) as %Status
• classmethod ReferencedByExecute(ByRef QHandle As %Binary, refclass As %String) as %Status
• classmethod ReferencedByFetch(ByRef QHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status
• private classmethod RenderBanner(title As %String, %library As %String, class As %String) as %Status
Generate the title banner for the current page.
pageType=0 means "we're displaying normal content", pageType=1 means "this is the Home page", pageType=2 means "this is the SearchPage page", pageType=3 means "this is the Getting Started page" pageType=4 means "this is the Master Index page"
• private classmethod RenderBannerOld(title As %String, %library As %String, class As %String) as %Status
• private classmethod RenderClassInfo(cdef As %ClassDefinition, pFull As %Boolean = 1) as %Status
Generate HTML header for the class cdef.
• classmethod RenderClassPage(cdef As %ClassDefinition, private As %Boolean) as %Status
Generate an HTML page for the class cdef.
• private classmethod RenderClassSummary(pClass As %String) as %Status
Draw HTML for class summary.
• classmethod RenderCode(streamIn As %CharacterStream, lang As %String, streamOut As %AbstractStream)
Color the code in streamIn based on the language lang and return the result in the stream streamOut. If lang is 'NONE' then it will not try and syntax color the example code.
• classmethod RenderDefaultStorageDef(cdef, sdef, ss, lbl) as %Status
• private classmethod RenderDeprecatedBadge(pdef As %AbstractDefinition) as %String
• classmethod RenderDescription(thisclass As %String, desc As %String, starttag As %String, endtag As %String)
Write a description string out as HTML. Apply substitutions for documatic tags.
• private classmethod RenderForeignKeyInfo(idef As %ForeignKeyDefinition, desc As %String) as %Status
Generate HTML for the query qdef.
• private classmethod RenderIndexInfo(idef As %IndexDefinition, desc As %String) as %Status
Generate HTML for the query qdef.
• classmethod RenderIndexPage(%library As %String, expand As %String) as %Status
Renders a %library index page. Set %library to %SYS to show system index.
• private classmethod RenderLabel(label As %String, ByRef id As %Integer) as %Status
Generate a label containing the string label. The id is a unique index for the DHTML elements to work.
• private classmethod RenderLibraryLabel(label As %String) as %Status
Generate a label containing the string label.
• private classmethod RenderMTCData(query As %String)
Use a more primitive mechanism to get the query metadata
• private classmethod RenderMethodInfo(mdef As %MethodDefinition, desc As %String) as %Status
Generate HTML for the method mdef.
• classmethod RenderNameSpaceList() as %Status
Generate HTML table showing available namespaces.
• classmethod RenderNameSpacePage() as %Status
Generate an HTML page show information on the current namespace.
• classmethod RenderPackageInfo(pTitle As %String, packagename As %String = "") as %Status
Generate HTML table showing contents of the given package.
• classmethod RenderPackagePage(packagename As %String) as %Status
Generate an HTML page for the package packagename.
• private classmethod RenderParameterInfo(pdef As %ParameterDefinition, desc As %String) as %Status
Generate HTML for the class parameter pdef.
• private classmethod RenderPrinter()
Display Printer Friendly Version link
• private classmethod RenderPropertyInfo(pdef As %PropertyDefinition, desc As %String) as %Status
Generate HTML for the property pdef.
• private classmethod RenderQueryInfo(qdef As %QueryDefinition, desc As %String) as %Status
Generate HTML for the query qdef.
• classmethod RenderSQLStorageDef(cdef As %ClassDefinition, sdef, ss, lbl) as %Status
Generate an HTML page for the class cdef serial storage definition.

Set issuper true for superclasses of the currently viewed class.

• classmethod RenderStorageDef(cdef As %ClassDefinition, issuper As %Boolean = 0) as %Status
Generate an HTML page for the class cdef serial storage definition.

Set issuper true for superclasses of the currently viewed class.

• classmethod RenderStoragePage(cdef As %ClassDefinition) as %Status
Generate an HTML page for the class cdef storage definition.
• private classmethod RenderTriggerInfo(idef As %TriggerDefinition, desc As %String) as %Status
Generate HTML for the query qdef.
• private classmethod RenderViewQuery(query As %String)
Generate the metadata info for a ViewQuery
• private classmethod RenderZenAppInfo(pClass As %String) as %Status
Draw HTML for Zen Application Information.
• private classmethod RenderZenPageInfo(pClass As %String) as %Status
Draw HTML for Zen Page Information.
• private classmethod RenderZenReportInfo(pClass As %String) as %Status
Draw HTML for Zen Report Information.
• private classmethod SearchForm(%library As %String, class As %String = "")
Renders the search page input form.
• private classmethod SearchResults(%library As %String, search As %String, typestr As %String, member As %String, class As %String)
Renders the search page results form.
• private classmethod SearchResultsDerive(%library As %String, base As %String)
Renders the search page results form for a derived from search.
• private classmethod ServeClassPage() as %Status
Renders the class frame page for the document viewer.
• private classmethod ServeFrameSet() as %Status
Renders the frameset (main) page for the document viewer.
• private classmethod ServeIndexPage() as %Status
Renders the index frame page for the document viewer.
• private classmethod ServeSearchPage() as %Status
Renders the search page for the document viewer.
• private classmethod ServeStoragePage() as %Status
Renders the class frame page for the document viewer.
• private classmethod ServeStyleSheet() as %Status
Renders the style sheet used by the doc viewer.
• classmethod ShowInternal() as %Integer
• classmethod SwapNS(Namespace As %String) as %Boolean
• private classmethod isIE() as %Boolean
Returns true if we are talking to an IE browser.
• private classmethod spaces(num As %Integer) as %String
Return num non breaking spaces ' '
• private classmethod useDHTML() as %Boolean
Returns true if we should use dynamic HTML.
• classmethod zzzText(text As %String) as %String
• classmethod zzzTextHTML(text As %String) as %String
• classmethod zzzTextJS(text As %String) as %String

Queries

• query DefinedBy(type As %String, member As %String)
Selects ClassName As %String
The DefinedBy query returns a list of class names that define member member. type is the type of the class member, e.g., "method".
• query ImplementedBy(type As %String, member As %String)
Selects ClassName As %String
The ImplementedBy query returns a list of class names that implement member member. type is the type of the class member, e.g., "method".
• query ReferencedBy(refclass As %String)
Selects ClassName As %String, Property As %String
The ReferencedBy query returns a list of class names that refer to (has properties of type) refclass.


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