Skip to main content

%SYS.Portal.Users

Class %SYS.Portal.Users Extends (%Persistent, %XML.Adaptor, %SYSTEM.Help) [ Inheritance = right, System = 4 ]

This class will allow a user to specify and save favorite pages in the system management portal.

Properties

Data

Property Data As %List [ Internal, Required ];

Arbitray $list data.

Page

Property Page As %String(MAXLEN = 256) [ Internal, Required ];

Identifier for the page.

Username

Property Username As %Library.Username [ Internal, Required ];

$username of the user saving the page.

Methods

%AddFavorite

ClassMethod %AddFavorite(Page As %String, Data As %List) As %Status [ Internal ]

Add a page favorite for the current $username.
If the page favorite already exists, return success.
Parameters:

Page - Identifier of the page.
Data - Data associated with the page.

%GetFavoritesForUser

ClassMethod %GetFavoritesForUser(ByRef Favorites As %String) As %Status [ Internal ]

Return the list of page favorites for the current $Username.
Parameters:

Favorites (byref) - Array of page favorites for the current $username.
Favorites(Page)=Data

%GetFavoritesForUsers

ClassMethod %GetFavoritesForUsers(Usernames As %String = "*", ByRef Favorites As %String) As %Status [ Internal ]

Return the list of page favorites for the specified usernames.
Parameters:

Usernames - List of usernames in the same format passed to the List() query.
Favorites (byref) - Array of page favorites for the specified users.
Favorites(Username,Page)=Data

%RemoveFavorite

ClassMethod %RemoveFavorite(Page As %String) As %Status [ Internal ]

Remove a page favorite for the current $username.
Returns success if the page favorite does not exist.
Parameters:

Page - Identifier of the page favorite to remove for $username.

%RemoveFavoritesForUser

ClassMethod %RemoveFavoritesForUser() As %Status [ Internal ]

Remove all page favorites for the current $username.

%RemoveFavoritesForUsers

ClassMethod %RemoveFavoritesForUsers(Usernames As %String = {$username}) As %Status [ Internal ]

Remove all favorites for the specified usernames.
Parameters:

Usernames - List of usernames in the same format passed to the List() query.

ListExecute

ClassMethod ListExecute(ByRef qHandle As %Binary, Usernames As %String = "*") As %Status [ Internal ]

List of users and their page favorites.
Names - Comma separated list of users
"*" - All records match
"String,String1" - Any records matching one of these elements
"String*" - Any record starting with "String"
"String,String1*,String2" - Any record matching one of these elements, or starting with "String1"
Note: This query may change in future versions

ListFetch

ClassMethod ListFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status [ Internal, PlaceAfter = ListExecute ]

ListClose

ClassMethod ListClose(ByRef qHandle As %Binary) As %Status [ Internal, PlaceAfter = ListExecute ]