%DeepSee.UserPortal.Utils
Class %DeepSee.UserPortal.Utils Extends %RegisteredObject [ Abstract, System = 4 ]
APIs used by the UserPortal.
Parameters
DOMAIN
Parameter DOMAIN = "%DeepSee";
Methods
%GetUserHomePageURL
ClassMethod %GetUserHomePageURL() As %String
Return the URL for the user portal home page.
%GetViewerURL
ClassMethod %GetViewerURL() As %String
Return the URL for the dashboard viewer.
%GetErrorPageURL
ClassMethod %GetErrorPageURL(pError As %String) As %String
Return the URL for the user portal error page.
%GetPreferences
ClassMethod %GetPreferences(Output pPrefs) As %Status
Return an array containing the system preferences for the portal.
%GetUserName
ClassMethod %GetUserName(pUserName As %String = "") As %String
Return the name of the current user (or given user name). Return their full name if registered, otherwise return the login name.
%GetUserList
ClassMethod %GetUserList(Output pUsers, pSearchKey As %String = "", pAlertsEnabled As %Boolean = 0) As %Status
Return a list of DeepSee users.
pUsers(n) = $LB(id,name,icon)
If pAlertsEnabled is true, then only return users that have enabled alerts.
%GetAlertsForUser
ClassMethod %GetAlertsForUser(Output pAlerts, Output pNewCount As %Integer, pMaxItems As %Integer = 25) As %Status
Return the current alerts list for the current user: pAlerts(n) = $LB(alertId,from,subject,date,url,priority,icon,iconTip)
%GetFavoritesForUser
ClassMethod %GetFavoritesForUser(Output pFavorites) As %Status
Return the current favorites list for the current user: pItems(n) = $LB(fullName,name,folder,title,type,icon,date,url)
%GetRecentItemsForUser
ClassMethod %GetRecentItemsForUser(Output pItems) As %Status
Return the recent items list for the current user: pItems(n) = $LB(fullName,name,folder,title,type,icon,date,url)
%FormatDate
ClassMethod %FormatDate(pDate As %String, pUTCtoLocal As %Boolean = 0) As %String
Format a $H value.
%GetFolderItemsForUser
ClassMethod %GetFolderItemsForUser(Output pItems, pFolderName As %String, pSearchKey As %String = "", pIncludePrivate As %Boolean = 0, pShowAll As %Boolean = 0) As %Status
Return a list of folder items for the current user:
pItems(n) = $LB(name,type,tip,date,url,icon,keywords,public,title,createdBy,resource,cover,category,owner,write,lastAccessed)
This list is returned in ID order; the caller will sort it. If pShowAll is true, list items for all users.
%GetSettingsFromURL
ClassMethod %GetSettingsFromURL(Output pSettings) As %Status
Get the values of any SETTINGS parameters within the current URL and pull them apart. A dashboard URL may contain any number of parameters called SETTINGS. Each takes the form:
SETTINGS=parm:value;parm:value;
Supported parameters and values include:
TARGET:widgetName; ("*" if not specified)
FILTER:spec;
VARIABLE:pivotVar; (default value for pivot variable)
ROWCOUNT:#;
COLCOUNT:#;
ROWSORT:Measure;
COLSORT:Measure;
ROWSORTDIR:ASC|DESC;
COLSORTDIR:ASC|DESC;
For some items, such as FILTER, there can be multiple values separated by ~
;; is an escape for ";"
~~ is an escape for "~"
A FILTER spec is of the form:
Name.Value or [Name].[Value], [Name].&[Value]
For an MDX-based filter, Name may have multiple pieces:
[DIM].[Hier].[Level].[Value]
A VARIABLE (pivot variable) spec is of the form:
VarName.Value
On return, pSettings will contain:
pSettings(target,parm) = "value"
%RegisterUser
ClassMethod %RegisterUser(pUserId As %String, pUserName As %String = "", pEMail As %String = "", pEnabled As %Boolean = 1) As %Status
Register a DeepSee user.
%SendAlert
ClassMethod %SendAlert(pAlert As %DeepSee.UserPortal.Data.Alert) As %Status
Send a new alert.
%DeleteAlert
ClassMethod %DeleteAlert(pAlertId As %String) As %Status
Delete the given alert.
%KillAlerts
ClassMethod %KillAlerts() As %Status
Delete all alerts in this namespace.
%ClearUserSettings
ClassMethod %ClearUserSettings() As %Status
Delete the current user settings for the current namespace.
%RemoveUserSetting
ClassMethod %RemoveUserSetting(pName As %String) As %Status
Delete the given user setting for the current namespace.
%GetUserSettingsList
ClassMethod %GetUserSettingsList(Output pData, pContext As %String = "") As %Status
Return a list of the current user settings in the form: pData(n) = $LB(name,value,comment,context)
%SetUserSetting
ClassMethod %SetUserSetting(pName As %String, pValue As %String, pComment As %String = "", pContext As %String = "") As %Status
Set the value and comment for the given user-defined setting.
pName is the name of the setting. This must be unique.
pValue is the value of the setting. This is in ObjectScript expression that is evaluated at run-time.
pComment is a comment.
pContext is the name of the context in which this setting is expected to be used. This allows the user to be presented with a limited set of settings.
%GetUserSetting
ClassMethod %GetUserSetting(pName As %String, Output pSC As %Status) As %String
Get the value of the given user-defined setting. A user-setting is an expression. This method evaluates the expression and returns the result.
%ClearUserIcons
ClassMethod %ClearUserIcons() As %Status
Delete the current user icons for the current namespace.
%RemoveUserIcon
ClassMethod %RemoveUserIcon(pName As %String) As %Status
Delete the given user icon for the current namespace.
%GetUserIconList
ClassMethod %GetUserIconList(Output pData) As %Status
Return a list of the current user icons in the form: pData(n) = $LB(name,path)
%SetUserIcon
ClassMethod %SetUserIcon(pName As %String, pPath As %String) As %Status
Set the path for the given user-defined icon.
pName is the name of the icon. This must be unique.
pValue is the path for the icon.
%GetUserIcon
ClassMethod %GetUserIcon(pName As %String, Output pSC As %Status) As %String
Get the path of the given user-defined icon.
%ClearDashboardSettings
ClassMethod %ClearDashboardSettings(pDashboard As %String, pUser As %String = "", pSaveLocalDataSource As %Boolean = 0) As %Status
Clear dashboard settings for the given dashboard (If pUser is "", then for all users).
%ClearLocalDataSource
ClassMethod %ClearLocalDataSource(pDashboard As %String, pWidgetKey As %String) As %Status
Clear the localDataSource for a specific user and widget.
%SaveDashboardSettings
ClassMethod %SaveDashboardSettings(ByRef pSettings As %String, pDashboard As %String, pUser As %String = "") As %Status
A dashboard setting is a set of name/value pairs saved for a specific dashboard and user. This lets the user save filters values, positions, etc.
%LoadDashboardSettings
ClassMethod %LoadDashboardSettings(Output pSettings As %String, pDashboard As %String, pUser As %String = "") As %String
A dashboard setting is a set of name/value pairs saved for a specific dashboard and user. This lets the user save filters values, positions, etc.
%ListFolderItems
ClassMethod %ListFolderItems(pSearchKey As %String = "") As %Status
Print a list of all folder items to the console.
%FindDependencies
ClassMethod %FindDependencies(pName As %String, Output pList As %String, pVerbose As %Boolean = 0) As %Status
For the given folder item, pName, return a list of other items it depends upon.
%FindIsUsedBy
ClassMethod %FindIsUsedBy(pName As %String, Output pList As %String, pVerbose As %Boolean = 0) As %Status
For the given folder item, pName, return a list of other items that use it. This method does a full scan of all dashboard items, so use sparingly.
%GetColorSchemes
ClassMethod %GetColorSchemes(Output pScheme) As %Status
Return an array the list of defined dashboard color schemes: pScheme(n) = $LB(name,caption,jsFile,cssFile)
%GetColorSchemeInfo
ClassMethod %GetColorSchemeInfo(pScheme As %String, Output pInfo) As %Status
Find info on the given dashboard color scheme.
%GetChartSeriesSchemes
ClassMethod %GetChartSeriesSchemes(Output pScheme) As %Status
Return an array of the defined chart series color schemes: pScheme(n) = $LB(name,caption,[colorList])
%GetChartSeriesSchemeInfo
ClassMethod %GetChartSeriesSchemeInfo(pScheme As %String, Output pSchemeName, Output pColorList) As %Status
Find info on the given chart series color scheme.
%GetColorSets
ClassMethod %GetColorSets(Output pSet) As %Status
Return an array of the defined color sets. A color set is a name list of up to 256 colors used by a color picker. pSet(n) = $LB(name,caption,;-delimited list of colors)
%ResolveTextList
ClassMethod %ResolveTextList(pText As %String) As %String
Resolve a csv-list of localized text strings at run time.
%ResolveText
ClassMethod %ResolveText(pText As %String) As %String
Resolve a localized text string at run time. A localized string can take the following forms:
"String" -- not localized.
"$$$String" -- equivalent to $$$Text("String","DeepSeeUser")
"$$$String/Domain" -- equivalent to $$$Text("String","Domain")
%ResolveName
ClassMethod %ResolveName(pName) As %String
%ParseCellSelectionContext
ClassMethod %ParseCellSelectionContext(pExpression = "", pCubeName = "", Output pContextFilters) [ Internal ]
This is a special parser for handling the filter context of selected cells produced during a detail listing. This is designed to parse a pExpression provided in the pivotTable.listingFilters property into display Level-Member name pairs to provide context for a listing export or display.
AddWidgetNames
ClassMethod AddWidgetNames(pDashboard As %DeepSee.Dashboard.Definition = "", ByRef pNewWidgetNames) As %Status
Inspect an open dashboard definition object and add names to any widgets that do not have names. All widgets that are assigned new names will have a name of the form WidgetXXX that is unique to the dashboard assigned. All names assigned in this manner will be returned in an index available through the by reference argument
pNewWidgetNames(widgetPosition) = newName
This method will not change the stored dashboard definition DFI document.
AddWidgetKeys
ClassMethod AddWidgetKeys(pDashboard As %DeepSee.Dashboard.Definition = "") As %Status
Look through all of the widgets in a dashboard and make sure each that has a logical name also has a defined key.