Skip to main content

%DeepSee.UserLibrary.Utils

Class %DeepSee.UserLibrary.Utils Extends %RegisteredObject [ Abstract, System = 4 ]

This class contains API method for the DeepSee User Component library.

Methods

%KillFolders

ClassMethod %KillFolders() As %Status

Deletes all folders and folder items in the current namespace.

%KillAutosaveFolders

ClassMethod %KillAutosaveFolders(pFolder As %String = "$Temp") As %Status

%KillUserPreferences

ClassMethod %KillUserPreferences() As %Status

Deletes all user preference info in the current namespace.

%RegisterRecentItem

ClassMethod %RegisterRecentItem(pType As %String, pName As %String) As %Status

Make note that the given item was accessed recently.

%GetRecentItemList

ClassMethod %GetRecentItemList(Output pList As %String, pType As %String = "") As %Status

Get list of recent items for user. This takes the form:
pList(time) = name
If pType is missing, list all types. pType can contain a csv list of types.

%RemoveRecentItem

ClassMethod %RemoveRecentItem(pName As %String) As %Status

Remove item from recent items list.

%AddFavorite

ClassMethod %AddFavorite(pName As %String) As %Status

Add item to favorites list.

%RemoveFavorite

ClassMethod %RemoveFavorite(pName As %String) As %Status

Remove item from favorites list.

%GetFavoriteList

ClassMethod %GetFavoriteList(Output pList As %String) As %Status

Get list of favorite items for user. This takes the form:
pList(name) = time

%OpenFolderItem

ClassMethod %OpenFolderItem(pFullName As %String, Output pStatus As %Status) As FolderItem

Open the folder item with the given full name.

%FolderItemExists

ClassMethod %FolderItemExists(pFullName As %String, Output pID As %String) As %Integer

Check if a there is a folder item with the given name.
Returns 0 if the item does not exist; returns 1 if it exists and is visible to the current user; returns 2 if it exists but is not visible to the current user; returns 3 if the pivot is locked.
Return its id by reference as a convenience.

%DeleteFolderContents

ClassMethod %DeleteFolderContents(pFolderName As %String) As %Status

Delete all the items within the given folder.

%DeleteFolderItem

ClassMethod %DeleteFolderItem(pFullName As %String, Output pCount As %Integer) As %Status

Delete the folder item with the given full name. pCount returns the number of items actually deleted.

%GetXMLNamesForClasses

ClassMethod %GetXMLNamesForClasses(Output pList, Output pNonFolderItem) As %Status

%GetFolderItemClasses

ClassMethod %GetFolderItemClasses(Output pList) As %Status

Return a list of all folder item classes.
pList(n) = $LB(classname,xmlname)

%GetFolderList

ClassMethod %GetFolderList(Output pList As %String, pFolderName As %String = "") As %Status

Return an array of all folders visible to the current user within the given folder. This list is in the form:
pList(n) = name

%GetCategoryList

ClassMethod %GetCategoryList(Output pList) As %Status

Return an array of all categories that have been assigned to Folder Items. This list is in the form:
pList(n) = category

%GetSubFolderList

ClassMethod %GetSubFolderList(Output pList As %String, pFolderName As %String = "") As %Status

%GetFolderItemList

ClassMethod %GetFolderItemList(Output pList As %String, pFolderName As %String = "", pShowAll As %Boolean = 0, pFolderClass As %String = "") As %Status [ PublicList = SQLCODE ]

Return an array of all folder items visible to the current user within the given folder. This list is in the form:
pList(n) = id
If pShowAll is true, list items for all users.
If pFolderClass is provided, only list items of the given type.

%FindFolder

ClassMethod %FindFolder(pName As %String, pCreate As %Boolean = 0, Output pSC As %Status, pParent As Folder = "") As Folder

Find the folder with the given full name. If pCreate is true, then create the folder if it does not exist.

%ExportContainer

ClassMethod %ExportContainer(ByRef pItemList As %String, pFileName As %String, pContainerClassName As %String = "", pVerbose As %Boolean = 1) As %Status

