Subsections of operations

Subsections of catalog

Append Entities By

Util used into BaseOperationBuilder to append entities the three different ways. By filter, By tags, By entityList

constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
parent BaseOperationBuilder this is a instance of BaseOperationBuilder

filter(filter, resourceType)

Append filter to operation target

Parámetros

Nombre Tipo Opcional Descripción
filter FilterBuilder
resourceType string

Retorna

Tip

Tipo: BaseOperationBuilder


list(entities)

Append entity list to operation target

Parámetros

Nombre Tipo Opcional Descripción
entities EntityListBuilder

Retorna

Tip

Tipo: BaseOperationBuilder


tag(tag)

Set tag to operation target

Parámetros

Nombre Tipo Opcional Descripción
tag string

Retorna

Tip

Tipo: BaseOperationBuilder


Base Operation Builder

Defines the builder to execute an operation that is into catalog

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
config object this is configuration about operation.

appendEntitiesBy

Util used into BaseOperationBuilder to append entities the three different ways. By filter, By tags, By entityList


build()

Build a instance of Operation

Retorna

Tip

Tipo: Operation

Ejemplos

 ogapi.operations.builderFactory.newXXXBuilder().build()

executeAtDate(date, active)

The operation will be created with delayed start or if you not pass any argument then the method return a cron expression builder.

Parámetros

Nombre Tipo Opcional Descripción
date Date
active boolean If active is false, an operation is created in paused

Retorna

Tip

Tipo: BaseOperationBuilder,CronExpressionBuilder


executeEach(date, name, end, active, description)

The operation will execute with a period that you must define with ExecuteEachBuilder

Parámetros

Nombre Tipo Opcional Descripción
date Date Date when operation will be executed
name string Name associated to periodicity
end number or Date When periodicity ends. By repetitions or by date
active boolean If active is false, an operation is created in paused
description string Description associated to periodicity

Retorna

Tip

Tipo: ExecuteEachBuilder


executeEvery(date, name, end, active, description)

The operation will execute with a period that you must define with ExecuteEveryBuilder

Parámetros

Nombre Tipo Opcional Descripción
date Date Date when operation will be executed
name string Name associated to periodicity
end number or Date When periodicity ends. By repetitions or by date
active boolean If active is false, an operation is created in paused
description string Description associated to periodicity

Retorna

Tip

Tipo: ExecuteEveryBuilder


executeIDLE()

The operation will be created in IDLE state

Retorna

Tip

Tipo: BaseOperationBuilder


executeImmediately()

The operation will be execute immediately.

Retorna

Tip

Tipo: BaseOperationBuilder


executeLater(minutes, active)

The operation will be created with delayed start or if you not pass any argument then the method return a cron expression builder.

Parámetros

Nombre Tipo Opcional Descripción
minutes number
active boolean If active is false, an operation is created in paused

Retorna

Tip

Tipo: BaseOperationBuilder,CronExpressionBuilder


withAckTimeout(milliseconds, format)

Set ackTimeout to operation.

Parámetros

Nombre Tipo Opcional Descripción
milliseconds number
format string Can be 'milliseconds'

Retorna

Tip

Tipo: BaseOperationBuilder

Ejemplos

 ogapi.operations.builderFactory.newXXXBuilder().withAckTimeout(11)

withCallback(url)

Set a callback to operation. If it is set also will be set notify with true value

Parámetros

Nombre Tipo Opcional Descripción
url string If null then parameter will be removed into builder

Retorna

Tip

Tipo: BaseOperationBuilder

Ejemplos

 ogapi.operations.builderFactory.newXXXBuilder().withCallback("http://my.web")

withJobTimeout(milliseconds, format)

Set a timeout of job.

Parámetros

Nombre Tipo Opcional Descripción
milliseconds number if null then parameter will be removed into builder
format string Can be 'milliseconds'

Retorna

Tip

Tipo: BaseOperationBuilder

Ejemplos

 ogapi.operations.builderFactory.newXXXBuilder().withJobTimeout(180)

withNotes(notes)

Set notes to operation

