%CSP.Documatic
Class %CSP.Documatic Extends %CSP.Page [ System = 3 ]
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:
Classname This produces a link that when clicked on will take you to the documentation for the class named 'Classname'.Method Produces a link that will take you to the method called 'Method' in the current class.Property Produces a link that will take you to the documentation for property 'Property' in the current class.Query Produces a link that will take you to the documentation for the query 'Query' in the current class.Parameter produces a link to the given parameter in the current class.Set A="Test formats the enclosed text as a formatted code example, which will include syntax colorizing if possible (using %Library.SyntaxColor).
By default, the syntax colorizer treats the example as ObjectScript. To specify another language, include the LANGUAGE attribute. Other languages include SQL, JAVA, and XML. To list the languages currently supported, call the Languages() instance method of %Library.SyntaxColor:
set colorizer=##class(%Library.SyntaxColor).%New() set status=colorizer.Languages(.langlist) zw langlist
To suppress syntax colorizing, use.
NOTE: You can include the other special tags inside, but other HTML tags are ignored in this context.
Parameters
CSPURL
Parameter CSPURL = "/csp/documatic/%CSP.Documatic.cls";
DEFAULTNS
Parameter DEFAULTNS = "%SYS";
EMPTYNS
Parameter EMPTYNS = "-EMPTY NAMESPACE-";
URL
Parameter URL = "%25CSP.Documatic.cls";
DOMAIN
Parameter DOMAIN = "%Utility";
Default Localization Domain
Methods
zzzText
ClassMethod zzzText(text As %String) As %String [ Internal ]
zzzTextHTML
ClassMethod zzzTextHTML(text As %String) As %String [ Internal ]
zzzTextJS
ClassMethod zzzTextJS(text As %String) As %String [ Internal ]
isIE
ClassMethod isIE() As %Boolean [ CodeMode = expression, Private ]
Returns true if we are talking to an IE browser.
useDHTML
ClassMethod useDHTML() As %Boolean [ Private ]
Returns true if we should use dynamic HTML.
ShowInternal
ClassMethod ShowInternal() As %Integer [ Internal ]
IsInternal
ClassMethod IsInternal(item, desc As %String) As %Integer [ Internal ]
IsHidden
ClassMethod IsHidden(classname As %String) As %Integer [ Internal ]
IsObsolete
ClassMethod IsObsolete(classname As %String) As %Integer [ Internal ]
FmtInternal
ClassMethod FmtInternal(internal As %Integer) As %String [ Internal ]
EndFmt
ClassMethod EndFmt(internal As %Integer) As %String [ Internal ]
DefaultNS
ClassMethod DefaultNS() As %String
SwapNS
ClassMethod SwapNS(Namespace As %String) As %Boolean
ServeStyleSheet
ClassMethod ServeStyleSheet() As %Status [ Private ]
Renders the style sheet used by the doc viewer.
OnPage
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.
OnPreHTTP
ClassMethod OnPreHTTP() As %Boolean
Write out any cookies we want to hold onto.
ServeFrameSet
ClassMethod ServeFrameSet() As %Status [ Private ]
Renders the frameset (main) page for the document viewer.
ServeIndexPage
ClassMethod ServeIndexPage() As %Status [ Private ]
Renders the index frame page for the document viewer.
ServeClassPage
ClassMethod ServeClassPage() As %Status [ Private ]
Renders the class frame page for the document viewer.
CheckSession
ClassMethod CheckSession()
ServeStoragePage
ClassMethod ServeStoragePage() As %Status [ Private ]
Renders the class frame page for the document viewer.
ServeSearchPage
ClassMethod ServeSearchPage() As %Status [ Private ]
Renders the search page for the document viewer.
SearchForm
ClassMethod SearchForm(%library As %String, class As %String = "") [ Private ]
Renders the search page input form.
SearchResults
ClassMethod SearchResults(%library As %String, search As %String, typestr As %String, member As %String, class As %String) [ Private ]
Renders the search page results form.
SearchResultsDerive
ClassMethod SearchResultsDerive(%library As %String, base As %String) [ Private ]
Renders the search page results form for a derived from search.
RenderIndexPage
ClassMethod RenderIndexPage(%library As %String, expand As %String) As %Status
Renders a %library index page. Set %library to %SYS to show system index.
GetClassList
ClassMethod GetClassList(ByRef classlist As %String, local As %Boolean, system As %Boolean) [ Private ]
Build a list of classes and return it via classlist.
If local then show local classes.
If system then show system classes.
RenderClassPage
ClassMethod RenderClassPage(cdef As %ClassDefinition, private As %Boolean) As %Status
Generate an HTML page for the class cdef.
RenderNameSpacePage
ClassMethod RenderNameSpacePage() As %Status
Generate an HTML page show information on the current namespace.
RenderPackagePage
ClassMethod RenderPackagePage(packagename As %String) As %Status
Generate an HTML page for the package packagename.
RenderPackageInfo
ClassMethod RenderPackageInfo(pTitle As %String, packagename As %String = "") As %Status
Generate HTML table showing contents of the given package.
RenderNameSpaceList
ClassMethod RenderNameSpaceList() As %Status
Generate HTML table showing available namespaces.
RenderStoragePage
ClassMethod RenderStoragePage(cdef As %ClassDefinition) As %Status
Generate an HTML page for the class cdef storage definition.
GetCurrentStorageDef
ClassMethod GetCurrentStorageDef(cdef As %ClassDefinition) As %StorageDefinition [ Private ]
Returns an OREF to the current storage definition for the given class.
RenderStorageDef
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.
RenderDefaultStorageDef
ClassMethod RenderDefaultStorageDef(cdef, sdef, ss, lbl) As %Status
RenderSQLStorageDef
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.
GetDataLocation
ClassMethod GetDataLocation(sdef As %StorageDefinition) As %String [ Private ]
Find the data location for this storage definition.
RenderBanner
ClassMethod RenderBanner(title As %String, %library As %String, class As %String) As %Status [ Private ]
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"
MakeCopyrightDiv
ClassMethod MakeCopyrightDiv() [ Internal ]
RenderBannerOld
ClassMethod RenderBannerOld(title As %String, %library As %String, class As %String) As %Status [ Private ]
RenderPrinter
ClassMethod RenderPrinter() [ Private ]
Display Printer Friendly Version link
DrawUsername
ClassMethod DrawUsername()
Draw username or server name depend on setup.
RenderLabel
ClassMethod RenderLabel(label As %String, ByRef id As %Integer) As %Status [ Private ]
Generate a label containing the string label. The id is a unique index for the DHTML elements to work.
RenderLibraryLabel
ClassMethod RenderLibraryLabel(label As %String) As %Status [ Private ]
Generate a label containing the string label.
RenderClassInfo
ClassMethod RenderClassInfo(cdef As %ClassDefinition, pFull As %Boolean = 1) As %Status [ Private ]
Generate HTML header for the class cdef.
RenderViewQuery
ClassMethod RenderViewQuery(query As %String) [ Private ]
Generate the metadata info for a ViewQuery
RenderMTCData
ClassMethod RenderMTCData(query As %String) [ Private, ProcedureBlock = 0 ]
Use a more primitive mechanism to get the query metadata
RenderMethodInfo
ClassMethod RenderMethodInfo(mdef As %MethodDefinition, desc As %String) As %Status [ Private ]
Generate HTML for the method mdef.
RenderParameterInfo
ClassMethod RenderParameterInfo(pdef As %ParameterDefinition, desc As %String) As %Status [ Private ]
Generate HTML for the class parameter pdef.
RenderPropertyInfo
ClassMethod RenderPropertyInfo(pdef As %PropertyDefinition, desc As %String) As %Status [ Private ]
Generate HTML for the property pdef.
RenderQueryInfo
ClassMethod RenderQueryInfo(qdef As %QueryDefinition, desc As %String) As %Status [ Private ]
Generate HTML for the query qdef.
RenderIndexInfo
ClassMethod RenderIndexInfo(idef As %IndexDefinition, desc As %String) As %Status [ Private ]
Generate HTML for the query qdef.
RenderForeignKeyInfo
ClassMethod RenderForeignKeyInfo(idef As %ForeignKeyDefinition, desc As %String) As %Status [ Private ]
Generate HTML for the query qdef.
RenderTriggerInfo
ClassMethod RenderTriggerInfo(idef As %TriggerDefinition, desc As %String) As %Status [ Private ]
Generate HTML for the query qdef.
ConvertClassList
ClassMethod ConvertClassList(list As %String) As %String [ Private ]
Convert a list of class names (such as a super list) to an HTML string with hyperlinks.
ConvertFormalSpec
ClassMethod ConvertFormalSpec(spec As %String) As %String [ Private ]
Convert a formal spec to an HTML string with hyperlinks.
ClassToUrl
ClassMethod ClassToUrl(name As %String, %library As %String = "%SYS", anchor As %String = "") As %String [ Private ]
Convert a classname to a URL.
anchor is an anchor within the page. Normalize this name for package support with the current class name.
PackageToUrl
ClassMethod PackageToUrl(name As %String, %library As %String = "%SYS", anchor As %String = "") As %String [ CodeMode = expression, Private ]
Convert a package name to a URL.
anchor is an anchor within the page.
spaces
ClassMethod spaces(num As %Integer) As %String [ Private ]
Return num non breaking spaces ' '
ClassToLink
ClassMethod ClassToLink(name As %String, openhtml As %String = "<", %library As %String = "%SYS") As %String [ CodeMode = expression, Private ]
Convert a classname to an HTML hyperlink.
RenderDescription
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.
RenderCode
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.
DefinedByExecute
ClassMethod DefinedByExecute(ByRef QHandle As %Binary, type As %String, member As %String) As %Status
The DefinedBy query returns a list of class names that define member member. type is the type of the class member, e.g., "method".
DefinedByClose
ClassMethod DefinedByClose(QHandle As %Binary) As %Status
DefinedByFetch
ClassMethod DefinedByFetch(ByRef QHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status
ImplementedByExecute
ClassMethod ImplementedByExecute(ByRef QHandle As %Binary, type As %String, member As %String) As %Status
The ImplementedBy query returns a list of class names that implement member member. type is the type of the class member, e.g., "method".
ImplementedByClose
ClassMethod ImplementedByClose(QHandle As %Binary) As %Status
ImplementedByFetch
ClassMethod ImplementedByFetch(ByRef QHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status
ReferencedByExecute
ClassMethod ReferencedByExecute(ByRef QHandle As %Binary, refclass As %String) As %Status
The ReferencedBy query returns a list of class names that refer to (has properties of type) refclass.
ReferencedByClose
ClassMethod ReferencedByClose(QHandle As %Binary) As %Status
ReferencedByFetch
ClassMethod ReferencedByFetch(ByRef QHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status
RenderClassSummary
ClassMethod RenderClassSummary(pClass As %String) As %Status [ Private ]
Draw HTML for class summary.
RenderZenReportInfo
ClassMethod RenderZenReportInfo(pClass As %String) As %Status [ Private ]
Draw HTML for Zen Report Information.
RenderZenPageInfo
ClassMethod RenderZenPageInfo(pClass As %String) As %Status [ Private ]
Draw HTML for Zen Page Information.
RenderZenAppInfo
ClassMethod RenderZenAppInfo(pClass As %String) As %Status [ Private ]
Draw HTML for Zen Application Information.
RenderDeprecatedBadge
ClassMethod RenderDeprecatedBadge(pdef As %AbstractDefinition) As %String [ Private ]