Personal tools
You are here: Home CinnamonServer API Lifecycle API

Lifecycle API

The lifecycle API of Cinnamon

Working with lifecycles

Unless the command returns new information (like listLifeCycles or getNextState), it will return a success message like:

 <success>success.changed_state</success>

or a standard error message.

Generate a list of available lifecycles

Parameter
Description
command
listlifecycles
ticket
session ticket

With the listlifecycles command, you can ask the server for a list of all registered lifecycles.

Attach a lifecycle to an object

Parameter
Description
command
attachlifecycle
lifecycle_id id of the lifecycle you wish to attach
lifecycle_state_id
optional: the lifecycle state with which the lifecycle should start on this object
id
the ide of the OSD object
ticket
session ticket

Attaches a lifecycle to an object, starting with the default state (or the one specified by lifecycle_state_id).

Permission needed: WRITE_OBJECT_SYS_METADATA

Error messages: error.object.not_found, error.param.id, error.param.lifecycle_state_id, error.undefined.lifecycle_state, error.lifecycle_fail

Detach a lifecycle from an object

Parameter
Description
command
detachlifecycle
id
object from which you want to remove the lifecycle
ticket
session ticket

This completely removes the associated lifecycle from an object.

Permission needed: WRITE_OBJECT_SYS_METADATA

Error messages: error.object.not_found, error.param.id

Change lifecycle state of an object

Parameter
Description
command
changestate
id
id of the object whose lifecycle state you want to change
lifecycle_state_id
id of the new lifecycle state
ticket
session ticket

Calls exit() and enter() functions of the old and new lifecycle state classes, respectively. If no exception is thrown, sets the new state.

Permission needed: WRITE_OBJECT_SYS_METADATA

Error messages: error.object.not_found, error.param.id, error.param.lifecycle_state_id, error.lifecycle_fail

Fetch a list of allowed next-states

Parameter
Description
command
getnextstates
id id of the object for which the next states are to be listed
ticket
session ticket

Permission needed:  READ_OBJECT_SYS_METADATA

Document Actions