Skip to main content

%Atelier.v1.Utils.General

class %Atelier.v1.Utils.General extends %Library.RegisteredObject

Method Inventory

Methods

classmethod AccessibleNamespaces(Output pList As %String)
This method returns a list of accessible namespaces
classmethod Base64FromStream(pStream As %Stream, Output pEncoded As %Stream) as %Status
Encode a stream as BASE64
classmethod BeginCaptureOutput(Output pCookie As %String) as %Status
This method starts capturing the output from a program
classmethod CalcHash(ByRef pTextArray As %String, Output pHash) as %Status
Given an array of normalized text lines, compute the textual hash value
classmethod Compile(ByRef pItemArray As %String, pFlags As %String, pGetSource As %Boolean = 1, Output pResult As %DynamicObject) as %Status
classmethod CreateDocumentCollection(ByRef pArray) as %Atelier.v1.Utils.LazyCollection
Create a document collection object from an array of document objects
classmethod CreateDocumentObject(Output pDocObject As %DynamicObject, ByRef pDocArray, pName As %String, pDocStatus As %Status, pTimeStamp As %String, pUpToDate As %Boolean) as %Status
Create a document object
classmethod EndCaptureOutput(pCookie As %String, Output pText As %DynamicArray) as %Status
This method retrieves the captured output and delivers it as an array of lines
classmethod ExistsDoc(pDocName As %String, Output pStatus) as %Boolean
ExistsDoc checks that the item named by pDocName exists and returns the appropriate %Boolean value.
classmethod GetCSPAppPath(pName As %String, Output pPath) as %Status
This method returns the path for the named CSP application
classmethod GetCSPToken(pPage As %String, pToken As %String = "") as %String [ SQLProc = General_GetCSPToken ]
Projected as the stored procedure: General_GetCSPToken
For use via the Query API (/:namespace/action/query): Returns a token for use in CSPCHD in a URL May validate and extend an existing token (pToken)
classmethod GetDbForDoc(pDocName As %String, Output pDatabase) as %Status
Given the name of a class, return the database to which it is mapped
classmethod GetDbNameFromDir(pDir As %String) as %String
classmethod GetDbdirCrhash(pDbdir As %String, Output pHash As %String) as %Status
Given the database directory definition, get the creation time hash value
classmethod GetDocCategory(pDocName As %String, Output pCategory As %String) as %Status
Given a document name, return the category. The %Status value is from ValidateDocName().
classmethod GetDocHash(pName As %String, Output pHash As %String, Output pTextArray As %String) as %Status
This method takes a document name and computes a hash value by applying the sha1 hash function to normalized source
classmethod GetMetaDataFromDocArray(ByRef pTextArray As %String, Output pName As %String, Output pKeywords As %String) as %Status
Method GetMetaDataFromDocArray locates a document header, parses it and extracts the meta data. The arguments are:
  • pTextArray - An integer indexed array of source lines
  • pName - Variable by reference to contain item name
  • pKeywords - Array by reference to contain attribute values indexed by keyword strings.
  • pKeywords("$ROUTINEline") - will be filled in with line number if a UDL ROUTINE header is located.

Returns a %Status value.

classmethod GetModifiedDocuments(ByRef pHashes, pType As %String, ByRef pGbl As %String, pShowGenerated As %Boolean = 1) as %Status
Given an array of hashes which represent databases, and using the database mappings for the current namespace, return a list of documents of the requested type which have been modified after the given hash was generated. The list is in the returned process private global.
classmethod GetModifiedDocumentsDB(pDatabase As %String, ByRef pHash As %String, pType As %String, Output pDocs As %String, pShowGenerated As %Boolean = 1) as %Status
Given a database name and a hash value, return a list of documents of the requested type which have been modified after the given hash was generated. The current hash value will be returned in the pHash argument.
classmethod GetNameFromDocArray(ByRef pTextArray, Output pName)
This method parses a document header and extracts the name
classmethod GetRoutineMappings(Output rtndir) as %Status
Get the routine mappings and break them out into lists for each routine type
classmethod Hash(pValue As %String) as %String
Compute a hash value but replace potentially problematic characters
classmethod NamespaceDbList(pNamespace As %String, Output pDB As %String) as %Status
Return list of databases where the routines for a namespace are mapped. It does not include the default database.
classmethod NormalizeDocName(pDocName As %String) as %String
NormalizeDocName adds the default package name to .cls files. It also down cases the DocName type for class and routine types.

The pDocName is assumed to have been validated by ..ValidateDocName().

Returns the normalized DocName as a %String.

classmethod TS(pDocName, ByRef pUpToDate) as %String
Return a normalized timestamp for a document
classmethod ValidLANG(pMode As %String, ByRef pKeywords As %String) as %String
ValidLANG(pMode,pKeyword) checks that a LanguageMode attribute is valid. If the mode is valid then it is inserted into the pKeywords array (passed by reference) and returned as the result of ValidLANG

If the mode is invalid then ValidLANG returns "".

Note: If the pKeywords array contains a conflicting Type value or a conflicting LanguageMode value then the mode attribute is invalid.

classmethod ValidType(pType As %String, ByRef pKeywords As %String) as %String
ValidType(pType,pKeyword) checks that a Type attribute is valid. If the type is valid then it is changed to upper case, inserted into the pKeywords array (passsed by reference) and returned as the result of ValidType

If the type is invalid then ValidType returns "".

Note: If the pKeywords array contains a conflicting Type value or a conflicting LanguageMode value then the Type attribute is invalid.

classmethod ValidateDocName(pDocName As %String, Output pStatus, Output pCategory As %String, Output pBinary As %Boolean) as %Boolean
ValidateDocName tests that a DocName has legal syntax

Returns a %Boolean:

  • 1 - If pDocName has legal DocName syntax
  • 0 - Otherwise

Also returns the Category of the document and a Boolean of whether the document needs to be transmitted as binary or not.

classmethod WrapRtnDocWithXML(pDocumentArray As %String, Output pWrappedDocument As %Stream) as %Status
This method wraps a client document with an XML wrapper which allows it to be imported into Cache
classmethod WriteMsg(ByRef pMsgArray As %String)
Output a message array

Inherited Members

Inherited Methods

FeedbackOpens in a new tab