IRISLIB database
Documatic Class Reference

This class is used internally by InterSystems IRIS. More...

Inheritance diagram for Documatic:
Collaboration diagram for Documatic:

Static Public Member Functions

 DrawUsername ()
 Draw username or server name depend on setup.
 
_.Library.Status OnPage ()
 Event handler for PAGE event: this is invoked in order to
More...
 
_.Library.Boolean OnPreHTTP ()
 Write out any cookies we want to hold onto.
 
_.Library.Status RenderClassPage (_.Library.ClassDefinition cdef, _.Library.Boolean private)
 Generate an HTML page for the class cdef.
 
 RenderCode (_.Library.CharacterStream streamIn, _.Library.String lang, _.Library.AbstractStream streamOut)
 Color the code in <PARAMETER>streamIn</PARAMETER> based on the language <PARAMETER>lang</PARAMETER> More...
 
 RenderDescription (_.Library.String thisclass, _.Library.String desc, _.Library.String starttag, _.Library.String endtag)
 Write a description string out as HTML. More...
 
_.Library.Status RenderIndexPage (_, _.Library.String library, _.Library.String expand)
 Renders a library index page. More...
 
_.Library.Status RenderNameSpaceList ()
 Generate HTML table showing available namespaces.
 
_.Library.Status RenderNameSpacePage ()
 Generate an HTML page show information on the current namespace.
 
_.Library.Status RenderPackageInfo (_.Library.String pTitle, _.Library.String packagename)
 Generate HTML table showing contents of the given package.
 
_.Library.Status RenderPackagePage (_.Library.String packagename)
 Generate an HTML page for the package <PARAMETER>packagename</PARAMETER>.
 
_.Library.Status RenderSQLStorageDef (_.Library.ClassDefinition cdef, sdef, ss, lbl)
 Generate an HTML page for the class cdef serial storage definition. More...
 
_.Library.Status RenderStorageDef (_.Library.ClassDefinition cdef, _.Library.Boolean issuper)
 Generate an HTML page for the class cdef serial storage definition. More...
 
_.Library.Status RenderStoragePage (_.Library.ClassDefinition cdef)
 Generate an HTML page for the class <PARAMETER>cdef</PARAMETER> storage definition.
 
- Static Public Member Functions inherited from Page
_.Library.Status ConvertParameter (_.Library.String url, _.Library.String name, _.Library.String value)
 You pass this the <parameter>url</parameter> of the page you are going to and a. More...
 
_.Library.Binary Decrypt (_.Library.String data)
 Decrypts the input string using the session.Key value that is unique to. More...
 
_.Library.String Encrypt (_.Library.Binary data)
 Encrypts the input string using the session.Key value that is unique to this. More...
 
_.Library.String EscapeHTML (in)
 This method converts input HTML text into Escaped HTML text.
 
_.Library.String EscapeURL (_.Library.String in, _.Library.String charset)
 This method converts the in input URL string into Escaped URL string. More...
 
_.Library.String HyperEventCall (_.Library.String methodName, _.Library.String args, _.Library.Integer type, _.Library.Boolean mobile)
 This method returns the string that needs to be written to the current. More...
 
_.Library.String HyperEventHead (_.Library.Boolean iframeOnly, _.Library.Boolean strict, _.Library.Boolean optionalBroker)
 This method returns the string that needs to be written to the current. More...
 
 Include (_.Library.String url)
 Include another csp page or file in the output at this point. More...
 
_.Library.String InsertHiddenField (_.Library.String url, _.Library.String name, _.Library.String value, _.Library.String extra)
 Inserts a '<input type="hidden" name="Name" value="Value">' tag into the current document. More...
 
_.Library.String InsertHiddenFields (_.Library.String url, _.Library.String query)
 Return the string containing the hidden form tags. More...
 
_.Library.Boolean IsPrivate ()
 Returns 1 if this page is in fact a private page (see <parameter>PRIVATE</parameter>).
 
_.Library.String Link (_.Library.String link, _.Library.String query, _.Library.Boolean addQ)
 Tranforms the link specified by link into a URL and returns it as a string. More...
 
_.Library.Status OnHTTPHeader (_.Library.Boolean OutputBody)
 Event handler for PAGE event: this is invoked in order to
More...
 
 OnPageError (_.Library.Status sc)
 Event handler for any error that occurs on the page. More...
 
 OnPostHTTP ()
 Event handler for POSTPAGE event: this is invoked after the data. More...
 
_.Library.Status OnPostHyperEvent (_.Library.String class, _.Library.String method)
 Event handler which is invoked after a hyperevent method is called on this page.
 
