| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jaffa.presentation.portlet.component.Component
org.jaffa.components.maint.MaintComponent2
This is the base class for all Maintenance components created by using the object_maintenance_2_0 pattern. It has the following properties - 1- mode : Indicates if the component is in Create, Update or Delete mode. 2- refreshData : Indicates if the data needs to be refreshed. This happens when the data is modified by another user. 3- currentScreenCounter : A maintenance component may consist of more than one screen. This counter is used to identify the current screen being displayed. It will start with count=0 A Maintenance class will have to provide an implementation for the doPrevalidateCreate(), doCreate(), doPrevalidateUpdate(), doUpdate(), doDelete(), doRetrieve(), addScreens() methods.
| Nested Class Summary | |
|  class | MaintComponent2.ScreenA maintenance component may consist of more than one screen. | 
| Field Summary | 
| Fields inherited from interface org.jaffa.components.maint.IMaintComponent | 
| MODE_CREATE, MODE_DELETE, MODE_UPDATE | 
| Constructor Summary | |
| MaintComponent2() | |
| Method Summary | |
|  void | addCreateListener(ICreateListener listener)Adds a listener. | 
|  void | addDeleteListener(IDeleteListener listener)Adds a listener. | 
|  void | addDisplayOnlyField(String fieldName)This will mark a field as 'DisplayOnly'. | 
| protected abstract  void | addScreens(List screens)The Component should provide an implementation for this method to provide the screen information. | 
|  void | addUpdateListener(IUpdateListener listener)Adds a listener. | 
|  void | create()This will invoke the doCreate() method to create a new domain object. | 
|  void | delete(boolean performDirtyReadCheck)This will invoke the doDelete() method to delete the domain object. | 
|  MaintComponent2.Screen | determineAndSetNextScreen()This sets the currentScreenCounter to point to the next screen. | 
|  MaintComponent2.Screen | determineAndSetPreviousScreen()This sets the currentScreenCounter to point to the previous screen. | 
|  MaintComponent2.Screen | determineCurrentScreen()Getter for the current Screen. | 
| static URL | determineDefaultValuesUrl(Class componentClass)A helper routine to return the URL for the properties file containing default values for a component. | 
|  FormKey | determineFormKey()Getter for the current screen's FormKey. | 
|  MaintComponent2.Screen | determineNextScreen()Getter for the next Screen. | 
|  MaintComponent2.Screen | determinePreviousScreen()Getter for the previous Screen. | 
|  FormKey | display()Based on the mode and input parameters, this will either delete the domain object, or initialize the screen for updates, or bring up a blank screen. | 
| protected abstract  void | doCreate()The Component should provide an implementation for this method to create a domain object. | 
| protected abstract  void | doDelete(boolean performDirtyReadCheck)The Component should provide an implementation for this method to delete the domain object. | 
| protected abstract  void | doPrevalidateCreate()The Component should provide an implementation for this method to perform prevalidations before creating a domain object. | 
| protected abstract  void | doPrevalidateUpdate(boolean performDirtyReadCheck)The Component should provide an implementation for this method to perform prevalidations before updating a domain object. | 
| protected abstract  void | doRetrieve()The Component should provide an implementation for this method to retrieve the domain object. | 
| protected abstract  void | doUpdate(boolean performDirtyReadCheck)The Component should provide an implementation for this method to update the domain object. | 
| protected  Collection | getCreateListeners()Returns a Collection of ICreateListener objects. | 
|  int | getCurrentScreenCounter()Getter for property currentScreenCounter. | 
| protected  Collection | getDeleteListeners()Returns a Collection of IDeleteListener objects. | 
| protected  HeaderDto | getHeaderDto()Returns the HeaderDto. | 
|  int | getMode()Getter for property mode. | 
|  MaintComponent2.Screen[] | getScreens()Getter for the Screens. | 
| protected  Collection | getUpdateListeners()Returns a Collection of IUpdateListener objects. | 
| protected  void | initDropDownCodes()The Component should override this method to retrieve the set of codes for dropdowns in a screen, if any are required. | 
| protected  void | initializeData()This method is invoked by the display() method when the component is run in the CREATE_MODE. | 
| protected  void | invokeCreateListeners()Invokes the createDone() method of the registered ICreateListener objects in the same thread. | 
| protected  void | invokeCreateListeners(EventObject eventObject)Invokes the createDone() method of the registered ICreateListener objects in the same thread. | 
| protected  void | invokeDeleteListeners()Invokes the deleteDone() method of the registered IDeleteListener objects in the same thread. | 
| protected  void | invokeDeleteListeners(EventObject eventObject)Invokes the deleteDone() method of the registered IDeleteListener objects in the same thread. | 
| protected  void | invokeUpdateListeners()Invokes the updateDone() method of the registered IUpdateListener objects in the same thread. | 
| protected  void | invokeUpdateListeners(EventObject eventObject)Invokes the updateDone() method of the registered IUpdateListener objects in the same thread. | 
|  boolean | isCreateMode()Returns true if this is create mode. | 
|  boolean | isDeleteMode()Returns true if this is delete mode. | 
|  boolean | isDisplayOnlyField(String fieldName)Returns a true if a field has been marked as 'DisplayOnly'. | 
|  boolean | isRefreshData()Getter for property refreshData. | 
|  boolean | isUpdateMode()Returns true if this is update mode. | 
|  void | prevalidateCreate()This will invoke the doPrevalidateCreate() method to perform prevalidations before creating a domain object. | 
|  void | prevalidateUpdate(boolean performDirtyReadCheck)This will invoke the doPrevalidateUpdate() method to perform prevalidations before updating a domain object. | 
|  void | quit()This clears the internal collection of listeners. | 
|  boolean | removeCreateListener(ICreateListener listener)Removes a listener. | 
|  boolean | removeDeleteListener(IDeleteListener listener)Removes a listener. | 
|  boolean | removeUpdateListener(IUpdateListener listener)Removes a listener. | 
|  void | retrieve()This will invoke the doRetrieve() method to retrieve the domain object. | 
|  void | setCurrentScreenCounter(int currentScreenCounter)Setter for property currentScreenCounter. | 
|  void | setMode(int mode)Setter for property mode. | 
| protected  void | setRefreshData(boolean refreshData)Setter for property refreshData. | 
| protected  void | uncacheWidgetModels()Clears the WidgetCache, removing all the WidgetModels. | 
|  void | update(boolean performDirtyReadCheck)This will invoke the doUpdate() method to update the domain object. | 
| Methods inherited from class org.jaffa.presentation.portlet.component.Component | 
| addChildComponent, addFormKeyChangeListener, getComponentDefinition, getComponentId, getContainerFormKey, getFormKeyChangeListeners, getReturnToFormKey, getToken, getUserSession, isActive, quitAndReturnToCallingScreen, reflectAndSetParms, removeFormKeyChangeListener, returnChildComponents, returnLastActivityDate, run, setContainerFormKey, setReturnToFormKey, setToken, updateLastActivityDate | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Methods inherited from interface org.jaffa.presentation.portlet.component.IComponent | 
| addFormKeyChangeListener, getComponentDefinition, getComponentId, getContainerFormKey, getFormKeyChangeListeners, getReturnToFormKey, getToken, getUserSession, isActive, quitAndReturnToCallingScreen, removeFormKeyChangeListener, setContainerFormKey, setReturnToFormKey, setToken | 
| Constructor Detail | 
public MaintComponent2()
| Method Detail | 
public int getMode()
getMode in interface IMaintComponentpublic void setMode(int mode)
setMode in interface IMaintComponentmode - New value of property mode.public boolean isCreateMode()
isCreateMode in interface IMaintComponentpublic boolean isUpdateMode()
isUpdateMode in interface IMaintComponentpublic boolean isDeleteMode()
isDeleteMode in interface IMaintComponentpublic boolean isRefreshData()
protected void setRefreshData(boolean refreshData)
refreshData - New value of property refreshData.public int getCurrentScreenCounter()
public void setCurrentScreenCounter(int currentScreenCounter)
currentScreenCounter - New value of property currentScreenCounter.public MaintComponent2.Screen[] getScreens()
public MaintComponent2.Screen determineCurrentScreen()
public MaintComponent2.Screen determineNextScreen()
public MaintComponent2.Screen determineAndSetNextScreen()
public MaintComponent2.Screen determinePreviousScreen()
public MaintComponent2.Screen determineAndSetPreviousScreen()
public FormKey determineFormKey()
public void addDisplayOnlyField(String fieldName)
fieldName - The field to be marked as 'DisplayOnly'.public boolean isDisplayOnlyField(String fieldName)
fieldName - The field to be checked.
public void addCreateListener(ICreateListener listener)
addCreateListener in interface ICreateComponentlistener - the listener.public boolean removeCreateListener(ICreateListener listener)
removeCreateListener in interface ICreateComponentlistener - the listener.
public void addUpdateListener(IUpdateListener listener)
addUpdateListener in interface IUpdateComponentlistener - the listener.public boolean removeUpdateListener(IUpdateListener listener)
removeUpdateListener in interface IUpdateComponentlistener - the listener.
public void addDeleteListener(IDeleteListener listener)
addDeleteListener in interface IDeleteComponentlistener - the listener.public boolean removeDeleteListener(IDeleteListener listener)
removeDeleteListener in interface IDeleteComponentlistener - the listener.
public FormKey display()
                throws ApplicationExceptions,
                       FrameworkException
