|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.waveset.object.AbstractLighthouseContext
com.waveset.workflow.LighthouseSimulator
A base implementation of LighthouseContext that throws exceptions for unimplemented methods, and stubs out others. Custom contexts may wish to subclass this rather than implement LighthouseContext to reduce the number of methods that need to be implemented.
Field Summary | |
static java.lang.String |
code_id
|
Fields inherited from interface com.waveset.object.LighthouseContext |
COMP_ACCESS_POLICY, COMP_AUTH_CACHE, COMP_LOGIN_CONFIG_INFO, COMP_PROVISIONER, COMP_RECONCILER, COMP_REPOSITORY, COMP_SUBJECT_AUTH_CACHE, COMP_TASK_MANAGER, COMP_WORKFLOW, OP_CACHE, OP_CACHE_TIMEOUT, OP_CLEAR_CACHE, OP_NO_RESULT |
Fields inherited from interface com.waveset.object.ObjectSource |
HIGH_VALUES, OP_ALLOW_NOT_FOUND, OP_ATTRIBUTES, OP_BLOCK_SIZE, OP_BUFFERED, OP_CONDITIONS, OP_END_BEFORE, OP_FAST, OP_FILTER, OP_FORCE, OP_KEEP_LOCK, OP_MAX_ROWS, OP_NO_CACHE, OP_NO_RULE_DRIVEN_MEMBERS, OP_ONLY_NAMES, OP_ORDER_BY, OP_START_AFTER, OP_SUBJECT, OP_SUBTYPES, OP_USER |
Constructor Summary | |
LighthouseSimulator()
Build a new empty context. |
|
LighthouseSimulator(java.lang.String path)
Build a context including data from the given file or directory. |
Method Summary | |
WavesetResult |
checkinObject(PersistentObject obj,
java.util.Map options)
Create a new object. |
WavesetResult |
checkinView(GenericObject view,
java.util.Map options)
Checkin a view. |
GenericObject |
checkoutView(java.lang.String id,
java.util.Map options)
Checkout a view. |
void |
clear()
Clear the contents of the simulator's "memory". |
WavesetResult |
commitView(GenericObject view,
java.util.Map options)
Commit a view. |
GenericObject |
createView(java.lang.String id,
java.util.Map options)
Create a view. |
void |
deleteObject(java.lang.Object type,
java.lang.String id,
java.util.Map options)
Delete an object. |
void |
dump(java.lang.String file)
Dump the current state of the context into a file. |
LighthouseContext |
getAuthenticatedContext(java.lang.String user)
Derive a context for a particular user. |
Form |
getForm(GenericObject view,
java.util.Map options)
Get the form to be used with a view. |
java.lang.String |
getUser()
Returns the effective user name for an authenticated context. |
GenericObject |
getView(java.lang.String id,
java.util.Map options)
Get a view. |
void |
load()
Load the context from the current working directory. |
void |
load(java.lang.String path)
Load objects from a file or directory. |
static void |
println(java.lang.Object msg)
|
GenericObject |
refreshView(GenericObject view,
java.util.Map options)
Refresh a view. |
void |
renameObject(java.lang.Object type,
java.lang.String id,
java.lang.String newName,
java.util.Map options)
Rename an object. |
void |
setNewDirectory(java.lang.String path)
Set the directory used for the creation of new objects. |
void |
setReadOnly(boolean b)
|
void |
setTrace(boolean b)
|
void |
setUser(java.lang.String s)
Change the effective user for logical locking. |
void |
unlockView(GenericObject view,
java.util.Map options)
Unlock a view. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String code_id
Constructor Detail |
public LighthouseSimulator()
public LighthouseSimulator(java.lang.String path)
If the path is to a file, we will load the objects in that file, but write-through storage will not be available, the objects will persist only in memory.
Method Detail |
public void setReadOnly(boolean b)
public void setTrace(boolean b)
public void setUser(java.lang.String s)
LighthouseContext
setUser
in interface LighthouseContext
setUser
in class AbstractLighthouseContext
public static void println(java.lang.Object msg)
public void setNewDirectory(java.lang.String path)
public void clear()
public void load() throws WavesetException
WavesetException
public void load(java.lang.String path)
If the given path is to a directory, we will automatically load all files in that directory that contain a single object and enable write-through persistence. If you don't want write-through persistence, use setReadOnly().
The first directory you load will become the default directory for the storage of new objects. If you want new objects to be stored in a different directory, use setNewDirectory().
If the given path is to a file, and the file contains a single object, the object is loaded and write-through persistence is enabled. If the file contains multiple objects, all objects in the file are loaded, but the write-through persistence will not be enabled for those objects.
public void dump(java.lang.String file) throws WavesetException
WavesetException
public java.lang.String getUser()
LighthouseContext
getUser
in interface LighthouseContext
getUser
in class AbstractLighthouseContext
public LighthouseContext getAuthenticatedContext(java.lang.String user)
getAuthenticatedContext
in interface LighthouseContext
getAuthenticatedContext
in class AbstractLighthouseContext
public WavesetResult checkinObject(PersistentObject obj, java.util.Map options) throws ItemNotFound, ItemNotLocked, LockedByAnother, WavesetException
checkinObject
in interface ObjectSource
checkinObject
in class AbstractLighthouseContext
ItemNotFound
ItemNotLocked
LockedByAnother
WavesetException
public void renameObject(java.lang.Object type, java.lang.String id, java.lang.String newName, java.util.Map options) throws ItemNotFound, LockedByAnother, AlreadyExists, WavesetException
The object must unlocked, or locked by the current user. It will be implicitly locked to perform the rename.
renameObject
in interface ObjectSource
renameObject
in class AbstractLighthouseContext
ItemNotFound
LockedByAnother
AlreadyExists
WavesetException
public void deleteObject(java.lang.Object type, java.lang.String id, java.util.Map options) throws ItemNotFound, LockedByAnother, WavesetException
The force flag may be set to bypass any constraint checking that the context implementation may perform.
deleteObject
in interface ObjectSource
deleteObject
in class AbstractLighthouseContext
ItemNotFound
LockedByAnother
WavesetException
public GenericObject getView(java.lang.String id, java.util.Map options) throws WavesetException
ObjectSource
getView
in interface ObjectSource
getView
in class AbstractLighthouseContext
WavesetException
public Form getForm(GenericObject view, java.util.Map options) throws WavesetException
ObjectSource
getForm
in interface ObjectSource
getForm
in class AbstractLighthouseContext
WavesetException
public GenericObject createView(java.lang.String id, java.util.Map options) throws WavesetException
ObjectSource
createView
in interface ObjectSource
createView
in class AbstractLighthouseContext
WavesetException
public GenericObject checkoutView(java.lang.String id, java.util.Map options) throws WavesetException
ObjectSource
checkoutView
in interface ObjectSource
checkoutView
in class AbstractLighthouseContext
WavesetException
public GenericObject refreshView(GenericObject view, java.util.Map options) throws WavesetException
ObjectSource
refreshView
in interface ObjectSource
refreshView
in class AbstractLighthouseContext
WavesetException
public WavesetResult checkinView(GenericObject view, java.util.Map options) throws WavesetException
ObjectSource
checkinView
in interface ObjectSource
checkinView
in class AbstractLighthouseContext
WavesetException
public WavesetResult commitView(GenericObject view, java.util.Map options) throws WavesetException
ObjectSource
commitView
in interface ObjectSource
commitView
in class AbstractLighthouseContext
WavesetException
public void unlockView(GenericObject view, java.util.Map options) throws WavesetException
ObjectSource
unlockView
in interface ObjectSource
unlockView
in class AbstractLighthouseContext
WavesetException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |