ConfigurationManager.Constants property

The Constants property retrieves a Constants object that contains common constant values supported by the AD RMS service.

This property is read-only.

Syntax

ConfigurationManager.Constants

Property value

This property returns a Constants object. The property is read-only.

Remarks

You can use the Constants object to retrieve the following values:

  • Role constants:
    RoleAuditor
    RoleTemplateEditor
    RoleAdministrator
  • Rights constants:
    TemplateRightFullControl
    TemplateRightExport
    TemplateRightView
    TemplateRightExtract
    TemplateRightAllowMacros
    TemplateRightReply
    TemplateRightViewRights
    TemplateRightSave
    TemplateRightPrint
    TemplateRightEdit
    TemplateRightForward
    TemplateRightReplyAll
  • Rights template expiration constants:
    TemplateExpirationTypeNever
    TemplateExpirationTypeOnDate
    TemplateExpirationTypeUntilDays
  • Key hierarchy constants:
    KeyHierarchyPreproduction
    KeyHierarchyProduction
    KeyHierarchyOther
  • Cluster type constants:
    ClusterTypeLicensing
    ClusterTypeCertification
  • Proxy scheme constants:
    ProxySchemeBasic
    ProxySchemeDigest
    ProxySchemeWindowsIntegrated
  • Service account type constants:
    ServiceAccountTypeUnknown
    ServiceAccountTypeDomainIdentity
    ServiceAccountTypeLocalSystem
    ServiceAccountTypeLocalService
    ServiceAccountTypeNetworkService

Examples

' *******************************************************************
' Use the Constants object to filter on a role.

SUB TestRole(testCaseName)
 
  SELECT CASE testCaseName
    CASE "UT_TestGetRoles"
      IF admin_role<config_manager.Constants.RoleAdministrator  THEN
        CALL RaiseError(-100, "The Admin role " _
        & admin_role & " is invalid.")
      END IF
      ' TODO: Perform an action.
        
    CASE "UT_TestGetClusterInformation"
      IF admin_role < config_manager.Constants.RoleAuditor THEN
        CALL RaiseError(-101, "Invalid role operation")
      END IF
     ' TODO: Perform an action.

    CASE ELSE
      CALL RaiseError(-1, "Unknown test case of " & testCaseName)

  END SELECT

END SUB

' *******************************************************************
' Generate a runtime error.

SUB RaiseError(errId, desc)
  CALL Err.Raise( errId, "", desc )
  CheckError()
END SUB

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2008
Assembly
Microsoft.RightsManagementServices.Admin.dll

See also

ConfigurationManager