display in interface IComponentdisplay in class ComponentApplicationExceptions - Indicates some functional error.
FrameworkException - Indicates some system error.public void quit()
quit in interface IComponentquit in class Component
public void prevalidateCreate()
                       throws ApplicationExceptions,
                              FrameworkException
ApplicationExceptions - This will be thrown in case any invalid data has been set.
FrameworkException - Indicates some system error.
public void create()
            throws ApplicationExceptions,
                   FrameworkException
ApplicationExceptions - Indicates some functional error.
FrameworkException - Indicates some system error.
public void prevalidateUpdate(boolean performDirtyReadCheck)
                       throws ApplicationExceptions,
                              FrameworkException
performDirtyReadCheck - this will determine if the Dirty Read check if to be performed prior to an update.
ApplicationExceptions - This will be thrown in case any invalid data has been set.
FrameworkException - Indicates some system error.
public void update(boolean performDirtyReadCheck)
            throws ApplicationExceptions,
                   FrameworkException
performDirtyReadCheck - this will determine if the Dirty Read check if to be performed prior to an update.
ApplicationExceptions - Indicates some functional error.
FrameworkException - Indicates some system error.
public void delete(boolean performDirtyReadCheck)
            throws ApplicationExceptions,
                   FrameworkException
performDirtyReadCheck - this will determine if the Dirty Read check if to be performed prior to a delete.
ApplicationExceptions - Indicates some functional error.
FrameworkException - Indicates some system error.
public void retrieve()
              throws ApplicationExceptions,
                     FrameworkException
