All Packages Class Hierarchy This Package Previous Next Index
Interface com.sun.wizards.core.WizardState
- public interface WizardState
WizardState is an interface for the object responsible
for maintaining data on the server side, and serving
WizardConsole requests.
There is one WizardState object for each wizard. In
a wizard hierarchy (an arrangement in which one wizard
calls on the services of another wizard), the WizardState
objects create a tree structure with a single WizardState
as the root.
Implementations of the WizardState interface include
com.sun.wizards.core.GenericWizardState and
com.sun.wizards.rmi.GenericRemoteWizardState.
-
addChild(String)
- Add a child description to the wizard archive.
-
addChildObject(String, ServerObject)
- Add a child object to this WizardState.
-
addSequence(String, Sequence)
- Add a named sequence of server-side tasks to the
WizardState.
-
callClientObjectMethod(Route, String, String[], Object[])
- Call a method on the client.
-
callServerObjectMethod(Route, String, String[], Object[])
- Call a method on the server.
-
clientIsExiting(int)
- This method is called when the client is exiting.
-
closeNamedResourceStream(String)
- Close the archive stream associated with the specified name.
-
exit(int)
- Requests the server VM to exit with the specified exit code.
-
getAllChildrenRoutes()
- Returns routes to all wizard states that are children of this
wizard state.
-
getArchiveFilename()
- Get the archive filename.
-
getArchivePath()
- This method returns path to the class archive containing this state.
-
getChildObject(String)
- This method returns the named child object of this WizardState.
-
getChildren()
- Get all child states.
-
getChildStateRoute(Route, String)
- Get the route for a child WizardState.
-
getChildWizardState(Route, String)
- This method returns the named child WizardState.
-
getData(Route, String)
- Returns the data stored under the specified id in
the WizardState object identified by the specified
route.
Deprecated.
-
getData(String)
- Returns the data stored under the specified id in
this WizardState object.
-
getDesktopService()
- Get the Desktop service.
-
getInitializeStatus()
- Returns the initialize status.
-
getLogService()
- Get the log service.
-
getName()
- This method gets the name of this WizardState.
-
getNamedResource(Route, String, String)
- This method returns the bytes of the named resource of the
specified type.
-
getNamedResourceStream(String)
- Get the archive stream associated with the specified name.
-
getParent()
- This method gets the parent of this WizardState.
-
getProgressLabels(String, String, Vector)
- Get the progress labels from states with the specified purpose
for the progress panel with the specified name.
-
getPurpose()
- This method gets the purpose of this WizardState.
-
getRegistryService()
- Get the registry service.
-
getRootWizardState()
-
This method returns the root of the WizardState
tree.
-
getRoute(Route)
- Get the server side route for this WizardState.
-
getRuntimeResources()
- Get the runtime classes required by this WizardState.
-
getSelectedChildren(Class)
- This method returns a list of selected children.
-
getSelectedChildrenRoutes(String)
- Returns routes to selected wizards that are children of
this wizard and having the specified purpose.
-
getSequence(String)
- Get a named sequence of server-side tasks from the
WizardState.
-
getSerializedData()
- Get the data that represents a serialized version of this
WizardState.
-
getWizardState(Route)
- Get the GenericWizardState identified by the specified
route.
-
getWizardTree(Route, String)
- Get the data representing a client subtree.
-
hasGUI()
- This method returns GUI mode (true for a graphical user interface)
-
hasInitialized()
- Returns true if the WizardState has been completely
initialized; false otherwise.
-
isBusy()
- Returns true if this WizardState object is busy initializing or
performing a Sequence.
-
performSequence(Route, String, boolean, String)
- Perform the specified sequence of tasks.
-
registerTempFile(String)
- Register a temporary file that will be removed when the wizard
exits.
-
removeChildWizardState(String)
- This method removes the named child.
-
removeTempFile(String)
- Remove the specified temporary file now.
-
resumeSequence()
- Resume the sequence that is currently being performed or reversed.
-
reverseSequence(Route, String, boolean, String)
- Reverse the specified sequence of tasks.
-
setChildren(Vector)
- Set all child states.
-
setData(Route, String, Object)
- This method sets data into the WizardState identified
by the specified route object.
Deprecated.
-
setData(String, Object)
- This method sets data into the WizardState.
-
setName(String)
- This method sets the name of this WizardState.
-
setParent(WizardState)
- This method sets the parent of this WizardState.
-
setProgressLabel(String, Msg)
- Sets a progress label for this this state.
-
setPurpose(String)
- This method sets the purpose of this WizardState.
-
setSelectedChildren(Vector)
- This method sets this WizardState's selected children.
-
setSequenceProgress(Route, int)
- Set the progress of the current sequence.
-
setSequenceProgress(WizardState, String, Route, int[])
- Propogate the progress up to the highest level WizardState that
has the specified purpose.
-
setWizardState(DataInput)
- Set up this WizardState from the specified input stream.
-
suspendSequence()
- Suspend the sequence that is currently being performed or reversed.
exit
public abstract void exit(int exitStatus)
- Requests the server VM to exit with the specified exit code.
This call results in the wizard client being notified of the
exit request.
- Parameters:
- exitStatus - The exit code.
clientIsExiting
public abstract void clientIsExiting(int exitStatus)
- This method is called when the client is exiting. The
result of this call is the server VM exits with the specified
exit code.
- Parameters:
- exitStatus - The exit code.
isBusy
public abstract boolean isBusy()
- Returns true if this WizardState object is busy initializing or
performing a Sequence.
setName
public abstract void setName(String name)
- This method sets the name of this WizardState.
- Parameters:
- name - The new name for this WizardState.
getName
public abstract String getName()
- This method gets the name of this WizardState.
- Returns:
- The name of this WizardState.
setPurpose
public abstract void setPurpose(String purpose)
- This method sets the purpose of this WizardState.
The purpose is an indication of what the WizardState
can do, and is used for grouping WizardStates within
a tree.
- Parameters:
- purpose - The purpose of this WizardState.
getPurpose
public abstract String getPurpose()
- This method gets the purpose of this WizardState.
- Returns:
- The purpose of this WizardState.
hasGUI
public abstract boolean hasGUI()
- This method returns GUI mode (true for a graphical user interface)
- Returns:
- presence or not of Graphic User Interface, true for GUI
hasInitialized
public abstract boolean hasInitialized()
- Returns true if the WizardState has been completely
initialized; false otherwise.
setParent
public abstract void setParent(WizardState parent)
- This method sets the parent of this WizardState.
- Parameters:
- parent - The new parent for this WizardState.
getParent
public abstract WizardState getParent()
- This method gets the parent of this WizardState.
- Returns:
- The parent of this WizardState.
getSelectedChildren
public abstract Vector getSelectedChildren(Class returnClass)
- This method returns a list of selected children. The
vetor that is returned will have entries of the specified
class.
Supported classes include WizardState and String. If
String is specified, the list of children will be specified
by WizardState name.
- Parameters:
- returnClass - The requested class of the list entries.
- Returns:
- The currently selected children.
setSelectedChildren
public abstract void setSelectedChildren(Vector selectedChildren)
- This method sets this WizardState's selected children.
- Parameters:
- selectedChildren - The children to be selected.
setData
public abstract void setData(Route route,
String id,
Object value)
- Note: setData() is deprecated.
You should now use setData(String, Object)
- This method sets data into the WizardState identified
by the specified route object. The data objects should
implement the Serializable interface if the data will be
saved in a wizard archive and be retrieved at runtime.
All data being set into the WizardState from the client
must be Serializable.
- Parameters:
- route - The route to the correct WizardState.
- id - The data identification. This value
will be used to retrieve the data.
- value - The data to be saved.
setData
public abstract void setData(String id,
Object value)
- This method sets data into the WizardState. The data
objects should implement the Serializable interface if
the data will be saved in a wizard archive and be
retrieved at runtime. All data being set into the
WizardState from the client must be Serializable.
- Parameters:
- id - The data identification. This value
will be used to retrieve the data.
- value - The data to be saved.
getData
public abstract Object getData(Route route,
String id)
- Note: getData() is deprecated.
You should now use getData(String)
- Returns the data stored under the specified id in
the WizardState object identified by the specified
route.
- Parameters:
- route - The route to the correct WizardState.
- id - The data identification.
- Returns:
- The requested data, or null if the requested
data has not been set.
getData
public abstract Object getData(String id)
- Returns the data stored under the specified id in
this WizardState object.
- Parameters:
- id - The data identification.
- Returns:
- The requested data, or null if the requested
data has not been set.
getProgressLabels
public abstract Vector getProgressLabels(String purpose,
String panelName,
Vector childLabels)
- Get the progress labels from states with the specified purpose
for the progress panel with the specified name.
- Parameters:
- purpose - The purpose of the wizard state.
- progressKey - The key that the progress panel will use to request the
label.
- childLabels - This should be null.
- Returns:
- A vector containing all of the progress label strings.
setProgressLabel
public abstract void setProgressLabel(String progressKey,
Msg label)
- Sets a progress label for this this state. The progress label
is indexed by the name of the panel that will request it.
- Parameters:
- progressKey - The key that the progress panel will use to request the
label.
- labelText - The text for the specified progress bar.
getRootWizardState
public abstract WizardState getRootWizardState()
- This method returns the root of the WizardState
tree.
- Returns:
- The root WizardState
getWizardState
public abstract WizardState getWizardState(Route route)
- Get the GenericWizardState identified by the specified
route.
- Parameters:
- route - The route to the desired GenericWizardState.
- Returns:
- The desired WizardState.
getRoute
public abstract Route getRoute(Route routeInProgress)
- Get the server side route for this WizardState.
- Parameters:
- routeInProgress - This method should be called with
routeInProgress = null.
- Returns:
- The route for this WizardState.
getChildStateRoute
public abstract Route getChildStateRoute(Route route,
String childName)
- Get the route for a child WizardState.
- Parameters:
- route - The route to the parent of the desired
WizardState.
- childName - The name of the desired child.
- Returns:
- The route to the desired WizardState.
getChildWizardState
public abstract WizardState getChildWizardState(Route route,
String name)
- This method returns the named child WizardState.
- Parameters:
- route - The route to the parent WizardState.
- name - The name of the desired WizardState.
- Returns:
- The desired WizardState, or null if
the named WizardState does not exist.
removeChildWizardState
public abstract void removeChildWizardState(String name)
- This method removes the named child.
- Parameters:
- name - The name of the WizardState child to remove.
getChildObject
public abstract Object getChildObject(String name)
- This method returns the named child object of this WizardState.
- Parameters:
- name - The name of the desired WizardState.
- Returns:
- The desired WizardState, or null if
the named WizardState does not exist.
getArchivePath
public abstract String getArchivePath()
- This method returns path to the class archive containing this state.
- Returns:
- Path to the class archive containing this state
getArchiveFilename
public abstract String getArchiveFilename()
- Get the archive filename.
- Returns:
- The filename of this archive, including the path.
getAllChildrenRoutes
public abstract Route[] getAllChildrenRoutes()
- Returns routes to all wizard states that are children of this
wizard state.
getSelectedChildrenRoutes
public abstract Route[] getSelectedChildrenRoutes(String purpose)
- Returns routes to selected wizards that are children of
this wizard and having the specified purpose.
- Parameters:
- purpose - The purpose of the desired WizardStates.
getSerializedData
public abstract byte[] getSerializedData()
- Get the data that represents a serialized version of this
WizardState.
- Returns:
- The byte array representing the serialization of
this WizardState.
getInitializeStatus
public abstract int getInitializeStatus()
- Returns the initialize status. The value returned is a
mask that reports the completion status of the various
stages of WizardState initialization.
setWizardState
public abstract void setWizardState(DataInput in)
- Set up this WizardState from the specified input stream.
- Parameters:
- in - The input stream describing the desired state
of this WizardState.
addChild
public abstract void addChild(String relativePath)
- Add a child description to the wizard archive. At execution time,
if the child is found at the specified relative path, it will be
available to the server and client associated with this wizard.
- Parameters:
- relativePath - The relative path to the child archive.
addChildObject
public abstract void addChildObject(String name,
ServerObject childObject)
- Add a child object to this WizardState. The child object MUST be
Serializable.
- Parameters:
- name - The name of the object.
- childObject - The object to add as a child to this WizardState.
getChildren
public abstract Vector getChildren()
- Get all child states.
- Returns:
- All children of this wizard state.
setChildren
public abstract void setChildren(Vector childWizardStates)
- Set all child states.
- Parameters:
- childWizardStates - All children of this wizard state.
getWizardTree
public abstract byte[] getWizardTree(Route route,
String subtreeName)
- Get the data representing a client subtree.
- Parameters:
- route - The route to the responsible
WizardState.
- subtreeName - The name of the subtree, or null
for the entire client tree.
- Returns:
- The data representing the client tree.
getNamedResource
public abstract byte[] getNamedResource(Route route,
String type,
String name)
- This method returns the bytes of the named resource of the
specified type.
- Parameters:
- route - The route to the correct WizardState.
- type - The type of resource.
- name - The name of the resource.
- Returns:
- The byte array representing the requested resource.
getNamedResourceStream
public abstract ResourceSection getNamedResourceStream(String name)
- Get the archive stream associated with the specified name.
- Parameters:
- name - The name of the desired resource.
- Returns:
- An object representing the desired resource section.
closeNamedResourceStream
public abstract void closeNamedResourceStream(String name)
- Close the archive stream associated with the specified name.
- Parameters:
- name - The name of the resource used to open the stream.
addSequence
public abstract void addSequence(String sequenceName,
Sequence sequence)
- Add a named sequence of server-side tasks to the
WizardState.
- Parameters:
- sequenceName - The name that will be used to reference
this sequence at runtime.
- sequence - The sequence of tasks that will be
performed at runtime.
getSequence
public abstract Sequence getSequence(String sequenceName)
- Get a named sequence of server-side tasks from the
WizardState.
- Parameters:
- sequenceName - The name of the desired sequence.
- Returns:
- The desired sequence, or null if the sequence has
not been added to this WizardState.
performSequence
public abstract void performSequence(Route route,
String sequenceName,
boolean waitForCompletion,
String sequenceCompleteMethod)
- Perform the specified sequence of tasks. Unless the waitForCompletion
flag is set to true, this method will return immediately.
- Parameters:
- route - The route back to the client object that
monitors the sequence.
- sequenceName - The name of the sequence to perform.
- waitForCompletion - If true, this method will not return until the
sequence has completed.
- sequenceCompleteMethod - The name of the client panel method that
should be called when the sequence has
completed.
reverseSequence
public abstract void reverseSequence(Route route,
String sequenceName,
boolean waitForCompletion,
String sequenceCompleteMethod)
- Reverse the specified sequence of tasks. Unless the waitForCompletion flag
is set to true, this method will return immediately.
- Parameters:
- route - The route back to the client object that
monitors the sequence.
- sequenceName - The name of the sequence to reverse.
- waitForCompletion - If true, this method will not return until the
sequence has completed.
- sequenceCompleteMethod - The name of the client panel method that
should be called when the sequence has
completed.
setSequenceProgress
public abstract void setSequenceProgress(Route sequenceRoute,
int progress)
- Set the progress of the current sequence.
- Parameters:
- sequenceRoute - The route to the calling object.
- progress - The progress of the current sequence.
setSequenceProgress
public abstract void setSequenceProgress(WizardState childState,
String purpose,
Route progressRoute,
int progress[])
- Propogate the progress up to the highest level WizardState that
has the specified purpose.
- Parameters:
- childState - The child WizardState object.
- purpose - The WizardState purpose.
- route - The route to the progress panel.
- progress - The progress, measured from 0 to 100.
suspendSequence
public abstract void suspendSequence()
- Suspend the sequence that is currently being performed or reversed.
resumeSequence
public abstract void resumeSequence()
- Resume the sequence that is currently being performed or reversed.
registerTempFile
public abstract void registerTempFile(String filename)
- Register a temporary file that will be removed when the wizard
exits.
- Parameters:
- filename - The absolute path to the file to be removed.
removeTempFile
public abstract void removeTempFile(String filename)
- Remove the specified temporary file now.
- Parameters:
- filename - The absolute path to the temporary file to be removed.
getRuntimeResources
public abstract Vector getRuntimeResources()
- Get the runtime classes required by this WizardState.
callClientObjectMethod
public abstract void callClientObjectMethod(Route route,
String methodName,
String argTypes[],
Object args[])
- Call a method on the client. The method is sent to the correct object
in the Wizard client tree via the specified route object. If the route
is null, the method is called on the WizardTreeManager, which manages
the client objects.
- Parameters:
- route - The route to the desired client object.
- methodName - The name of the method to call.
- argTypes - The parameter list identifying the
correct method.
- args - The parameters to pass to the method.
callServerObjectMethod
public abstract Object callServerObjectMethod(Route route,
String methodName,
String argTypes[],
Object args[])
- Call a method on the server. The method is sent to the correct object
in the Wizard state tree via the specified route object.
- Parameters:
- route - The route to the desired server object.
- methodName - The name of the method to call.
- argTypes - The parameter list identifying the
correct method.
- args - The parameters to pass to the method.
- Returns:
- The method return value.
getRegistryService
public abstract RegistryService getRegistryService()
- Get the registry service.
getLogService
public abstract LogService getLogService()
- Get the log service.
getDesktopService
public abstract DesktopService getDesktopService()
- Get the Desktop service.
All Packages Class Hierarchy This Package Previous Next Index