%SYS
Domains Class Reference

This class defines the security domains for a system. More...

Inheritance diagram for Domains:
Collaboration diagram for Domains:

Static Public Member Functions

_.Library.Status InUse (_.Library.String Name, _.Library.Boolean InUse, _.Library.List Users, _.Library.Boolean MoreUsers)
 Checks if the domain is in use. More...
 

Detailed Description

This class defines the security domains for a system.


Domain names have the following properties:
1) Domain names are case insensitive.
2) Maximum length of a domain name is 64 characters.
The Admin Secure:USE permission is required to operate on a domain

The table for this class should be manipulated only through object access, the published API's or through the System Management Portal. It should not be updated through direct SQL access.

Member Function Documentation

◆ InUse()

_.Library.Status InUse ( _.Library.String  Name,
_.Library.Boolean  InUse,
_.Library.List  Users,
_.Library.Boolean  MoreUsers 
)
static

Checks if the domain is in use.


Checks if the domain specified is used by any user.
Parameters:
Name - Name of the domain to check.
Return values:
InUse = 0 Not used
InUse = 1 Used
Users = $list of users the domain is used by or null if none
MoreUsers = 0 - Entire list of users using the domain returned
MoreUsers = 1 - Entire list of users using the role Not returned
If MoreUsers=1, and you wish to get the entire list of users using the domain, use the following code:
s x=##Class(Security.Domains).InUse("Domain1",.InUse,.Users,.MoreUsers) While (MoreUsers) {
s SaveUsers($i(i))=Users
s x=##Class(Security.Domains).InUse("Domain1",.InUse,.Users,.MoreUsers)<br? }