org.efaps.ui.wicket.models.objects
Class AbstractUIObject

java.lang.Object
  extended by org.efaps.ui.wicket.models.AbstractInstanceObject
      extended by org.efaps.ui.wicket.models.objects.AbstractUIObject
All Implemented Interfaces:
java.io.Serializable, org.apache.wicket.IClusterable
Direct Known Subclasses:
UIAbstractPageObject, UIMenuItem

public abstract class AbstractUIObject
extends AbstractInstanceObject

Version:
$Id: AbstractUIObject.java 3719 2010-02-11 03:12:55Z jan.moxter $
Author:
The eFaps Team
See Also:
Serialized Form

Constructor Summary
AbstractUIObject(org.apache.wicket.PageParameters _parameters)
          Constructor evaluating the UUID for the command and the oid from an Opener instance.
AbstractUIObject(java.util.UUID _commandUUID, java.lang.String _instanceKey)
          Constructor.
AbstractUIObject(java.util.UUID _commandUUID, java.lang.String _instanceKey, java.lang.String _openerId)
          Constructor.
 
Method Summary
abstract  void execute()
          Method is used to execute the UIObject (Fill it with data).
 java.util.List<org.efaps.admin.event.Return> executeEvents(java.lang.Object... _objectTuples)
          This method executes the Events which are related to this Model.
 org.efaps.admin.ui.AbstractCommand getCallingCommand()
          Get the CommandAbstract which was originally called from the Frontend and let to the construction of this model.
 java.util.UUID getCallingCommandUUID()
          This is the getter method for the instance variable callingCmdUUID.
 org.efaps.admin.ui.AbstractCommand getCommand()
          get the CommandAbstract for the instance variable cmdUUID.
protected  org.efaps.admin.ui.AbstractCommand getCommand(java.util.UUID _uuid)
          For given UUID of command / menu / Search, the related command / menu /search Java instance is searched and, if found, returned.
 java.util.UUID getCommandUUID()
          This is the getter method for the instance variable cmdUUID.
 org.efaps.db.Instance getInstanceFromManager()
           
 java.lang.String getMenuTreeKey()
          Getter method for instance variable menuTreeKey.
 org.efaps.admin.ui.AbstractUserInterfaceObject.TargetMode getMode()
          This is the getter method for the instance variable mode.
 java.lang.String getOpenerId()
          Getter method for instance variable openerId.
 org.efaps.admin.ui.AbstractCommand.Target getTarget()
          This is the getter method for the instance variable target.
 java.lang.String getTitle()
          This method retrieves the Value for the Titel from the eFaps Database.
 boolean hasInstanceManager()
           
 boolean isCreateMode()
          Method to check if mode is create.
 boolean isEditMode()
          Method to check if mode is edit.
 boolean isInitialized()
          This is the getter method for the instance variable initialized.
 boolean isPrintMode()
          Method to check if mode is view.
 boolean isSearchMode()
          Method to check if mode is search.
 boolean isSubmit()
          This is the getter method for the instance variable submit.
 boolean isViewMode()
          Method to check if mode is view.
abstract  void resetModel()
          This Method resets the Model, so that the next time the Model is going to be connected, the underlying Data will be received newly from the eFapsDataBase.
 void setCallingCommandUUID(java.util.UUID _uuid)
          This is the setter method for the instance variable callingCmdUUID.
 void setCommandUUID(java.util.UUID _uuid)
          This is the setter method for the instance variable cmdUUID.
 void setInitialized(boolean _initialized)
          This is the setter method for the instance variable initialized.
 void setMode(org.efaps.admin.ui.AbstractUserInterfaceObject.TargetMode _mode)
          This is the setter method for the instance variable mode.
 void setOpenerId(java.lang.String _openerId)
          Setter method for instance variable openerId.
 void setSubmit(boolean _submit)
          This is the setter method for the instance variable submit.
 java.util.List<org.efaps.admin.event.Return> validate(java.lang.Object... _objectTuples)
          This method executes the Validate-Events which are related to this Model.
 
Methods inherited from class org.efaps.ui.wicket.models.AbstractInstanceObject
getInstance, getInstanceKey, setInstanceKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractUIObject

public AbstractUIObject(org.apache.wicket.PageParameters _parameters)
Constructor evaluating the UUID for the command and the oid from an Opener instance.

Parameters:
_parameters - PageParameters for this Model

AbstractUIObject

public AbstractUIObject(java.util.UUID _commandUUID,
                        java.lang.String _instanceKey)
Constructor.

Parameters:
_commandUUID - UUID for this Model
_instanceKey - instance id for this Model

AbstractUIObject

public AbstractUIObject(java.util.UUID _commandUUID,
                        java.lang.String _instanceKey,
                        java.lang.String _openerId)
Constructor.

Parameters:
_commandUUID - UUID for this Model
_instanceKey - instance id for this Model
_openerId - id of the opener
Method Detail

getInstanceFromManager

public org.efaps.db.Instance getInstanceFromManager()
                                             throws org.efaps.util.EFapsException
Specified by:
getInstanceFromManager in class AbstractInstanceObject
Returns:
instance from a esjp
Throws:
org.efaps.util.EFapsException - on error
See Also:
AbstractInstanceObject#getInstanceFromManager()

hasInstanceManager

public boolean hasInstanceManager()
Specified by:
hasInstanceManager in class AbstractInstanceObject
Returns:
true if related command has got a event of type UI_INSTANCEMANAGER else false
See Also:
AbstractInstanceObject.hasInstanceManager()

