MeadCo.ScriptX.Print.Licensing

Namespace

MeadCo.ScriptX.Print.Licensing

MeadCo.ScriptX.Print.Licensing

A static class wrapping calls to the server API to install / manage a client license for ScriptX.Services for Windows PC.

Description:
  • MeadCo.ScriptX.Print.Licensing

    A static class wrapping calls to the server API to install / manage a client license for ScriptX.Services for Windows PC.

    The purpose of these libraries is to assist those with a body of client javascript code targetting use of the ScriptX Add-On for Internet Explorer. These libraries assist with continuing with a large part of the code intact when transitioning to using ScriptX.Services instead/as well.

    This module is only required when working with ScriptX Services for Windows PC.

    A license must be 'applied' to the current html document/window before calls to printing APIs that use the license can be made.

    This module is NOT required when working with Cloud or On Premise services as the license installation and management occurs at the server.

    Requires: meadco-core.js

Source:

Members

(static) License

Get the details on the connected license.

Description:
  • Get the details on the connected license. If it hasnt been applied yet, then query for the details (but dont apply it and connectLite() MUST have been called).

    Warning this function is synchronous, GetLicenseAsync() should be used.

Source:
Properties:
Name Type Description
License license

Get the details on the connected license. If it hasnt been applied yet, then query for the details (but dont apply it and connectLite() MUST have been called).

Warning this function is synchronous, GetLicenseAsync() should be used.

(static) errorMessage

Get the text of the last error.

Description:
  • Get the text of the last error.

Source:
Properties:
Name Type Description
errorMessage string

Get the text of the last error.

(static) errorMessage

Get the text of the last error.

Description:
  • Get the text of the last error.

Source:
Properties:
Name Type Description
errorMessage string

Get the text of the last error.

(static) result

Get the result code for the last attempt to apply a license.

Description:
  • Get the result code for the last attempt to apply a license.

    Basically faked for the benefit of code compatibility with the add-on

Source:
Properties:
Name Type Description
result number

Get the result code for the last attempt to apply a license.

Basically faked for the benefit of code compatibility with the add-on

(static) validLicense

Get whether a license has been applied successfully

.

Description:
  • Get whether a license has been applied successfully

Source:
Properties:
Name Type Description
validLicense boolean

Get whether a license has been applied successfully

(static) version

Get the version of this module as a string major.minor.hotfix.build

.

Description:
  • Get the version of this module as a string major.minor.hotfix.build

Source:
Properties:
Name Type Description
version string

Get the version of this module as a string major.minor.hotfix.build

Methods

(static) GetLicenseAsync(resolve, reject)

Get the details on the connected license.

Description:
  • Get the details on the connected license. If it hasnt been applied yet, then query for the details (but dont apply it and connectLite() MUST have been called).

Source:
Parameters:
Name Type Description
resolve function

function to call on success

reject function

function to call on failure with reason for failure

(static) apply(licenseGuid, revision, path) → {license}

Apply (make usable) the MeadCo ScriptX Client license for use with this content.

Description:
  • Apply (make usable) the MeadCo ScriptX Client license for use with this content. If the license is not already cached it will be downloaded and cached. It is strongly suggested you request that the silent option is enabled in the license (it is by default for ScriptX.Services for Windows PC licenses)

    The license must list the url of the content to which it is being applied.

    This call is synchronous and therefore not recommended. Use applyAsync()

Source:
Parameters:
Name Type Description
licenseGuid string

the license GUID as provided by MeadCo.

revision number

the revision number of the licsnse as provided by MeadCo.

path string

fully qualified path to the license file (.mlf file). Use the value 'warehouse' to download from the public MeadCo License warehouse

Returns:

details the license that was sucessfully applied, null if none available

Type
license

(static) applyAsync(licenseGuid, revision, path, resolve, reject)

Apply (make usable) the MeadCo ScriptX Client license for use with this content.

Description:
  • Apply (make usable) the MeadCo ScriptX Client license for use with this content. If the license is not already cached it will be downloaded and cached. It is strongly suggested you request that the silent option is enabled in the license (it is by default for ScriptX.Services for Windows PC licenses)

    The license must list the url of the content to which it is being applied.

Source:
Parameters:
Name Type Description
licenseGuid string

the license GUID as provided by MeadCo.

revision number

the revision number of the licsnse as provided by MeadCo.

path string

fully qualified path to the license file (.mlf file). Use the value 'warehouse' to download from the public MeadCo License warehouse

resolve function

function to call on success

reject function

function to call on failure with reason for failure

(static) connect(serverUrl, slicenseGuid)

Specify the server to use and the license Guid.

Description:
  • Specify the server to use and the license Guid.

Source:
Parameters:
Name Type Description
serverUrl string

the 'root' url to the server (the api path will be added by the library)

slicenseGuid string

the license GUID as provided by MeadCo. Optional unless will call GetLicenseAsync() without calling apply

(static) connectLite(serverUrl, slicenseGuid, revision, path)

Specify the server to use and the license Guid in order to get details on the license via the License property or function GetLicenseAsync()

.

Description:
  • Specify the server to use and the license Guid in order to get details on the license via the License property or function GetLicenseAsync()

Source:
Parameters:
Name Type Description
serverUrl string

the 'root' url to the server (the api path will be added by the library)

slicenseGuid string

the license GUID as provided by MeadCo. Optional unless will call GetLicenseAsync() without calling apply

revision number

the revision number of the licsnse as provided by MeadCo.

path string

fully qualified path to the license file (.mlf file). Use the value 'warehouse' to download from the public MeadCo License warehouse

Type Definitions

LicenseOptions

The capabilities that can be licensed.

Description:
  • The capabilities that can be licensed.

Source:
Properties:
Name Type Description
basicHtmlPrinting boolean

True if Add-on compatible basic html printing is available (always true)

advancedPrinting boolean

True if Add-on compatible advanced html printing features are available

enhancedFormatting boolean

True if Add-on compatible enhanced formatting is available

printPdf boolean

True if printing PDF files is available

printRaw boolean

True if Raw printing is available

The capabilities that can be licensed.

license

License details

.

Description:
  • License details

Source:
Properties:
Name Type Description
guid string

The unique id of the license

company string

The name of the license owner

companyHomePage string

Url of company home page

from Date

Date license is valid from

to Date

Date license is vaid till

options LicenseOptions

The options enabled by the license

domains Array.string

the domains the license can be used from

License details