API Docs for: 1.3.12
Show:

EcLevel Class

Implementation of a Level object with methods for interacting with CASS services on a server.

Item Index

Methods

_delete

(
  • success
  • failure
)

Deletes the level from it's repository

Parameters:

  • success Callback1

    Callback triggered when the level is successfully deleted from the server

  • failure Callback1

    Callback triggered if an error occurs while deleting the level

addRelationship

(
  • targetLevel
  • alignmentType
  • identity
  • server
)

Adds a relationship between this level and a target level to define how they correspond to one another

Parameters:

  • targetLevel EcLevel

    Target level of the relationship

  • alignmentType String

    Type of relationship

  • identity EcPpk

    Private key that will own the new relationship

  • server String

    URL Prefix of the new relationship ID (Server it will be saved on)

get

(
  • id
  • success
  • failure
)
static

Retrieves a level from the server specified by its ID

Parameters:

  • id String

    ID of the level to retrieve

  • success Callback1

    Callback triggered when successfully retrieving the level, returns the level

  • failure Callback1

    Callback triggered if error occurs when retrieving the level

getBlocking

(
  • id
)
static

Retrieves a level from it's server synchronously, the call blocks until it is successful or an error occurs

Parameters:

  • id String

    ID of the level to retrieve

Returns:

EcLevel The level retrieved

save

(
  • success
  • failure
)

Saves this levels details to the server

Parameters:

  • success Callback1

    Callback triggered on successfully saving the level to the server

  • failure Callback1

    Callback triggered if error occurs while saving the level to the server

searchByCompetency

(
  • repo
  • competencyId
  • success
  • failure
  • paramObj
)
static

Searches for levels using a competency that the results must be related to

Parameters:

  • repo EcRepository

    Repository to search for levels

  • competencyId String

    competency ID that the levels are rleated to

  • success Callback1>

    Callback triggered when searches successfully

  • failure Callback1

    Callback triggered if an error occurs while searching

  • paramObj Object

    Search parameters object to pass in

setDescription

(
  • description
)

Method to set the description of the level

Parameters:

  • description String

    Description to set on the level

setName

(
  • name
)

Method to set the name of this level

Parameters:

  • name String

    Name to set on the level