_.Library.Status OnPreHyperEvent (_.Library.String class, _.Library.String method)
 Event handler which is invoked before a hyperevent method is called on this page. More...
 
_.Library.Status Page (_.Library.Boolean skipheader)
 Process a request to serve a CSPPage. More...
 
_.Library.String QuoteJS (in)
 This method converts input string into quoted JavaScript literal.
 
_.Library.String RewriteURL (_.Library.String url)
 This method will rewrite a URL to use #url()# if needed.
 
 ShowError (_.Library.Status sc)
 Display a <class>Status</class> error code to the CSP Page.
 
 StartTimer (_.Library.String name)
 Used to get performance information on your CSP pages. More...
 
 StopTimer (_.Library.String name)
 Used to time performance information on your CSP pages. More...
 
 ThrowError (_.Library.Status sc)
 Passed a <class>Status</class> code this goes to the error page passing this status code.
 
_.Library.String UnescapeHTML (in)
 This method converts Escaped HTML text into normal HTML text.
 
_.Library.String UnescapeURL (_.Library.String in, _.Library.String charset)
 This method converts the in Escaped URL string back to its original form. More...
 

Static Public Attributes

 CSPURL = None
 This class is used internally by InterSystems IRIS. More...
 
 DOMAIN = None
 Default Localization Domain.
 
- Static Public Attributes inherited from Page
 CHARSET = None
 The <CLASS>CSP.Page</CLASS> object serves as an event handler for CSP requests. More...
 
 CONTENTTYPE = None
 Specifies the default content type for the page. More...
 
 CONVERTINPUTSTREAM = None
 Specifies if input request.Content or request.MimeData values are converted from their. More...
 
 CSPFILE = None
 If this page was compiled from a .csp file, then this parameter contains the. More...
 
 CSPSTRICT = None
 The CSPSTRICT parameter is set to 1, if the DOCTYPE indicates that this. More...
 
 CSPURL = None
 This parameter is used to make sure that if multiple. More...
 
 CSPXHTML = None
 The CSPXHTML parameter is set to 1, if the DOCTYPE indicates that this. More...
 
 DOMAIN = None
 The default domain for csp:text, span and div tags. More...
 
 ENCODED = None
 Controls how the query parameters for this page are passed, it can. More...
 
 ERRORPAGE = None
 Specify a custom error page to call if there are any problems with generating this page. More...
 
 EXPIRES = None
 Specified the default value for the response.Expires. More...
 
 NOCHARSETCONVERT = None
 Specifies if we wish to turn off charset conversion for this page. More...
 
 PAGETIMING = None
 If this parameter is true then we automatically record timing statistics of how long it takes to. More...
 
 PRIVATE = None
 Controls the access to the page, it can be set to one of the following:
More...
 
 SECURITYRESOURCE = None
 This is a comma-delimited list of system Resources and associated. More...
 
 TIMINGSLOTS = None
 Used by the timing to decide how many slots a day should be divided up into. More...
 
 UseSession = None
 This parameter controls the CSP session support. More...
 

Static Private Member Functions

_.Library.String __ClassToLink (_.Library.String name, _.Library.String openhtml, _, _.Library.String library)
 Convert a classname to an HTML hyperlink.
 
_.Library.String __ClassToUrl (_.Library.String name, _, _.Library.String library, _.Library.String anchor)
 Convert a classname to a URL. More...
 
_.Library.String __ConvertClassList (_.Library.String list)
 Convert a list of class names (such as a super list) to an HTML string with hyperlinks.
 
_.Library.String __ConvertFormalSpec (_.Library.String spec)
 Convert a formal spec to an HTML string with hyperlinks.
 
 __GetClassList (_.Library.String classlist, _.Library.Boolean local, _.Library.Boolean system)
 Build a list of classes and return it via classlist. More...
 
_.Library.StorageDefinition __GetCurrentStorageDef (_.Library.ClassDefinition cdef)
 Returns an OREF to the current storage definition for the given class.
 
_.Library.String __GetDataLocation (_.Library.StorageDefinition sdef)
 Find the data location for this storage definition.
 
_.Library.String __PackageToUrl (_.Library.String name, _, _.Library.String library, _.Library.String anchor)
 Convert a package name to a URL. More...
 
_.Library.Status __RenderBanner (_.Library.String title, _, _.Library.String library, _.Library.String class)
 Generate the title banner for the current page. More...
 
_.Library.Status __RenderClassInfo (_.Library.ClassDefinition cdef, _.Library.Boolean pFull)
 Generate HTML header for the class <PARAMETER>cdef</PARAMETER>.
 
