API Docs for:
Show:

server_com_customer_card_rest Class

Provides the REST server.

Methods

config

(
  • path
)

Configurates the REST server properties by a configuration file. The file must use the JSON syntax.

The method can throw an Exception.

Parameters:

  • path String

    The path of the configuration file

execute

() private

Executed by all REST request. It calls the appropriate REST plugin function.

setAllRestPluginsLogger

(
  • log
)
private

Call setLogger function for all REST plugins.

Parameters:

  • log Object

    The logger object.

setCompAuthorization

(
  • ca
)
static

Set the authorization architect component.

Parameters:

  • ca Object

    The architect authorization component

setCompCustomerCard

(
  • compCustomerCard
)
static

Set the customer card architect component to be used by REST plugins.

Parameters:

  • compCustomerCard Object

    The architect customer card component

setCompUtil

(
  • comp
)
static

Sets the utility architect component.

Parameters:

  • comp Object

    The architect utility component

setLogger

(
  • log
)
static

Set the logger to be used.

Parameters:

  • log Object

    The logger object. It must have at least three methods: info, warn and error as console object.

start

() static

Start the REST server.

Properties

address

String private

Listening address of the REST server. It can be customized by the configuration file.

Default: "localhost"

compAuthorization

Object private

The architect component to be used for authorization.

compUtil

Object private

The utility architect component.

IDLOG

String private final

The module identifier used by the logger.

Default: [server_com_customer_card_rest]

logger

Object private

The logger. It must have at least three methods: info, warn and error.

Default: console

port

String private

Listening port of the REST server.

server

Object private

The REST server.