Parámetros

Nombre Tipo Opcional Descripción
notes string If null then parameter will be removed into builder

Retorna

Tip

Tipo: BaseOperationBuilder

Ejemplos

 ogapi.operations.builderFactory.newXXXBuilder().withNotes("own notes")

withOperationRetries(operationRetries)

Set operation retries

Parámetros

Nombre Tipo Opcional Descripción
operationRetries Array

Retorna

Tip

Tipo: BaseOperationBuilder

Ejemplos

 ogapi.operations.builderFactory.newXXXBuilder().withOperationRetries(11)

withParameters(parameters)

Set parameters of the operation

Parámetros

Nombre Tipo Opcional Descripción
parameters object

Retorna

Tip

Tipo: BaseOperationBuilder

Ejemplos

 ogapi.operations.builderFactory.newXXXBuilder().withParameters({ param1: 'value1', param2: 'value2'})

withRetries(retriesNumber)

Set number of retries that operation will have.

Parámetros

Nombre Tipo Opcional Descripción
retriesNumber number

Retorna

Tip

Tipo: BaseOperationBuilder

Ejemplos

 ogapi.operations.builderFactory.newXXXBuilder().withRetries(2)

withRetriesDelay(milliseconds, format)

Set delay between operation retries.

Parámetros

Nombre Tipo Opcional Descripción
milliseconds number
format string Can be 'milliseconds'

Retorna

Tip

Tipo: BaseOperationBuilder

Ejemplos

 ogapi.operations.builderFactory.newXXXBuilder().withRetriesDelay(11)

withScatteringMaxSpread(percentage)

Set a scattering max spread to operation.

Parámetros

Nombre Tipo Opcional Descripción
percentage number if null then parameter will be removed into builder

Retorna

Tip

Tipo: BaseOperationBuilder

Ejemplos

 ogapi.operations.builderFactory.newXXXBuilder().withScatteringMaxSpread(20)

withScatteringStrategy(factor, warningMaxRate)

Set a scattering strategy to operation.

Parámetros

Nombre Tipo Opcional Descripción
factor number if null then parameter will be removed into builder
warningMaxRate number

Retorna

Tip

Tipo: BaseOperationBuilder

Ejemplos

 ogapi.operations.builderFactory.newXXXBuilder().withScatteringStrategy(20,4)

withTimeout(milliseconds, format)

Set timeout to operation.

Parámetros

Nombre Tipo Opcional Descripción
milliseconds number
format string Can be 'milliseconds'

Retorna

Tip

Tipo: BaseOperationBuilder

Ejemplos

 ogapi.operations.builderFactory.newXXXBuilder().withTimeout(11)

Operation

This is a abstract class, it must be extended to another class that defined the specific search. This class is responsible to manage execute operations request to OpenGate North API

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is ogapi instance
resource string this is a base url resource
postObj object it will be sent as a data on post action

execute()

This invoke a request to OpenGate North API and the callback is managed by promises

Retorna

Tip

Tipo: Promise


updatePeriodicity()

This invoke a request to OpenGate North API and the callback is managed by promises

Retorna

Tip

Tipo: Promise


Subsections of parameters

Base Parameter Builder With Parent

This class generate a builder by a dynamic content about specific parameter to an operation.

constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
config object this is configuration about parameter operation.
parent BaseOperationBuilder this is a instance of BaseOperationBuilder

build()

This has all knowledge to make a object.

Retorna

Tip

Tipo: object


buildAndAppend()

This method will invoke build and then it will append the parameter to operationBuilder with the correct way

Retorna

Tip

Tipo: BaseOperationBuilder


Parameter Builder Factory

This class generates all operation parameters builders by “parameters” attribute that there is into config operation json

constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
parameters object this is configuration about parameter operation.
parent BaseOperationBuilder this is a instance of BaseOperationBuilder

Subsections of period

Execute Each Builder

Defines the builder to configure a period of operation. With this builder you can select how repeat the operation. By days, hours or minutes.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
parent BaseOperationBuilder this is a operationBaseBuilder.
date Date Date when operation will be executed
periodicityName string Name associated to periodicity
end number or Date When periodicity ends. By repetitions or by date

