Skip to main content

EMS.LicenseKey

SQL Table Name: EMS.LicenseKey

EMS.LicenseKey is intended to be used by EMS for license key distribution. The license key is stored in a file named cache.key in the mgr directory and is activated at instance startup by the control process. It can also be activated while the system is running (subject to some constraints). Usage:
s lkey=##class(EMS.LicenseKey).%OpenId(0) will open the active key. If the cache.key file in mgr is pending activation, the FileName and FileContents properties will be "". s lkey=##class(EMS.LicenseKey).%OpenId(FullKeyFilePathAndName) will create an object and load the cache.key file into it. s lkey=##class(EMS.LicenseKey).%New() s status=lkey.%LoadData(PathAndFileName) will load the cache.key file into the object.

Property Inventory

Method Inventory

Properties

property AuthorizationKey as %String [ Calculated ];
Property methods: AuthorizationKeyDisplayToLogical(), AuthorizationKeyIsValid(), AuthorizationKeyLogicalToDisplay(), AuthorizationKeyLogicalToOdbc(), AuthorizationKeyNormalize()
property CustomerName as %String [ Calculated ];
Property methods: CustomerNameDisplayToLogical(), CustomerNameIsValid(), CustomerNameLogicalToDisplay(), CustomerNameLogicalToOdbc(), CustomerNameNormalize()
property ExpirationDate as %String [ Calculated ];
Property methods: ExpirationDateDisplayToLogical(), ExpirationDateIsValid(), ExpirationDateLogicalToDisplay(), ExpirationDateLogicalToOdbc(), ExpirationDateNormalize()
property FileContents as %List;
License as contents of cache.key file
Property methods: FileContentsGet(), FileContentsIsValid(), FileContentsLogicalToOdbc(), FileContentsOdbcToLogical(), FileContentsSet()
property FileName as %String (MAXLEN = 1024);
Property LicenseFileName As %String(MAXLEN =
Property methods: FileNameDisplayToLogical(), FileNameGet(), FileNameIsValid(), FileNameLogicalToDisplay(), FileNameLogicalToOdbc(), FileNameNormalize(), FileNameSet()
property InternalKey as %String (MAXLEN = 65536);
Property methods: InternalKeyDisplayToLogical(), InternalKeyGet(), InternalKeyIsValid(), InternalKeyLogicalToDisplay(), InternalKeyLogicalToOdbc(), InternalKeyNormalize(), InternalKeySet()
property LicenseCapacity as %String [ Calculated ];
Property methods: LicenseCapacityDisplayToLogical(), LicenseCapacityIsValid(), LicenseCapacityLogicalToDisplay(), LicenseCapacityLogicalToOdbc(), LicenseCapacityNormalize()
property MachineId as %String [ Calculated ];
Property methods: MachineIdDisplayToLogical(), MachineIdIsValid(), MachineIdLogicalToDisplay(), MachineIdLogicalToOdbc(), MachineIdNormalize()
property Name as %String;
Name property used as IdKey on EMS
Property methods: NameDisplayToLogical(), NameGet(), NameIsValid(), NameLogicalToDisplay(), NameLogicalToOdbc(), NameNormalize(), NameSet()
property OrderNumber as %String [ Calculated ];
Property methods: OrderNumberDisplayToLogical(), OrderNumberIsValid(), OrderNumberLogicalToDisplay(), OrderNumberLogicalToOdbc(), OrderNumberNormalize()
property SHA1Hash as %String;
Property methods: SHA1HashDisplayToLogical(), SHA1HashGet(), SHA1HashIsValid(), SHA1HashLogicalToDisplay(), SHA1HashLogicalToOdbc(), SHA1HashNormalize(), SHA1HashSet()

Methods

classmethod %DeleteExtent(concurrency As %Library.Integer = -1, ByRef deletecount As %Library.String, ByRef instancecount As %Library.String, pInitializeExtent As %Library.Integer = 1, Output errorLog As %Library.Status) as %Status
Delete all instances of this class from its extent.
method %SaveData(id As %String) as %Status
Overrides the default %SaveData method by writeing the key into a file. Saves this key into the default cache.key file
method Activate(ByRef RequiresRestart As %Integer, ByRef RestartReason As %String) as %Status
Activate this license key after checking validity and saving the cache.key file if it is active. On success, this key will be in cache.key in mgr and will be active. If restart is required, success is returned, RequiresRestart=1, and RestartReason is text explaining why.
method AuthorizationKeyGet() as %String
method CustomerNameGet() as %String
classmethod EMSKeyFileType(Group) as %String
Return FileType property for EMS License
method ExpirationDateGet() as %String
method LicenseCapacityGet() as %String
method MachineIdGet() as %String
method OrderNumberGet() as %String
method ReadFileData(FileName As %String, ByRef Status) as %List
Read the contents of a license key file FileName into a list. Return the list. Return status by ref.
method SaveToFile(FileName As %String) as %Status
Saves this key into the indicated file .

Indexes

index (IDKEY on ) [IdKey, Type = key];
Index methods: IDKEYCheck(), IDKEYDelete(), IDKEYExists(), IDKEYOpen(), IDKEYSQLCheckUnique(), IDKEYSQLExists(), IDKEYSQLFindPKeyByConstraint(), IDKEYSQLFindRowIDByConstraint()

Inherited Members

Inherited Methods

FeedbackOpens in a new tab