_.Library.Status __RenderClassSummary (_.Library.String pClass)
 Draw HTML for class summary.
 
_.Library.Status __RenderForeignKeyInfo (_.Library.ForeignKeyDefinition idef, _.Library.String desc)
 Generate HTML for the query <PARAMETER>qdef</PARAMETER>.
 
_.Library.Status __RenderIndexInfo (_.Library.IndexDefinition idef, _.Library.String desc)
 Generate HTML for the query <PARAMETER>qdef</PARAMETER>.
 
_.Library.Status __RenderLabel (_.Library.String label, _.Library.Integer id)
 Generate a label containing the string <PARAMETER>label</PARAMETER>. More...
 
_.Library.Status __RenderLibraryLabel (_.Library.String label)
 Generate a label containing the string <PARAMETER>label</PARAMETER>.
 
 __RenderMTCData (_.Library.String query)
 Use a more primitive mechanism to get the query metadata.
 
_.Library.Status __RenderMethodInfo (_.Library.MethodDefinition mdef, _.Library.String desc)
 Generate HTML for the method <PARAMETER>mdef</PARAMETER>.
 
_.Library.Status __RenderParameterInfo (_.Library.ParameterDefinition pdef, _.Library.String desc)
 Generate HTML for the class parameter <PARAMETER>pdef</PARAMETER>.
 
 __RenderPrinter ()
 Display Printer Friendly Version link.
 
_.Library.Status __RenderPropertyInfo (_.Library.PropertyDefinition pdef, _.Library.String desc)
 Generate HTML for the property <PARAMETER>pdef</PARAMETER>.
 
_.Library.Status __RenderQueryInfo (_.Library.QueryDefinition qdef, _.Library.String desc)
 Generate HTML for the query <PARAMETER>qdef</PARAMETER>.
 
_.Library.Status __RenderTriggerInfo (_.Library.TriggerDefinition idef, _.Library.String desc)
 Generate HTML for the query <PARAMETER>qdef</PARAMETER>.
 
 __RenderViewQuery (_.Library.String query)
 Generate the metadata info for a ViewQuery.
 
_.Library.Status __RenderZenAppInfo (_.Library.String pClass)
 Draw HTML for Zen Application Information.
 
_.Library.Status __RenderZenPageInfo (_.Library.String pClass)
 Draw HTML for Zen Page Information.
 
_.Library.Status __RenderZenReportInfo (_.Library.String pClass)
 Draw HTML for Zen Report Information.
 
 __SearchForm (_, _.Library.String library, _.Library.String class)
 Renders the search page input form.
 
 __SearchResults (_, _.Library.String library, _.Library.String search, _.Library.String typestr, _.Library.String member, _.Library.String class)
 Renders the search page results form.
 
 __SearchResultsDerive (_, _.Library.String library, _.Library.String base)
 Renders the search page results form for a derived from search.
 
_.Library.Status __ServeClassPage ()
 Renders the class frame page for the document viewer.
 
_.Library.Status __ServeFrameSet ()
 Renders the frameset (main) page for the document viewer.
 
_.Library.Status __ServeIndexPage ()
 Renders the index frame page for the document viewer.
 
_.Library.Status __ServeSearchPage ()
 Renders the search page for the document viewer.
 
_.Library.Status __ServeStoragePage ()
 Renders the class frame page for the document viewer.
 
_.Library.Status __ServeStyleSheet ()
 Renders the style sheet used by the doc viewer.
 
_.Library.Boolean __isIE ()
 Returns true if we are talking to an IE browser.
 
_.Library.String __spaces (_.Library.Integer num)
 Return <PARAMETER>num</PARAMETER> non breaking spaces '&nbsp'.
 
_.Library.Boolean __useDHTML ()
 Returns true if we should use dynamic HTML.
 

Detailed Description

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:

  • <CLASS>Classname</CLASS> This produces a link that when clicked on will take you to the documentation for the class named 'Classname'.
  • <METHOD>Method</METHOD> Produces a link that will take you to the method called 'Method' in the current class.
  • <PROPERTY>Property</PROPERTY> Produces a link that will take you to the documentation for property 'Property' in the current class.
  • <QUERY>Query</QUERY> Produces a link that will take you to the documentation for the query 'Query' in the current class.
  • <PARAMETER>Parameter</PARAMETER> produces a link to the given parameter in the current class.
  • <EXAMPLE>Set A="Test</EXAMPLE> formats the enclosed text as a formatted code example, which will include syntax colorizing if possible (using <CLASS>Library.SyntaxColor</CLASS>).

    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 <CLASS>Library.SyntaxColor</CLASS>:

    set colorizer=##class(Library.SyntaxColor).New() set status=colorizer.Languages(.langlist) zw langlist