days(days)

Set a difference of days in each repetition

Parámetros

Nombre Tipo Opcional Descripción
days number

Retorna

Tip

Tipo: BaseOperationBuilder


hours(hours)

Set a difference of hours in each repetition

Parámetros

Nombre Tipo Opcional Descripción
hours number

Retorna

Tip

Tipo: BaseOperationBuilder


minutes(minutes)

Set a difference of minutes in each repetition

Parámetros

Nombre Tipo Opcional Descripción
minutes number

Retorna

Tip

Tipo: BaseOperationBuilder


Execute Every Builder

Defines the builder to configure a period of operation. By this builder you can select period by day, week, month, year.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
parent BaseOperationBuilder this is a operationBaseBuilder.
date Date Date when operation will be executed
periodicityName string Name associated to periodicity

day()

Every day at time defined will be the pattern

Retorna

Tip

Tipo: BaseOperationBuilder


month(months)

Each month at time and day defined will be the pattern

Parámetros

Nombre Tipo Opcional Descripción
months array months on will be execute the operation

Retorna

Tip

Tipo: ByMonth


Subsections of pattern

By Generic

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
parent BaseOperationBuilder this is a operationBaseBuilder.
date Date Date when operation will be executed
periodicityName string Name associated to periodicity
end number or Date When periodicity ends. By repetitions or by date

By Month

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
parent BaseOperationBuilder this is a operationBaseBuilder.
date Date Date when operation will be executed
periodicityName string Name associated to periodicity
months array Months on will be execute the operation
end number or Date When periodicity ends. By repetitions or by date

day(day)

At this day will be executed the operation

Parámetros

Nombre Tipo Opcional Descripción
day number

Retorna

Tip

Tipo: BaseOperationBuilder


By Week

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
parent BaseOperationBuilder this is a operationBaseBuilder.
date Date Date when operation will be executed
periodicityName string Name associated to periodicity
end number or Date When periodicity ends. By repetitions or by date

days(days)

At this days will be executed the operation

Parámetros

Nombre Tipo Opcional Descripción
days array

Retorna

Tip

Tipo: BaseOperationBuilder


By Year

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
parent BaseOperationBuilder this is a operationBaseBuilder.
date Date Date when operation will be executed
periodicityName string Name associated to periodicity
end number or Date When periodicity ends. By repetitions or by date

day(day)

At this day will be executed the operation

Parámetros

Nombre Tipo Opcional Descripción
day number

Retorna

Tip

Tipo: BaseOperationBuilder


month(month)

At this month will be executed the operation

Parámetros

Nombre Tipo Opcional Descripción
month string

Retorna

Tip

Tipo: BaseOperationBuilder,ByYear


Periodicity Update Builder

executeEach(date, end)

The operation will execute with a period that you must define with ExecuteEachBuilder

Parámetros

Nombre Tipo Opcional Descripción
date Date Date when operation will be executed
end number or Date When periodicity ends. By repetitions or by date

Retorna

Tip

Tipo: ExecuteEach


executeEvery(date, end)

The operation will execute with a period that you must define with ExecuteEveryBuilder

Parámetros

Nombre Tipo Opcional Descripción
date Date Date when operation will be executed
end number or Date When periodicity ends. By repetitions or by date

Retorna

Tip

Tipo: ExecuteEvery


Operation Actions

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
operationId string Identifier of the operation on which the action will be carried out

active()

This invoke a request to OpenGate North API and the callback is managed by promises This function active an operation

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.newOperationActions("xxxxx-xxx-xxxx-xxxxx").active()

activePeriodicity()

This invoke a request to OpenGate North API and the callback is managed by promises This function active periodicity of an operation

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.newOperationActions("xxxxx-xxx-xxxx-xxxxx").activePeriodicity()

cancel()

This invoke a request to OpenGate North API and the callback is managed by promises This function cancela operation

Retorna

Tip

Tipo: Promise

Ejemplos

