API Docs for: 1.3.12
Show:

EcCompetency Class

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

Methods

_delete

(
  • success
  • failure
  • repo
)

Deletes the competency from the server

TODO: Delete rollup rules?

Parameters:

  • success Callback1

    Callback triggered on successful deleting the competency

  • failure Callback1

    Callback triggered if error deleting the competency

  • repo EcRepository

    Repository to delete from and to check for levels or relationships to delete

addAlignment

(
  • target
  • alignmentType
  • owner
  • server
  • success
  • [failure]
)

Adds a new alignment on the server specified with this competency as its source and the specified target competency

Parameters:

  • target EcCompetency

    Competency to be related with

  • alignmentType String

    String defining the relationship type

  • owner EcPpk

    Private Key that will own the relationship created

  • server String

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

  • success Callback1

    Callback triggered after successfully creating and saving the relationship

  • [failure] Callback1 optional
                           Callback triggered if error creating and saving relationship

Returns:

EcAlignment Created relationship

addLevel

(
  • name
  • description
  • owner
  • server
  • success
  • failure
)

Adds a new level on the server specified for this competency.

Parameters:

  • name String

    Name of the new level to create

  • description String

    Description of the new level to create

  • owner String

    Private key of the owner of the new level

  • server String

    URL Prefix for the new level's ID (Server saved on)

  • success Callback1

    Callback triggered after successfully creating and saving the level

  • failure Callback1

    Callback triggered if an error creating and saving the level

Returns:

EcLevel Level created

addRollupRule

(
  • name
  • description
  • owner
  • server
  • success
  • failure
)

Adds a new rollup rule on the server specified for this competency

Parameters:

  • name String

    Name of the rollup rule to create

  • description String

    Description of the rollup rule to create

  • owner EcPpk

    Private key that will own the new rollup rule

  • server String

    URL Prefix for the new rollup rule's ID (Server that it will be saved on)

  • success Callback1

    Callback triggered if successfully save the rollup rule

  • failure Callback1

    Callback triggered fi error during save of rollup rule

Returns:

EcRollupRule Created rollup rule

get

(
  • id
  • success
  • failure
)
static

Retrieves a competency from it's server asynchronously

Parameters:

  • id String

    ID of the competency to retrieve from the server

  • success Callback1

    Callback triggered after retrieving the competency, returns the competency retrieved

  • failure Callback1

    Callback triggered if error retrieving competency

getBlocking

(
  • id
)
static

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

Parameters:

  • id String

    ID of the competency to retrieve

Returns:

EcCompetency The competency retrieved

levels

(
  • repo
  • success
  • failure
  • successAll
)

Searches the repository given for any levels of this competency

Parameters:

  • repo EcRepository

    Repository to search for levels

  • success Callback1

    Callback triggered for each level found

  • failure Callback1

    Callback triggered if an error finding levels

  • successAll Callback1>

    Callback triggered once all of the levels have been found

relations

(
  • repo
  • eachSuccess
  • failure
  • successAll
)

Searches the repository given for any relationships that contain this competency

Parameters:

  • repo EcRepository

    Repository to search for relationships

  • eachSuccess Callback1

    Callback triggered for each relationship found

  • failure Callback1

    Callback triggered if an error finding relationships

  • successAll Callback1>

    Callback triggered once all of the relationships have been found

relations

(
  • repo
  • eachSuccess
  • failure
  • successAll
)
deprecated

Searches the repository given for any relationships that contain this competency

Parameters:

  • repo EcRepository

    Repository to search for relationships

  • eachSuccess Callback1

    Callback triggered for each relationship found

  • failure Callback1

    Callback triggered if an error finding relationships

  • successAll Callback1>

    Callback triggered once all of the relationships have been found

rollupRules

(
  • repo
  • success
  • failure
  • successAll
)

Searches the repository given for any rollup rules of this competency

Parameters:

  • repo EcRepository

    Repository to search for levels

  • success Callback1

    Callback triggered for each rollup rule found

  • failure Callback1

    Callback triggered if an error finding rollup rule

  • successAll Callback1

    Callback triggered once all of the rollup rules have been found

save

(
  • success
  • failure
)

Saves the competency details to the server

Parameters:

  • success Callback1

    Callback triggered on successfully saving the competency

  • failure Callback1

    Callback triggered if error saving competency

setScope

(
  • scope
)

Method to set competency scope

Parameters:

  • scope String

    Scope to set for its competency