org.caleigo.core
Class AbstractEntityAction

java.lang.Object
  extended byorg.caleigo.core.AbstractEntityAction
All Implemented Interfaces:
IEntityAction
Direct Known Subclasses:
AbstractTransactionEntityAction

public abstract class AbstractEntityAction
extends java.lang.Object
implements IEntityAction

Version:
1.00
Author:
Dennis Zikovic

Field Summary
 
Fields inherited from interface org.caleigo.core.IEntityAction
ASSOCIATION_EXPORT, DRAG, ENTITY, IDENTITY_EXPORT, MISCELLANEOUS, NEVER_EXPORT, PRIMARY, QUALIFIER, READ_ONLY, SECONDARY, SELECTION, SYSTEM
 
Constructor Summary
AbstractEntityAction(IEntityDescriptor entityDescriptor, java.lang.String codeName, java.lang.String displayName)
          Creates a new instance of AbstractAction.
AbstractEntityAction(IEntityDescriptor entityDescriptor, java.lang.String codeName, java.lang.String displayName, java.lang.String displayHint)
          Creates a new instance of AbstractAction.
 
Method Summary
protected  void addDataTypeDescriptor(DataType dataType, java.lang.String codeName, java.lang.String displayName, java.lang.String displayHint)
           
protected  void addEntityDescriptor(IEntityDescriptor entityDescriptor, java.lang.String codeName, java.lang.String displayName, java.lang.String displayHint)
           
protected  void addSelectionDescriptor(IEntityDescriptor entityDescriptor, java.lang.String codeName, java.lang.String displayName, java.lang.String displayHint)
           
abstract  void defineDataDescriptor()
          This method is called by the action objects constructor once and only once.
 java.lang.String getCodeName()
          Access method that returns the code name that can be used to identify the called IAction object.
 IDataBundleDescriptor getDataBundleDescriptor()
          Access method that returns the IActionDataDescriptor for the IActionData theat the called action needs to perform its logic payload.
 java.lang.String getDisplayHint()
          Access method that returns a end-user presentable hint text that can be used as a help text or fly-by hint.
 java.lang.String getDisplayName()
          Access method that returns a end-user presentable name that can be used as button and meny labels.
 IEntityDescriptor getEntityDescriptor()
          Access method that returns the IEntityDescriptor object that the called action object is a part of.
 boolean isInCategory(int category)
          Access method that return true if the called action object has of the provided category flag set to true.
abstract  void perform(IDataBundle data)
          Performs the actions logic using the provided IActionData object.
protected  void setCategoryFlags(int flags)
          Can be used by subclasses to set the actions catagery flags.
protected  void validateData(IDataBundle data)
          Help method that validates the provided data and throws an InvalidDataException if the validation failed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractEntityAction

public AbstractEntityAction(IEntityDescriptor entityDescriptor,
                            java.lang.String codeName,
                            java.lang.String displayName)
Creates a new instance of AbstractAction.


AbstractEntityAction

public AbstractEntityAction(IEntityDescriptor entityDescriptor,
                            java.lang.String codeName,
                            java.lang.String displayName,
                            java.lang.String displayHint)
Creates a new instance of AbstractAction.

Method Detail

perform

public abstract void perform(IDataBundle data)
Performs the actions logic using the provided IActionData object. This method is defined by the IAction interface.

Specified by:
perform in interface IEntityAction

defineDataDescriptor

public abstract void defineDataDescriptor()
This method is called by the action objects constructor once and only once. The method is expected to define the action data requriments (IDataBundleDescriptor) using the diferent add methods for descriptors defined in this class.


getDataBundleDescriptor

public IDataBundleDescriptor getDataBundleDescriptor()
Access method that returns the IActionDataDescriptor for the IActionData theat the called action needs to perform its logic payload.

Specified by:
getDataBundleDescriptor in interface IEntityAction

getEntityDescriptor

public IEntityDescriptor getEntityDescriptor()
Access method that returns the IEntityDescriptor object that the called action object is a part of.

Specified by:
getEntityDescriptor in interface IEntityAction

getCodeName

public java.lang.String getCodeName()
Access method that returns the code name that can be used to identify the called IAction object.

Specified by:
getCodeName in interface IEntityAction

getDisplayName

public java.lang.String getDisplayName()
Access method that returns a end-user presentable name that can be used as button and meny labels.

Specified by:
getDisplayName in interface IEntityAction

getDisplayHint

public java.lang.String getDisplayHint()
Access method that returns a end-user presentable hint text that can be used as a help text or fly-by hint.

Specified by:
getDisplayHint in interface IEntityAction

isInCategory

public boolean isInCategory(int category)
Access method that return true if the called action object has of the provided category flag set to true.

Specified by:
isInCategory in interface IEntityAction

addDataTypeDescriptor

protected void addDataTypeDescriptor(DataType dataType,
                                     java.lang.String codeName,
                                     java.lang.String displayName,
                                     java.lang.String displayHint)

addEntityDescriptor

protected void addEntityDescriptor(IEntityDescriptor entityDescriptor,
                                   java.lang.String codeName,
                                   java.lang.String displayName,
                                   java.lang.String displayHint)

addSelectionDescriptor

protected void addSelectionDescriptor(IEntityDescriptor entityDescriptor,
                                      java.lang.String codeName,
                                      java.lang.String displayName,
                                      java.lang.String displayHint)

validateData

protected void validateData(IDataBundle data)
Help method that validates the provided data and throws an InvalidDataException if the validation failed.


setCategoryFlags

protected void setCategoryFlags(int flags)
Can be used by subclasses to set the actions catagery flags.



Copyright © 2005 Caleigo. All Rights Reserved.