Home > Class Reference > %SYS namespace > %Atelier.v1.Utils.General

%Atelier.v1.Utils.General

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

Method Inventory (Including Private)

Methods (Including Private)

classmethod AccessibleNamespaces(Output pList As %String) [ Language = objectscript ]
This method returns a list of accessible namespaces
classmethod Base64FromStream(pStream As %Stream, Output pEncoded As %Stream) as %Status [ Language = objectscript ]
Encode a stream as BASE64
classmethod BeginCaptureOutput(Output pCookie As %String) as %Status [ Language = objectscript ]
This method starts capturing the output from a program
classmethod CalcHash(ByRef pTextArray As %String, Output pHash) as %Status [ Language = objectscript ]
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 [ Language = objectscript ]
classmethod CreateDocumentCollection(ByRef pArray) as %Atelier.v1.Utils.LazyCollection [ Language = objectscript ]
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 [ Language = objectscript ]
Create a document object
classmethod EndCaptureOutput(pCookie As %String, Output pText As %DynamicArray) as %Status [ Language = objectscript ]
This method retrieves the captured output and delivers it as an array of lines
classmethod ExistsDoc(pDocName As %String, Output pStatus) as %Boolean [ Language = objectscript ]
ExistsDoc checks that the item named by pDocName exists and returns the appropriate %Boolean value.
classmethod GetCSPAppPath(pName As %String, Output pPath) as %Status [ Language = objectscript ]
This method returns the path for the named CSP application
classmethod GetCSPToken(pPage As %String, pToken As %String = "") as %String [ Language = objectscript, SQLProc = 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 [ Language = objectscript ]
Given the name of a class, return the database to which it is mapped
classmethod GetDbNameFromDir(pDir As %String) as %String [ Language = objectscript ]
classmethod GetDbdirCrhash(pDbdir As %String, Output pHash As %String) as %Status [ Language = objectscript ]
Given the database directory definition, get the creation time hash value
classmethod GetDocCategory(pDocName As %String, Output pCategory As %String) as %Status [ Language = objectscript ]
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 [ Language = objectscript ]
This method takes a document name and computes a hash value by applying the sha1 hash function to normalized source
private classmethod GetModifiedClassesIndex(ByRef dirlist, dbdir As %String, dbname As %String, pShowGenerated As %Boolean, hashIn As %String, ByRef hashOut As %String) as %Status [ Language = objectscript ]
classmethod GetModifiedDocuments(ByRef pHashes, pType As %String, ByRef pGbl As %String, pShowGenerated As %Boolean = 1) as %Status [ Language = objectscript ]
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 [ Language = objectscript ]
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.
private classmethod GetModifiedRoutinesIndex(pType As %String, ByRef dirlist, dbdir As %String, dbname As %String, pShowGenerated As %Boolean, hashIn As %String, ByRef hashOut As %String) as %Status [ Language = objectscript ]
classmethod GetNameFromDocArray(ByRef pTextArray, Output pName) [ Language = objectscript ]
This method parses a document header and extracts the name
classmethod GetRoutineMappings(Output rtndir) as %Status [ Language = objectscript ]
Get the routine mappings and break them out into lists for each routine type
classmethod Hash(pValue As %String) as %String [ Language = objectscript ]
Compute a hash value but replace potentially problematic characters
classmethod NamespaceDbList(pNamespace As %String, Output pDB As %String) as %Status [ Language = objectscript ]
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 [ Language = objectscript ]
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 [ Language = objectscript ]
Return a normalized timestamp for a document
classmethod ValidLANG(pMode As %String, ByRef pKeywords As %String) as %String [ Language = objectscript ]
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 [ Language = objectscript ]
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 [ Language = objectscript ]
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 [ Language = objectscript ]
This method wraps a client document with an XML wrapper which allows it to be imported into InterSystems IRIS
classmethod WriteMsg(ByRef pMsgArray As %String) [ Language = objectscript ]
Output a message array

Inherited Members

Inherited Methods (Including Private)

Feedback