Export the items in the list to a container

%Export

ClassMethod %Export(pFullName As %String, pFile As %String = "", pVerbose As %Boolean = 1, Output pXMLName As %String) As %Status

Export FolderItem or Folder information to an XML file.

%Import

ClassMethod %Import(pFile As %String = "", pReplace As %Boolean = 0, pVerbose As %Boolean = 1, pKill As %Boolean = 0, pForceItemName As %String = "", ByRef pItemsLoaded As %String) As %Status

Import a folder item definition from an XML file.
If pReplace is true, replace an existing item with the same name.
If pVerbose is true, write status to the console.
If pKill is true, then delete all existing items before import!
If pForceItemName is given, import the item using that name.
If type-extension is not present in pForceItemName supply it automatically

%ImportContainer

ClassMethod %ImportContainer(pFileName As %String = "", pReplace As %Boolean = 1, pVerbose As %Boolean = 1) As %Status

This method may be called to import a container class from an xml file. This will execute the %OnLoad method if it is defined in the container class.
The pReplace parameter is deprecated in this method but remains for compatibility purposes.

%ProcessContainer

ClassMethod %ProcessContainer(pClass As %String = "", pReplace As %Boolean = 0, pVerbose As %Boolean = 1, pSuppressForCaller As %Boolean = 0) As %Status

Import a folder item definition from the Contents XData block of the given class.
If pReplace is true, replace an existing item with the same name.
If pVerbose is true, write status to the console.

%Dump

ClassMethod %Dump(pFolderItemName As %String = "") As %Status

Diagnostic method. Display the contents of a folder item to the console.

%CanWriteToFolder

ClassMethod %CanWriteToFolder(pFolderName As %String) As %Boolean

Does the current user have "WRITE" access to a folder?

%OpenItem

ClassMethod %OpenItem(pFullName As %String = "", ByRef pStatus As %Status) As %String

%IsNotFolderItem

ClassMethod %IsNotFolderItem(pFullName As %String = 0) As %Boolean

%ExpandItemList

ClassMethod %ExpandItemList(ByRef pItemList As %String, pVerbose As %Boolean = 1) As %Status

%GetItemsForType

ClassMethod %GetItemsForType(pType, ByRef pItemList, pVerbose As %Boolean = 1)

%ValidateItemType

ClassMethod %ValidateItemType(pType As %String, ByRef pProblem As %String) As %Boolean

%GetRelatedItems

ClassMethod %GetRelatedItems(pItem As %String, ByRef pRelItems, pVerbose As %Boolean = 1) As %Status

Get the related DeepSee items for a dashboard or pivot table. All items related to the target item pItem will be returned in the pRelItems array. Related items are returned indexed by a single "all" node and by type:
pRelItems("all",pItem)=""
pRelItems("type","itemType",pItem)=""

%GetRelatedItemsForPivot

ClassMethod %GetRelatedItemsForPivot(pItem As %String, ByRef pRelItems, pVerbose As %Boolean = 1) As %Status

Get the related DeepSee items for a pivot table.

%GetRelatedItemsForCube

ClassMethod %GetRelatedItemsForCube(pCubeName As %String, ByRef pRelItems, pVerbose As %Boolean = 1) As %Status

Get the related DeepSee items for a cube/subject area.

%GetRelatedItemsForDashboard

ClassMethod %GetRelatedItemsForDashboard(pItem As %String, ByRef pRelItems, pVerbose As %Boolean = 1) As %Status

Get the related DeepSee items for a dashboard.

%AddRelatedItem

ClassMethod %AddRelatedItem(pItem As %String, ByRef pRelItems, pVerbose As %Boolean = 1) As %Status [ Internal ]

Add a new pItem to the pRelItems array. A type extension is expected on the pItem input, for example Set status = ##class(%DeepSee.UserLibrary.Utils).%AddRelatedItem("itemName.itemType",.relatedItems)