GWTApplication.client
Class FaultWorkAround

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Composite
              extended by GWTApplication.client.FaultDBForm
                  extended by GWTApplication.client.FaultAddition
                      extended by GWTApplication.client.FaultWorkAround
All Implemented Interfaces:
com.google.gwt.user.client.EventListener

 class FaultWorkAround
extends FaultAddition

This class will be used to generate a tab at the bottom of the fault modification form which will allow the user to attach to the fault the details of a workaround which he has entered. The class makes extensive use of the google web toolkit.

Version:
$Id: FaultWorkAround.java,v 1.7 2008/01/15 11:08:16 cb Exp $
Author:
Craige Bevil

Field Summary
private  Workaround CurrentWorkaroundDetails
          This contains the details of the current workaround if there is one entered into the database against the current fault.
 
Fields inherited from class GWTApplication.client.FaultAddition
EnteredBy, FaultAdditionTable, FaultAdditionText, FaultNumber, faultUpdateListener, TimeSpent, userAuthentication
 
Fields inherited from class GWTApplication.client.FaultDBForm
busyIndicator, internationalizationConstants, NOLENGTHCHECK, PrinterList, svc, UserAuthentication
 
Constructor Summary
FaultWorkAround(int FaultNumber, FaultServiceAsync svc, InternationalizationConstants internationalizationConstants, AuthenticationDetails userAuthentication, FaultUpdatedListener faultUpdateListener)
          Constructor for the fault workaround tab in the modify fault form
 
Method Summary
(package private)  void resetFormToDefaultValues()
          Reset the form to the values which are determined the default values which have been entered for the workaround by the user.
 void saveFormContentsToDatabase()
          Save the contents of the fault workaround to the database
(package private)  void setFormDefaultValues()
          This will be used to set the default values which are associated with the fault workaround.
 
Methods inherited from class GWTApplication.client.FaultDBForm
createEmailLink, fillListBoxWithCurrentInstruments, fillListBoxWithDutyTechnicians, fillListBoxWithFaultType, fillListBoxWithInstruments, fillListBoxWithSeverity, fillListBoxWithSites, fillListBoxWithStaffMembers, fillListBoxWithStates, fillListBoxWithSupportAstronomers, fillListBoxWithSystems, fillListBoxWithTelescopeOperators, getCurrentDate, getCurrentTime, getFullUserNameFromEmailAddress, selectDefaultListOption, setSelectedItemInListbox, stringContainsText, verifyDateFormat, verifyDateNotInFuture, verifyText, verifyTimeFormat
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
getElement, getWidget, initWidget, isAttached, onAttach, onDetach, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
doAttachChildren, doDetachChildren, getParent, onBrowserEvent, onLoad, onUnload, removeFromParent, setElement
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CurrentWorkaroundDetails

private Workaround CurrentWorkaroundDetails
This contains the details of the current workaround if there is one entered into the database against the current fault.

Constructor Detail

FaultWorkAround

FaultWorkAround(int FaultNumber,
                FaultServiceAsync svc,
                InternationalizationConstants internationalizationConstants,
                AuthenticationDetails userAuthentication,
                FaultUpdatedListener faultUpdateListener)
Constructor for the fault workaround tab in the modify fault form

Parameters:
FaultNumber - This is the number of the defect report which this workaround is associated with.
svc - This is an object which can be used to invoke remote calls on the servlet.
internationalizationConstants - Used for internationalization.
userAuthentication - This contains the details of the authentication which was performed by the user.
faultUpdateListener - This is a reference to a listener object which will be called when the the workaround has been updated
Method Detail

saveFormContentsToDatabase

public void saveFormContentsToDatabase()
Save the contents of the fault workaround to the database

Specified by:
saveFormContentsToDatabase in class FaultAddition

setFormDefaultValues

void setFormDefaultValues()
This will be used to set the default values which are associated with the fault workaround. It will attempt to get the current workaround data for this fault from the database and populate the fields in the workaround form otherwise it will set the values of the form to be the default values.

Specified by:
setFormDefaultValues in class FaultAddition

resetFormToDefaultValues

void resetFormToDefaultValues()
Reset the form to the values which are determined the default values which have been entered for the workaround by the user. The attribute CurrentWorkaroundDetails holds the details of the current workaround if there is one.

Specified by:
resetFormToDefaultValues in class FaultAddition