org.caleigo.core
Class DataBundleDescriptor

java.lang.Object
  extended byorg.caleigo.core.DataBundleDescriptor
All Implemented Interfaces:
IDataBundleDescriptor

public class DataBundleDescriptor
extends java.lang.Object
implements IDataBundleDescriptor

Version:
1.00
Author:
Dennis Zikovic

Nested Class Summary
protected static class DataBundleDescriptor.DescriptorItem
           
 
Field Summary
 
Fields inherited from interface org.caleigo.core.IDataBundleDescriptor
DATA, ENTITY, SELECTION
 
Constructor Summary
DataBundleDescriptor()
           
 
Method Summary
protected  void addDataTypeDescriptor(DataType dataType, java.lang.String codeName, java.lang.String displayName, java.lang.String displayHint)
           
protected  void addDataValidator(java.lang.String dataCodeName, IDataValidator dataValidator)
           
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)
           
 IDataBundle createActionData()
          Action method that creates IActionData object for the called ActionData- Descriptor.
 java.lang.String getCodeName(int index)
          Access method that returns the code name that can be used to identify the indexed data item.
 DataType getDataType(int index)
          Returns the DataType of the indexed data item if that item is of the type DATA otherwise null is returned.
 java.lang.String getDisplayHint(int index)
          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(int index)
          Access method that returns a end-user presentable name that can be used as button and meny labels for the indexed data item.
 IEntityDescriptor getEntityDescriptor(int index)
          Returns the DataType of the indexed data item if that item is of the type ENTITY or SELECTION otherwise null is returned.
 int getItemCount()
          This method returns the number of data item objects that are defined by the IActionDataDescriptor object.
 int getItemIndex(java.lang.String codeName)
          Help method that returns the indexed of the named data item.
 int getItemType(int index)
          This method returns the item type of the indexed data item defined by the IActionDataDescriptor object.
 ValidationResult validateData(IDataBundle actionData)
          Help method that validates the provided IActionData object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataBundleDescriptor

public DataBundleDescriptor()
Method Detail

getItemCount

public int getItemCount()
This method returns the number of data item objects that are defined by the IActionDataDescriptor object.

Specified by:
getItemCount in interface IDataBundleDescriptor

getItemType

public int getItemType(int index)
This method returns the item type of the indexed data item defined by the IActionDataDescriptor object.

Specified by:
getItemType in interface IDataBundleDescriptor

getDataType

public DataType getDataType(int index)
Returns the DataType of the indexed data item if that item is of the type DATA otherwise null is returned.

Specified by:
getDataType in interface IDataBundleDescriptor

getEntityDescriptor

public IEntityDescriptor getEntityDescriptor(int index)
Returns the DataType of the indexed data item if that item is of the type ENTITY or SELECTION otherwise null is returned.

Specified by:
getEntityDescriptor in interface IDataBundleDescriptor

getCodeName

public java.lang.String getCodeName(int index)
Access method that returns the code name that can be used to identify the indexed data item.

Specified by:
getCodeName in interface IDataBundleDescriptor

getDisplayName

public java.lang.String getDisplayName(int index)
Access method that returns a end-user presentable name that can be used as button and meny labels for the indexed data item.

Specified by:
getDisplayName in interface IDataBundleDescriptor

getDisplayHint

public java.lang.String getDisplayHint(int index)
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 IDataBundleDescriptor

getItemIndex

public int getItemIndex(java.lang.String codeName)
Help method that returns the indexed of the named data item. If the code name can not be identified then a negative value is returned.

Specified by:
getItemIndex in interface IDataBundleDescriptor

createActionData

public IDataBundle createActionData()
Action method that creates IActionData object for the called ActionData- Descriptor. The created IActionData will be defined by the called IActionDataDescriptor and will only be complete if it contains all data specified by that descriptor.

Specified by:
createActionData in interface IDataBundleDescriptor

validateData

public ValidationResult validateData(IDataBundle actionData)
Help method that validates the provided IActionData object. The data object must have the called descriptor as its defining descriptor or an IllegalArgumentException exception is thrown.

Specified by:
validateData in interface IDataBundleDescriptor

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)

addDataValidator

protected void addDataValidator(java.lang.String dataCodeName,
                                IDataValidator dataValidator)


Copyright © 2005 Caleigo. All Rights Reserved.