To suppress syntax colorizing, use <EXAMPLE LANGUAGE=NONE>.

NOTE: You can include the other special tags inside <EXAMPLE>, but other HTML tags are ignored in this context.

Member Function Documentation

◆ __ClassToUrl()

_.Library.String __ClassToUrl ( _.Library.String  name,
  _,
_.Library.String  library,
_.Library.String  anchor 
)
staticprivate

Convert a classname to a URL.


anchor is an anchor within the page. Normalize this name for package support with the current class name.

◆ __GetClassList()

__GetClassList ( _.Library.String  classlist,
_.Library.Boolean  local,
_.Library.Boolean  system 
)
staticprivate

Build a list of classes and return it via classlist.

If local then show local classes.

If system then show system classes.

◆ OnPage()

_.Library.Status OnPage ( )
static

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.

Reimplemented from Page.

Reimplemented in PrintClass.

◆ __PackageToUrl()

_.Library.String __PackageToUrl ( _.Library.String  name,
  _,
_.Library.String  library,
_.Library.String  anchor 
)
staticprivate

Convert a package name to a URL.


anchor is an anchor within the page.

◆ __RenderBanner()

_.Library.Status __RenderBanner ( _.Library.String  title,
  _,
_.Library.String  library,
_.Library.String  class 
)
staticprivate

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"

Reimplemented in PrintClass.

◆ RenderCode()

RenderCode ( _.Library.CharacterStream  streamIn,
_.Library.String  lang,
_.Library.AbstractStream  streamOut 
)
static

Color the code in <PARAMETER>streamIn</PARAMETER> based on the language <PARAMETER>lang</PARAMETER>

and return the result in the stream <PARAMETER>streamOut</PARAMETER>. If <PARAMETER>lang</PARAMETER> is 'NONE' then it will not try and syntax color the example code.

◆ RenderDescription()

RenderDescription ( _.Library.String  thisclass,
_.Library.String  desc,
_.Library.String  starttag,
_.Library.String  endtag 
)
static

Write a description string out as HTML.

Apply substitutions for

documatic tags.

Reimplemented in CubeInfo.

◆ RenderIndexPage()

_.Library.Status RenderIndexPage (   _,
_.Library.String  library,
_.Library.String  expand 
)
static

Renders a library index page.

Set library to SYS to

show system index.

◆ __RenderLabel()

_.Library.Status __RenderLabel ( _.Library.String  label,
_.Library.Integer  id 
)
staticprivate

Generate a label containing the string <PARAMETER>label</PARAMETER>.

The <PARAMETER>id</PARAMETER>

is a unique index for the DHTML elements to work.

◆ RenderSQLStorageDef()

_.Library.Status RenderSQLStorageDef ( _.Library.ClassDefinition  cdef,
  sdef,
  ss,
  lbl 
)
static

Generate an HTML page for the class cdef serial storage definition.

Set issuper true for superclasses of the currently viewed class.

◆ RenderStorageDef()

_.Library.Status RenderStorageDef ( _.Library.ClassDefinition  cdef,
_.Library.Boolean  issuper 
)
static

Generate an HTML page for the class cdef serial storage definition.

Set issuper true for superclasses of the currently viewed class.

Member Data Documentation

◆ CSPURL

CSPURL = None
static

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:

  • <CLASS>Classname</CLASS> This produces a link that when clicked on will take you to the documentation for the class named 'Classname'.
  • <METHOD>Method</METHOD> Produces a link that will take you to the method called 'Method' in the current class.
  • <PROPERTY>Property</PROPERTY> Produces a link that will take you to the documentation for property 'Property' in the current class.
  • <QUERY>Query</QUERY> Produces a link that will take you to the documentation for the query 'Query' in the current class.
  • <PARAMETER>Parameter</PARAMETER> produces a link to the given parameter in the current class.
  • <EXAMPLE>Set A="Test</EXAMPLE> formats the enclosed text as a formatted code example, which will include syntax colorizing if possible (using <CLASS>Library.SyntaxColor</CLASS>).

    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 <CLASS>Library.SyntaxColor</CLASS>:

    set colorizer=##class(Library.SyntaxColor).New() set status=colorizer.Languages(.langlist) zw langlist

To suppress syntax colorizing, use <EXAMPLE LANGUAGE=NONE>.

NOTE: You can include the other special tags inside <EXAMPLE>, but other HTML tags are ignored in this context.