Actions("xxxxx-xxx-xxxx-xxxxx").cancel();

cancelPeriodicity()

This invoke a request to OpenGate North API and the callback is managed by promises This function cancel the periodicity of an operation

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.OperationActions("xxxxx-xxx-xxxx-xxxxx").cancelPeriodicity();

changeCallback(url)

This invoke a request to OpenGate North API and the callback is managed by promises This function pauses (if it was active), updates the callback and passes the operation to the initial state (if activated, activated again)

Parámetros

Nombre Tipo Opcional Descripción
url string

Retorna

Tip

Tipo: promise

Ejemplos

ogapi.OperationActions("xxxxx-xxx-xxxx-xxxxx").changeCallback("http://[your_application_address]/[your_URI]")

executeLater(minutes)

This invoke a request to OpenGate North API and the callback is managed by promises This function pauses (if it was active), updates the delay and passes the operation to the initial state (if activated, activated again)

Parámetros

Nombre Tipo Opcional Descripción
minutes number

Retorna

Tip

Tipo: promise

Ejemplos

ogapi.OperationActions("xxxxx-xxx-xxxx-xxxxx").executeLater(10)

executeNow()

This invoke a request to OpenGate North API and the callback is managed by promises This function pause, update its delay and active an operation for execute immediately

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.OperationActions("xxxxx-xxx-xxxx-xxxxx").executeNow()

pause()

This invoke a request to OpenGate North API and the callback is managed by promises This function pause an operation

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.OperationActions("xxxxx-xxx-xxxx-xxxxx").pause()

pausePeriodicity()

This invoke a request to OpenGate North API and the callback is managed by promises This function pause periodicity of an operation

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.OperationActions("xxxxx-xxx-xxxx-xxxxx").pausePeriodicity()

Operation Finder

This class allow make get request to operation resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI Reference to the API object.

findById(id)

Download a specific operation by its id. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
id string Operation id.

Retorna

Tip

Tipo: Promise

Ejemplos

  ogapi.newOperationFinder().findById('xxx-xx-xxx-xxx').then().catch();

findExecutionsById(id, size, start)

Download a specific executions of an operation by its id. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
id string Operation id.
size number Defined the number of elements on response
start number Defined the offset on response

Retorna

Tip

Tipo: Promise


findPeriodicityById(id)

Download information of peridodicitiy of a specific operation by its id. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
id string Operation id.

Retorna

Tip

Tipo: Promise

Ejemplos

  ogapi.newOperationFinder().findPeriodicityById('xxx-xx-xxx-xxx').then().catch();

findPeriodicityByPeriodicityId(periodicityId)

Download information of periodicitiy by its id. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
periodicityId string Periodicity id.

Retorna

Tip

Tipo: Promise

Ejemplos

  ogapi.newOperationFinder().findPeriodicityByPeriodicityId('xxx-xx-xxx-xxx').then().catch();

Operations

This class generates all operations builders by a response to search into catalog/operations

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.

builderByOperationName(name)

Create a builder to create an operation

Parámetros

Nombre Tipo Opcional Descripción
name String name of the operation to be created

Retorna

Tip

Tipo: Promise


updatePeriodicityBuilder(operationId)

Create a builder to update the periodicity of an operation

Parámetros

Nombre Tipo Opcional Descripción
operationId String identifier of the operation to be updated~

Retorna

Tip

Tipo: Promise


Periodicity Actions

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
taskId string Identifier of the periodicity on which the action will be carried out

activate()

This invoke a request to OpenGate North API and the callback is managed by promises This function active periodicity of an operation

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.newPeriodicityActions("xxxxx-xxx-xxxx-xxxxx").activate()

cancel()

This invoke a request to OpenGate North API and the callback is managed by promises This function cancel a periodicity

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.periodicityActions("xxxxx-xxx-xxxx-xxxxx").cancelPeriodicity();

pause()

This invoke a request to OpenGate North API and the callback is managed by promises This function pauses a periodicity

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.periodicityActions("xxxxx-xxx-xxxx-xxxxx").pausePeriodicity()