org.ow2.clif.console.lib.egui.wizards.clifProject
Class InteractionManager

java.lang.Object
  extended by org.ow2.clif.console.lib.egui.wizards.clifProject.InteractionManager

public class InteractionManager
extends java.lang.Object

Class used by wizard and properties pages. Since there are many common features between wizard and properties pages, this class grouped them. If offers the possibility of creating and initializing controls, checking whether the pages are filled correctly, returning filled fields, writing CLIF properties files and applying changes.

Author:
Florian Francheteau, Bruno Dillenseger

Constructor Summary
InteractionManager(org.eclipse.jface.preference.PreferencePage page, org.eclipse.core.resources.IProject project)
          Constructor for a properties page
InteractionManager(org.eclipse.jface.wizard.WizardPage page, org.eclipse.core.resources.IProject project)
          Constructor for a wizard page
 
Method Summary
 void apply()
          Applies all modifications on CLIF properties files.
 void catchException(java.lang.Exception e)
          Open a message error dialog to user, block plug-in activity in setting valid page to false and close the shell.
 org.eclipse.swt.widgets.Composite createAdvancedContents(org.eclipse.swt.widgets.Composite parent)
          Creates contents of advanced page
 org.eclipse.swt.widgets.Composite createCustomContents(org.eclipse.swt.widgets.Composite parent)
          Creates contents of custom properties page
 org.eclipse.swt.widgets.Composite createDeploymentContents(org.eclipse.swt.widgets.Composite parent)
          Creates contents of deployment page
 org.eclipse.swt.widgets.Composite createISACContents(org.eclipse.swt.widgets.Composite parent)
          Creates contents of ISAC page
 org.eclipse.swt.widgets.Composite createJVMContents(org.eclipse.swt.widgets.Composite parent)
          Creates contents of JVM page
 org.eclipse.swt.widgets.Composite createMainContents(org.eclipse.swt.widgets.Composite parent)
          Creates contents of main page
 void deploymentDialogChanged()
          Ensures that both deployment text fields are correctly filled.
 java.lang.String getClasses()
          Return all classes repository set in the list of classes separated by a ";"
 java.lang.String getCodeServerHost()
           
 java.lang.String getCodeServerPort()
           
 java.lang.String[] getCustomProperties()
           
 java.lang.String getFileStorageDelay()
           
 java.lang.String getFileStorageHost()
           
 java.lang.String getFileStorageMaxPending()
           
 java.lang.String getGroupPeriod()
           
 boolean getInitialized()
           
 java.lang.String getIsacThread()
           
 java.lang.String getJobDelay()
           
 java.lang.String getJonathanHost()
           
 java.lang.String getRegistryHost()
           
 java.lang.String getRegistryPort()
           
 java.lang.String getReportDir()
           
 java.lang.String getSchedulerPeriod()
           
 java.lang.String getStatsDir()
           
 java.lang.String getXms()
           
 java.lang.String getXmx()
           
 void initialize()
          Initializes all properties by reading clif.props file.
 void initializeAdvanced()
          Initializes contents of advanced page
 void initializeCustom()
          Initializes contents of custom properties page
 void initializeDeployment()
          Initializes contents of deployment page
 void initializeISACParam()
          Initializes contents of ISAC page
 void initializeJVMParam()
          Initializes contents of JVM page
 void initializeMainContents()
          Initializes contents of main page
 void initializeStatsReportText(org.eclipse.core.runtime.IPath projectPath)
          Initialize values for report and stats directories
 void setInitialized(boolean init)
           
 void setProject(org.eclipse.core.resources.IProject project)
          set Project and fill initClasses
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InteractionManager

public InteractionManager(org.eclipse.jface.wizard.WizardPage page,
                          org.eclipse.core.resources.IProject project)
Constructor for a wizard page

Parameters:
page - the wizard page
project - the project created

InteractionManager

public InteractionManager(org.eclipse.jface.preference.PreferencePage page,
                          org.eclipse.core.resources.IProject project)
Constructor for a properties page

Parameters:
page - the properties page
project - the project where user wants to check or change properties
Method Detail

createMainContents

public org.eclipse.swt.widgets.Composite createMainContents(org.eclipse.swt.widgets.Composite parent)
Creates contents of main page


initializeMainContents

public void initializeMainContents()
Initializes contents of main page


initializeStatsReportText

public void initializeStatsReportText(org.eclipse.core.runtime.IPath projectPath)
Initialize values for report and stats directories

Parameters:
projectPath - path of the project containing those values

getReportDir

public java.lang.String getReportDir()

getStatsDir

public java.lang.String getStatsDir()

createCustomContents

public org.eclipse.swt.widgets.Composite createCustomContents(org.eclipse.swt.widgets.Composite parent)
Creates contents of custom properties page

Returns:
the custom properties page Composite

initializeCustom

public void initializeCustom()
Initializes contents of custom properties page


getCustomProperties

public java.lang.String[] getCustomProperties()
Returns:
list of system properties in the form prop=value

createAdvancedContents

public org.eclipse.swt.widgets.Composite createAdvancedContents(org.eclipse.swt.widgets.Composite parent)
Creates contents of advanced page


initializeAdvanced

public void initializeAdvanced()
Initializes contents of advanced page


getFileStorageDelay

public java.lang.String getFileStorageDelay()

getFileStorageMaxPending

public java.lang.String getFileStorageMaxPending()

getJonathanHost

public java.lang.String getJonathanHost()

getFileStorageHost

public java.lang.String getFileStorageHost()

createJVMContents

public org.eclipse.swt.widgets.Composite createJVMContents(org.eclipse.swt.widgets.Composite parent)
Creates contents of JVM page


initializeJVMParam

public void initializeJVMParam()
Initializes contents of JVM page


getXms

public java.lang.String getXms()

getXmx

public java.lang.String getXmx()

createISACContents

public org.eclipse.swt.widgets.Composite createISACContents(org.eclipse.swt.widgets.Composite parent)
Creates contents of ISAC page


initializeISACParam

public void initializeISACParam()
Initializes contents of ISAC page


getIsacThread

public java.lang.String getIsacThread()

getGroupPeriod

public java.lang.String getGroupPeriod()

getSchedulerPeriod

public java.lang.String getSchedulerPeriod()

getJobDelay

public java.lang.String getJobDelay()

createDeploymentContents

public org.eclipse.swt.widgets.Composite createDeploymentContents(org.eclipse.swt.widgets.Composite parent)
Creates contents of deployment page


initializeDeployment

public void initializeDeployment()
Initializes contents of deployment page


deploymentDialogChanged

public void deploymentDialogChanged()
Ensures that both deployment text fields are correctly filled.


getRegistryHost

public java.lang.String getRegistryHost()

getCodeServerHost

public java.lang.String getCodeServerHost()

getClasses

public java.lang.String getClasses()
Return all classes repository set in the list of classes separated by a ";"

Returns:
list of classes

getCodeServerPort

public java.lang.String getCodeServerPort()

getRegistryPort

public java.lang.String getRegistryPort()

initialize

public void initialize()
Initializes all properties by reading clif.props file. The file used depends of the page type (wizard or properties page).


apply

public void apply()
Applies all modifications on CLIF properties files.


setProject

public void setProject(org.eclipse.core.resources.IProject project)
set Project and fill initClasses

Parameters:
project -

getInitialized

public boolean getInitialized()

setInitialized

public void setInitialized(boolean init)

catchException

public void catchException(java.lang.Exception e)
Open a message error dialog to user, block plug-in activity in setting valid page to false and close the shell.

Parameters:
e - Exception to catch