execute

public abstract void execute()
Method is used to execute the UIObject (Fill it with data).


resetModel

public abstract void resetModel()
This Method resets the Model, so that the next time the Model is going to be connected, the underlying Data will be received newly from the eFapsDataBase.


getCallingCommand

public org.efaps.admin.ui.AbstractCommand getCallingCommand()
Get the CommandAbstract which was originally called from the Frontend and let to the construction of this model.

Returns:
the calling CommandAbstract
See Also:
callingCmdUUID

getCallingCommandUUID

public java.util.UUID getCallingCommandUUID()
This is the getter method for the instance variable callingCmdUUID.

Returns:
value of instance variable cmdUUID

setCallingCommandUUID

public void setCallingCommandUUID(java.util.UUID _uuid)
This is the setter method for the instance variable callingCmdUUID.

Parameters:
_uuid - UUID of the CommandAbstract

getCommand

public org.efaps.admin.ui.AbstractCommand getCommand()
get the CommandAbstract for the instance variable cmdUUID.

Returns:
CommandAbstract for the instance variable cmdUUID
See Also:
#command

getCommand

protected org.efaps.admin.ui.AbstractCommand getCommand(java.util.UUID _uuid)
For given UUID of command / menu / Search, the related command / menu /search Java instance is searched and, if found, returned.

Parameters:
_uuid - UUID of searched command object
Returns:
found command / menu instance, or null if not found

getCommandUUID

public java.util.UUID getCommandUUID()
This is the getter method for the instance variable cmdUUID.

Returns:
value of instance variable cmdUUID

setCommandUUID

public void setCommandUUID(java.util.UUID _uuid)
This is the setter method for the instance variable cmdUUID.

Parameters:
_uuid - UUID to set for teh instance varaiable cmdUUID.

getOpenerId

public java.lang.String getOpenerId()
Getter method for instance variable openerId.

Returns:
value of instance variable openerId

setOpenerId

public void setOpenerId(java.lang.String _openerId)
Setter method for instance variable openerId.

Parameters:
_openerId - value for instance variable openerId

getMode

public org.efaps.admin.ui.AbstractUserInterfaceObject.TargetMode getMode()
This is the getter method for the instance variable mode.

Returns:
value of instance variable mode
See Also:
mode, setMode(org.efaps.admin.ui.AbstractUserInterfaceObject.TargetMode)

setMode

public void setMode(org.efaps.admin.ui.AbstractUserInterfaceObject.TargetMode _mode)
This is the setter method for the instance variable mode.

Parameters:
_mode - new value for instance variable mode
See Also:
mode, getMode()

getTarget

public org.efaps.admin.ui.AbstractCommand.Target getTarget()
This is the getter method for the instance variable target.

Returns:
value of instance variable target

getTitle

public java.lang.String getTitle()
This method retrieves the Value for the Titel from the eFaps Database.

Returns:
Value of the Title
Throws:
java.lang.Exception

isCreateMode

public boolean isCreateMode()
Method to check if mode is create.

Returns:
true if mode is create
See Also:
mode

isEditMode

public boolean isEditMode()
Method to check if mode is edit.

Returns:
true if mode is edit
See Also:
mode

isSearchMode

public boolean isSearchMode()
Method to check if mode is search.

Returns:
true if mode is search
See Also:
mode

isViewMode

public boolean isViewMode()
Method to check if mode is view.

Returns:
true if mode is view
See Also:
mode

isPrintMode

public boolean isPrintMode()
Method to check if mode is view.

Returns:
true if mode is print
See Also:
mode

isInitialized

public boolean isInitialized()
This is the getter method for the instance variable initialized.

Returns:
value of instance variable initialized
See Also:
initialized, #setInitialised

setInitialized

public void setInitialized(boolean _initialized)
This is the setter method for the instance variable initialized.

Parameters:
_initialized - new value for instance variable initialized
See Also:
initialized, #isInitialised

isSubmit

public boolean isSubmit()
This is the getter method for the instance variable submit.

Returns:
value of instance variable submit
See Also:
setSubmit(boolean)

setSubmit

public void setSubmit(boolean _submit)
This is the setter method for the instance variable submit.

Parameters:
_submit - submit
See Also:
isSubmit()

executeEvents

public java.util.List<org.efaps.admin.event.Return> executeEvents(java.lang.Object... _objectTuples)
                                                           throws org.efaps.util.EFapsException
This method executes the Events which are related to this Model. It will take the Events of the CallingCommand callingCmdUUID, if it is declared, otherwise it will take the Events of the Command cmdUUID. The Method also adds the oid AbstractInstanceObject.instanceKey to the Context, so that it is accessible for the esjp.
This method throws an eFpasError to provide the possibility for different responses in the components.

Parameters:
_objectTuples - n tuples of ParamterValue and Object
Returns:
List of Returns
Throws:
org.efaps.util.EFapsException - on error

validate

public java.util.List<org.efaps.admin.event.Return> validate(java.lang.Object... _objectTuples)
                                                      throws org.efaps.util.EFapsException
This method executes the Validate-Events which are related to this Model. It will take the Events of the Command cmdUUID.

Parameters:
_objectTuples - tuples of Objects to be added to the event
Returns:
List with Return from the esjp
Throws:
org.efaps.util.EFapsException - on error

getMenuTreeKey

public java.lang.String getMenuTreeKey()
Getter method for instance variable menuTreeKey.

Returns:
value of instance variable menuTreeKey


Copyright © 2003-2010 The eFaps Team. All Rights Reserved.