ApplicationExceptions - Indicates some functional error.
FrameworkException - Indicates some system error.protected Collection getCreateListeners()
protected Collection getUpdateListeners()
protected Collection getDeleteListeners()
protected void invokeCreateListeners()
protected void invokeCreateListeners(EventObject eventObject)
eventObject - The EventObject which will probably contain the component itself.protected void invokeUpdateListeners()
protected void invokeUpdateListeners(EventObject eventObject)
eventObject - The EventObject which will probably contain the component itself.protected void invokeDeleteListeners()
protected void invokeDeleteListeners(EventObject eventObject)
eventObject - The EventObject which will probably contain the component itself.protected void uncacheWidgetModels()
protected HeaderDto getHeaderDto()
protected void initializeData()
                       throws ApplicationExceptions,
                              FrameworkException
ApplicationExceptions - This will be thrown in case any invalid data has been set.
FrameworkException - Indicates some system error.
protected void initDropDownCodes()
                          throws ApplicationExceptions,
                                 FrameworkException
ApplicationExceptions - This will be thrown in case any invalid data has been set.
FrameworkException - Indicates some system error.
protected abstract void doPrevalidateCreate()
                                     throws ApplicationExceptions,
                                            FrameworkException
ApplicationExceptions - This will be thrown in case any invalid data has been set.
FrameworkException - Indicates some system error.
protected abstract void doCreate()
                          throws ApplicationExceptions,
                                 FrameworkException
ApplicationExceptions - This will be thrown in case any invalid data has been set.
FrameworkException - Indicates some system error.
protected abstract void doPrevalidateUpdate(boolean performDirtyReadCheck)
                                     throws ApplicationExceptions,
                                            FrameworkException
performDirtyReadCheck - this will determine if the Dirty Read check if to be performed prior to an update.
ApplicationExceptions - This will be thrown in case any invalid data has been set.
FrameworkException - Indicates some system error.
protected abstract void doUpdate(boolean performDirtyReadCheck)
                          throws ApplicationExceptions,
                                 FrameworkException
performDirtyReadCheck - this will determine if the Dirty Read check if to be performed prior to an update.
ApplicationExceptions - This will be thrown in case any invalid data has been set.
FrameworkException - Indicates some system error.
protected abstract void doDelete(boolean performDirtyReadCheck)
                          throws ApplicationExceptions,
                                 FrameworkException
performDirtyReadCheck - this will determine if the Dirty Read check if to be performed prior to a delete.
ApplicationExceptions - This will be thrown in case any invalid data has been set.
FrameworkException - Indicates some system error.
protected abstract void doRetrieve()
                            throws ApplicationExceptions,
                                   FrameworkException
ApplicationExceptions - This will be thrown in case any invalid data has been set.
FrameworkException - Indicates some system error.protected abstract void addScreens(List screens)
screens - The component should add MaintComponent2.Screen objects to this list.public static URL determineDefaultValuesUrl(Class componentClass)
componentClass - The component class.
| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||