public class Workshop extends RefTable
| Modifier and Type | Method and Description |
|---|---|
Trace |
appTrace()
Obtain the application trace object for the workshop.
|
void |
getObject(String ref,
ArgRunnable handler)
Fetch an object from the repository.
|
void |
getObject(String ref,
String collection,
ArgRunnable handler)
Fetch an object from a particular collection in the repository.
|
void |
putObject(String ref,
Encodable object)
Store an object into the repository.
|
void |
putObject(String ref,
Encodable object,
ArgRunnable resultHandler)
Store an object into the repository with results notification.
|
void |
putObject(String ref,
Encodable object,
String collection,
ArgRunnable resultHandler)
Store an object into a particular collection in the repository with
results notification.
|
void |
queryObjects(JSONObject query,
int maxResults,
ArgRunnable handler)
Query the repository.
|
void |
queryObjects(JSONObject query,
String collection,
int maxResults,
ArgRunnable handler)
Query a particular collection in the repository.
|
void |
removeObject(String ref)
Delete an object from the repository.
|
void |
updateObject(String ref,
int version,
Encodable object,
ArgRunnable resultHandler)
Update the state of an object in the repository.
|
void |
updateObject(String ref,
int version,
Encodable object,
String collection,
ArgRunnable resultHandler)
Update the state of an object in some collection in the repository.
|
public Trace appTrace()
public void getObject(String ref, ArgRunnable handler)
ref - The ref of the object desired.handler - Callback that will be invoked with the object in
question, or null if the object was not available.public void getObject(String ref, String collection, ArgRunnable handler)
ref - The ref of the object desired.collection - The name of the collection to use.handler - Callback that will be invoked with the object in
question, or null if the object was not available.public void queryObjects(JSONObject query, int maxResults, ArgRunnable handler)
query - JSON object containing a MongoDB query structure.maxResults - Maximum number of result objects acceptable; a value
of 0 means no limit.handler - Callback that will be invoked with a results array, or
null if the query failed.public void queryObjects(JSONObject query, String collection, int maxResults, ArgRunnable handler)
query - JSON object containing a MongoDB query structure.collection - The collection to use.maxResults - Maximum number of result objects acceptable; a value
of 0 means no limit.handler - Callback that will be invoked with a results array, or
null if the query failed.public void putObject(String ref, Encodable object)
ref - Ref of the object to write.object - The object itself.public void putObject(String ref, Encodable object, ArgRunnable resultHandler)
ref - Ref of the object to write.object - The object itself.resultHandler - Handler that wil be invoked with the result of
the operation; the result will be null if the operation suceeded, or
an error string if the operation failed.public void putObject(String ref, Encodable object, String collection, ArgRunnable resultHandler)
ref - Ref of the object to write.object - The object itself.collection - The name of the collection to use.resultHandler - Handler that wil be invoked with the result of
the operation; the result will be null if the operation suceeded, or
an error string if the operation failed.public void updateObject(String ref, int version, Encodable object, ArgRunnable resultHandler)
ref - Ref of the object to write.version - Version number of the instance being replacedobject - The object itself.resultHandler - Handler that wil be invoked with the result of
the operation; the result will be null if the operation suceeded, or
an error string if the operation failed.public void updateObject(String ref, int version, Encodable object, String collection, ArgRunnable resultHandler)
ref - Ref of the object to write.version - Version number of the instance being replacedobject - The object itself.collection - The collection to use.resultHandler - Handler that wil be invoked with the result of
the operation; the result will be null if the operation suceeded, or
an error string if the operation failed.public void removeObject(String ref)
ref - The ref of the object to be deleted.Copyright © 2017. All rights reserved.