commonj.connector.metadata.discovery.mutable
Interface ObjectWizardStep


public interface ObjectWizardStep

Represents one step in a set of steps required to create a new MetadataObject, modify an existing one, delete an existing one or perform an nonvisible operation on one. Each step maintains a reference to the wizard that created it. The wizard, in turn, maintains a reference to the MetadataObject instance it is working on, the operation that is being performed on it, and the MetadataConnection being used to communicate with the EIS. Each step is intended to make progress towards accomplishing the single operation indicated for its parent ObjectWizard. Each step defines actions the user may take to complete this step of the operation. Every step should define a cancel operation to backout of the operation.

The intended flow is: createProperties()
applyProperties(PropertyGroup)
canContinue()
canFinish()

Since:
1.0

Method Summary
 void applyProperties(PropertyGroup properties)
          Apply the properties that have been passed in.
 boolean canContinue()
          Returns a boolean indicating that the current object wizard step is complete and you can proceed to the next step.
 boolean canFinish()
          Returns a boolean indicating that the object wizard has completed its operation and any actions that can be performed are optional.
 PropertyGroup createProperties()
          Creates a new instance of the property group representing any properties needed at this step in the wizard.
 Action[] getActions()
          Deprecated. since 1.1 - use canFinish() or canContinue()
 String getDescription()
          Gets the description of the object wizard step.
 String getDisplayName()
          Gets the display name for the object wizard step.
 ObjectWizardStep getNextStep()
          Gets the next step.
 ObjectWizard getObjectWizard()
          Get the ObjectWizard that is the host for this step.
 ObjectWizardStep getPreviousStep()
          Gets the previous step.
 ObjectWizardStatus getStatus()
          Deprecated. since 1.1
 

Method Detail

getObjectWizard

ObjectWizard getObjectWizard()
Get the ObjectWizard that is the host for this step.

Returns:
ObjectWizard null must never be returned.

getStatus

ObjectWizardStatus getStatus()
Deprecated. since 1.1

Gets the status of the step.

Returns:
ObjectWizardStatus null must never be returned.

getPreviousStep

ObjectWizardStep getPreviousStep()
Gets the previous step. This function may return null only if this is the first step in the object wizard.

Returns:
getObjectWizardStep return null only if this is the first step.

getActions

Action[] getActions()
Deprecated. since 1.1 - use canFinish() or canContinue()

Returns an array of all action elements. This array must not be null and must contain at least two actions if the ObjectWizard status is not FINISH or CANCEL. These actions are the only means the tool user will have to cause the wizard to progress or to cancel the operation. If the status of the wizard is not FINISH or CANCEL, one of the actions returned must be of type Cancel and there must be one or more other actions to assist the user through the wizard.

It is recommended that the order in which the actions are returned be consistent. This will allow the tool to provide a consistent user experience as the user steps through the wizard.

If there are validation errors, the user may be returned to the same screen with error messages that are part of the properties of the step. These properties must be read only and will be displayed on the wizard.

Returns:
Actions[] List of all possible actions. must not be null and must contain at least two actions if the ObjectWizard status is not FINISH or CANCEL. If the ObjectWizard status is FINISH or CANCEL, return null.
See Also:
Action

createProperties

PropertyGroup createProperties()
Creates a new instance of the property group representing any properties needed at this step in the wizard. This function may return null. You need to have a subsequent call to applyProperties.

Returns:
PropertyGroup This may return null.
See Also:
applyProperties(PropertyGroup)

applyProperties

void applyProperties(PropertyGroup properties)
Apply the properties that have been passed in. To determine if an action on a given step is disabled or not, a call to the isDisabled() function on the Action object is made. This function determines if an action is disabled or not based upon the currently applied properties of the object wizard step. For optimal performance it is recommended that the tool apply the properties that will be modified by a user prior to displaying the step. By doing this, the call to apply properties is done only once and the isDisabled call determines the availability of an action based on the properties that were applied.

Parameters:
properties - A null must never be passed in.
See Also:
Action.isDisabled()

getDescription

String getDescription()
Gets the description of the object wizard step. This description may be used by the tool to render the wizard that steps the user through an operation on a node.

This is a locale specific object that must be separated to a ResourceBundle, translated, and retrieved using the locale of the tool environment.

Returns:
String This must never be null.
See Also:
ResourceBundle, MessageFormat

getDisplayName

String getDisplayName()
Gets the display name for the object wizard step. The display name may be used by tool to render the wizard that steps the user through an operation on a node.

This is a locale specific object that must be separated to a ResourceBundle, translated, and retrieved using the locale of the tool environment.

Returns:
String This must never be null.
See Also:
ResourceBundle, MessageFormat

canFinish

boolean canFinish()
Returns a boolean indicating that the object wizard has completed its operation and any actions that can be performed are optional.

This method must be called after applyProperties(PropertyGroup) and before getActions().

Returns:
true if the object wizard can finished, false otherwise
Since:
1.1

canContinue

boolean canContinue()
Returns a boolean indicating that the current object wizard step is complete and you can proceed to the next step.

This method must be called after applyProperties(PropertyGroup) and before getActions().

Returns:
true if the object wizard can proceed to the next step, false otherwise
Since:
1.1

getNextStep

ObjectWizardStep getNextStep()
Gets the next step. This function may return null only if this is the last step in the object wizard.

Returns:
getObjectWizardStep return null only if this is the last step.