JSMA slice
Overview
The JSMA slice provides functionality for handling a slice
What can JSMA slice do for me?
You could use the JSMA slice to edit a slice
Index
Usage
writing data
Here is an example on how to write data to a JSMA slice:
... var text = request.parameter("text"); slice.commit(text); ...
reading data
Here is an example on how to read data from a JSMA slice:
... slice.name ...
Methods
The JSMA slice provides the following methods:
slice.commit(message)
Commits the slice with the given message
Example
... var message = 'this slice is finished'; slice.commit(message); ...
Parameter message:string (required)
The message for the commit of the slice.
slice.delete()
Deletes the slice
Example
... slice.delete(); ...
int slice.id
Returns the id of the slice
Example
... slice.id ...
string slice.name
Returns the name of the slice
Example
... slice.name ...
boolean slice.private
Returns the true if the slice is a private slice
Example
... if (slice.private === true) { // do something here } ...
slice.switch()
Sets the slice to the current one
Example
... var slice = slices.create({ name: message }); slice.switch(); ...
slice.update(options={})
Updates the slice
Example
... var message = 'this slice is updated'; slice.update({description : message}); ...
Parameter options:object (required)
The options for the update of the slice.