org.ow2.clif.console.lib.egui.editor
Class TestPlanMasterEditPage

java.lang.Object
  extended by org.eclipse.ui.forms.MasterDetailsBlock
      extended by org.ow2.clif.console.lib.egui.editor.TestPlanMasterEditPage
All Implemented Interfaces:
java.util.Observer

public class TestPlanMasterEditPage
extends org.eclipse.ui.forms.MasterDetailsBlock
implements java.util.Observer

Injector and probe Master view in Master/Details pattern.

Author:
Manuel AZEMA, Joan Chaumont, Bruno Dillenseger

Field Summary
 
Fields inherited from class org.eclipse.ui.forms.MasterDetailsBlock
detailsPart, sashForm
 
Constructor Summary
TestPlanMasterEditPage(org.eclipse.ui.forms.editor.FormPage page, java.util.Map<java.lang.String,ClifDeployDefinition> testPlan, java.io.File clifPropsFile)
          Create a Master/Detail pattern manager for test plan edition.
 
Method Summary
protected  void createMasterPart(org.eclipse.ui.forms.IManagedForm managedForm, org.eclipse.swt.widgets.Composite parent)
          Create Master Part in Master/Detail pattern.
protected  void createToolBarActions(org.eclipse.ui.forms.IManagedForm managedForm)
          Add 2 actions in the tool bar Horizontal orientation Vertical orientation
 TestPlanVisualDisplay getTableBlade()
          Get table blade
 TestPlanObservable getTestPlan()
          Get observable test plan.
 boolean hasChanged()
          Return true if a modification has been made in edit page
 boolean isEditable()
          Test if edit page is editable
 java.lang.String modifyBlade(java.lang.String bladeId, java.lang.String newBladeId, java.lang.String serverName, java.lang.String bClass, java.lang.String argument, java.lang.String comment, boolean isProbe)
          Modify a blade.
 void refresh()
          Refresh test plan display.createPageEdition
protected  void registerPages(org.eclipse.ui.forms.DetailsPart detailsPart)
          Register injectors and probes details page.
 void setChanged(boolean b)
          Set the changed boolean to true if edit page has changed
 void setDirty(boolean isDirty)
          Change editor dirty state.
 void setEditable(boolean isEditable)
          True if the editor is editable.
 void update(java.util.Observable o, java.lang.Object arg)
          Update the edit page when a change has been done in the test plan.
 void updateClifProperties()
           
 
Methods inherited from class org.eclipse.ui.forms.MasterDetailsBlock
createContent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestPlanMasterEditPage

public TestPlanMasterEditPage(org.eclipse.ui.forms.editor.FormPage page,
                              java.util.Map<java.lang.String,ClifDeployDefinition> testPlan,
                              java.io.File clifPropsFile)
Create a Master/Detail pattern manager for test plan edition.

Parameters:
page - the page manage by this pattern
testPlan - the test plan to edit
Method Detail

createMasterPart

protected void createMasterPart(org.eclipse.ui.forms.IManagedForm managedForm,
                                org.eclipse.swt.widgets.Composite parent)
Create Master Part in Master/Detail pattern. Create a table with an injectors and blades list.

Specified by:
createMasterPart in class org.eclipse.ui.forms.MasterDetailsBlock
Parameters:
managedForm - the parent form
parent - the parent composite

createToolBarActions

protected void createToolBarActions(org.eclipse.ui.forms.IManagedForm managedForm)
Add 2 actions in the tool bar

Specified by:
createToolBarActions in class org.eclipse.ui.forms.MasterDetailsBlock

registerPages

protected void registerPages(org.eclipse.ui.forms.DetailsPart detailsPart)
Register injectors and probes details page.

Specified by:
registerPages in class org.eclipse.ui.forms.MasterDetailsBlock
Parameters:
detailsPart - the details part

setEditable

public void setEditable(boolean isEditable)
True if the editor is editable.

Parameters:
isEditable - true if the editor is editable

isEditable

public boolean isEditable()
Test if edit page is editable

Returns:
boolean true if the test plan is editable

getTestPlan

public TestPlanObservable getTestPlan()
Get observable test plan.

Returns:
TestPlanObservable test plan

getTableBlade

public TestPlanVisualDisplay getTableBlade()
Get table blade

Returns:
Returns the tableBlade.

setChanged

public void setChanged(boolean b)
Set the changed boolean to true if edit page has changed

Parameters:
b -

hasChanged

public boolean hasChanged()
Return true if a modification has been made in edit page

Returns:
boolean

setDirty

public void setDirty(boolean isDirty)
Change editor dirty state. If true, editor needs to be saved.

Parameters:
isDirty - the dirty state

refresh

public void refresh()
Refresh test plan display.createPageEdition


modifyBlade

public java.lang.String modifyBlade(java.lang.String bladeId,
                                    java.lang.String newBladeId,
                                    java.lang.String serverName,
                                    java.lang.String bClass,
                                    java.lang.String argument,
                                    java.lang.String comment,
                                    boolean isProbe)
                             throws ExistingBladeIdException,
                                    BadBladePropertiesException
Modify a blade. Args are blade's id to modify and the new properties.

Parameters:
bladeId - actual blade id
newBladeId - new blade id (can be the same)
serverName -
bClass -
argument -
comment -
isProbe -
Returns:
the new blade id
Throws:
ExistingBladeIdException
BadBladePropertiesException

updateClifProperties

public void updateClifProperties()

update

public void update(java.util.Observable o,
                   java.lang.Object arg)
Update the edit page when a change has been done in the test plan.

Specified by:
update in interface java.util.Observer