com.ibm.ccd.ui.taglib.dataobjects
Class BaseSearchElement

java.lang.Object
  extended by com.ibm.ccd.ui.taglib.dataobjects.BaseSearchElement
All Implemented Interfaces:
ISeachElement, ISelectListTag, java.lang.Cloneable
Direct Known Subclasses:
SelectSearchElement, TextSearchElement

public class BaseSearchElement
extends java.lang.Object
implements ISeachElement, ISelectListTag, java.lang.Cloneable

Base class for all SearchElements

Since:
Iteration 2
Version:
1.0

Constructor Summary
BaseSearchElement()
          Constructs an empty SearchElement
BaseSearchElement(int aElementType)
          Constructs SearchElement with the specified type
BaseSearchElement(int aElementType, java.lang.String aElementName, boolean aDisplayable, boolean aSortable)
          Constructs SearchElement for the specified type, name, displayable and sortable capabilities
BaseSearchElement(int aElementType, java.lang.String aElementName, java.lang.String aDefaultOperator, java.util.HashMap aOperatorsMap, boolean aMandatory, boolean aDefaultable)
          Constructs SearchElement for the specified type, name, displayable and sortable capabilities
BaseSearchElement(int aElementType, java.lang.String aElementName, java.lang.String aElementID, java.lang.String aDefaultOperator, java.util.HashMap aOperatorsMap, boolean aIsMandatory, boolean aIsDefaultable)
          Constructs SearchElement for the specified type, name, displayable and sortable capabilities
BaseSearchElement(java.lang.String aElementName, boolean aDisplayable, boolean aSortable)
          Constructs SearchElement for the specified type, display and sort capabilities
 
Method Summary
 java.lang.Object clone()
           
 BaseSearchElement getChildElement()
           
 java.lang.String getDefaultOperator()
          Retrurns the Default operator for this element
 java.lang.String getDisplayName()
           
 java.lang.String getID()
          Retrurns the Unique ID to identify this element
 boolean getIsDisplayable()
          Gets the isDisplayable
 boolean getIsSortable()
          Gets the isSortable
 int getListBoxIndex()
           
 java.lang.String getName()
          Retrurns the name of this element
 java.lang.String getOperatorID()
          Returns the Unique ID identify this elements operator
 java.util.HashMap getOperatorsMap()
          Returns the allowed operators map , associated with this element
 java.lang.String getSelectedDisplayValue()
           
 java.lang.Integer getSelectedOperator()
          Returns the Current Operator selected fot this element
 java.lang.String getSelectedValue()
           
 int getType()
          Retrurns the element Type
 Attribute getWpcAttribute()
           
 int getWpcAttributeType()
           
 boolean isDefaultable()
          Gets the isDefaultable
 boolean isMandatory()
          Specifies whether this operator is mandatory or not
 boolean isSearchable()
           
 boolean isSelected()
           
 void setChildElement(BaseSearchElement element)
           
 void setDefaultable(boolean aDefaultable)
          Sets the isDefaultable
 void setDefaultOperatorID(java.lang.String aDefaultOperator)
          Sets the default of this element for perfroming search
 void setDisplayName(java.lang.String string)
           
 void setID(java.lang.String aElementID)
          Sets the ID of this element
 void setIsDisplayable(boolean isDisplayable)
          Sets the isDisplayable
 void setIsSortable(boolean isSortable)
          Sets the isSortable
 void setListBoxIndex(int i)
           
 void setMandatory(boolean aIsMandatoryElement)
          Sets the requirement of this element for perfroming search
 void setName(java.lang.String aElementName)
          Sets the name of this element
 void setOperatorID(java.lang.String aOperatorID)
          Sets the unique ID identify this element operator
 void setOperatorMap(java.util.HashMap aOperatorsMap)
          Assigns the list of available operators for perfroming search against this element
 void setSearchable(boolean flag)
           
 void setSelectedOperator(java.lang.Integer aSelectedOperator)
          Assigns the selected operator for perfroming search against this element
 void setSelectedOperator(java.lang.String aSelectedOperatorStr)
          Assigns the selected operator for perfroming search against this element this is the convenient overloaded method , used to fill using the string values from the browser
 void setSelectedValue(java.lang.String string)
           
 void setType(int aElementType)
          Sets the type of this element
 void setWpcAttribute(Attribute attribute)
           
 void setWpcAttributeType(int i)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseSearchElement

public BaseSearchElement()
Constructs an empty SearchElement


BaseSearchElement

public BaseSearchElement(int aElementType)
Constructs SearchElement with the specified type

Parameters:
aElementType - - The type of the element as defined in the ISearchElementTypesEnum

BaseSearchElement

public BaseSearchElement(java.lang.String aElementName,
                         boolean aDisplayable,
                         boolean aSortable)
Constructs SearchElement for the specified type, display and sort capabilities

Parameters:
aElementName - - The Name of the element
aDisplayable - - Displayability of the element in the UI
aSortable - - The sortability of the element

BaseSearchElement

public BaseSearchElement(int aElementType,
                         java.lang.String aElementName,
                         boolean aDisplayable,
                         boolean aSortable)
Constructs SearchElement for the specified type, name, displayable and sortable capabilities

Parameters:
aElementType - - The type of the element
aElementName -
aDisplayable - - Displayability of the element in the UI
aSortable - - The sortability of the element

BaseSearchElement

public BaseSearchElement(int aElementType,
                         java.lang.String aElementName,
                         java.lang.String aDefaultOperator,
                         java.util.HashMap aOperatorsMap,
                         boolean aMandatory,
                         boolean aDefaultable)
Constructs SearchElement for the specified type, name, displayable and sortable capabilities

Parameters:
aElementType - - The type of the element
aElementName - - The name of the element
aDefaultOperator - - The default searchOperator
aOperatorsMap - - The operator hashMap
aMandatory - - The essentiality of the element
aDefaultable - - The default value presence of the element

BaseSearchElement

public BaseSearchElement(int aElementType,
                         java.lang.String aElementName,
                         java.lang.String aElementID,
                         java.lang.String aDefaultOperator,
                         java.util.HashMap aOperatorsMap,
                         boolean aIsMandatory,
                         boolean aIsDefaultable)
Constructs SearchElement for the specified type, name, displayable and sortable capabilities

Parameters:
aElementType - - The type of the element
aElementID - - The Id of the searchElement
aElementName - - The name of the element
aDefaultOperator - - The default searchOperator
aOperatorsMap - - The operator hashMap
aIsMandatory - - The essentiality of the element
aIsDefaultable - - The default value presence of the element
Method Detail

getID

public java.lang.String getID()
Retrurns the Unique ID to identify this element

Returns:
The Element Identifier

getName

public java.lang.String getName()
Retrurns the name of this element

Specified by:
getName in interface ISelectListTag
Returns:
String, The Element Name

getType

public int getType()
Retrurns the element Type

Returns:
The Element Type, int

getDefaultOperator

public java.lang.String getDefaultOperator()
Retrurns the Default operator for this element

Returns:
The Default Operator associated. Integer

getOperatorID

public java.lang.String getOperatorID()
Returns the Unique ID identify this elements operator

Returns:
The Element Operator Identifier

setOperatorID

public void setOperatorID(java.lang.String aOperatorID)
Sets the unique ID identify this element operator

Parameters:
aOperatorID - The Element Operator Identifier

getOperatorsMap

public java.util.HashMap getOperatorsMap()
Returns the allowed operators map , associated with this element

Returns:
The allowed Element Operator Map

getSelectedOperator

public java.lang.Integer getSelectedOperator()
Returns the Current Operator selected fot this element

Returns:
Selected Operator , if assigned and not null
else the default Operator

isMandatory

public boolean isMandatory()
Specifies whether this operator is mandatory or not

Returns:
true, if this operator is mandatory else false, if this is not mandatory

setID

public void setID(java.lang.String aElementID)
Sets the ID of this element

Parameters:
aElementID - , The element unique ID

setName

public void setName(java.lang.String aElementName)
Sets the name of this element

Parameters:
aElementName - , Name of this element

setType

public void setType(int aElementType)
Sets the type of this element

Parameters:
aElementType - , The element type

setDefaultOperatorID

public void setDefaultOperatorID(java.lang.String aDefaultOperator)
Sets the default of this element for perfroming search

Parameters:
aDefaultOperator - , If the element is mandatory

setMandatory

public void setMandatory(boolean aIsMandatoryElement)
Sets the requirement of this element for perfroming search

Parameters:
aIsMandatoryElement - true , If the element is mandatory
false , If the element is not mandatory

setOperatorMap

public void setOperatorMap(java.util.HashMap aOperatorsMap)
Assigns the list of available operators for perfroming search against this element

Parameters:
aOperatorsMap - , the map of allowed operators ( key as operator name eg. ">" value is the oerparotorvalue eg" 1" )

setSelectedOperator

public void setSelectedOperator(java.lang.Integer aSelectedOperator)
Assigns the selected operator for perfroming search against this element

Parameters:
aSelectedOperator - , the selected operator from the list of available operators.

setSelectedOperator

public void setSelectedOperator(java.lang.String aSelectedOperatorStr)
Assigns the selected operator for perfroming search against this element this is the convenient overloaded method , used to fill using the string values from the browser

Parameters:
aSelectedOperatorStr - , the selected operaor from the list of available operators.

getIsDisplayable

public boolean getIsDisplayable()
Gets the isDisplayable

Returns:
Returns a boolean

setIsDisplayable

public void setIsDisplayable(boolean isDisplayable)
Sets the isDisplayable

Parameters:
isDisplayable - The isDisplayable to set

getIsSortable

public boolean getIsSortable()
Gets the isSortable

Returns:
Returns a boolean

setIsSortable

public void setIsSortable(boolean isSortable)
Sets the isSortable

Parameters:
isSortable - The isSortable to set

isDefaultable

public boolean isDefaultable()
Gets the isDefaultable

Returns:
Returns a boolean

setDefaultable

public void setDefaultable(boolean aDefaultable)
Sets the isDefaultable

Parameters:
aDefaultable - The isDefaultable to set

getSelectedValue

public java.lang.String getSelectedValue()
Returns:
string

getSelectedDisplayValue

public java.lang.String getSelectedDisplayValue()

setSelectedValue

public void setSelectedValue(java.lang.String string)
Parameters:
string -

getDisplayName

public java.lang.String getDisplayName()
Specified by:
getDisplayName in interface ISelectListTag
Returns:
string

setDisplayName

public void setDisplayName(java.lang.String string)
Parameters:
string -

getChildElement

public BaseSearchElement getChildElement()
Returns:
baseSearchElement

setChildElement

public void setChildElement(BaseSearchElement element)
Parameters:
element -

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

isSelected

public boolean isSelected()
Specified by:
isSelected in interface ISelectListTag

getListBoxIndex

public int getListBoxIndex()
Specified by:
getListBoxIndex in interface ISelectListTag
Returns:
integer

setListBoxIndex

public void setListBoxIndex(int i)
Parameters:
i -

getWpcAttributeType

public int getWpcAttributeType()
Returns:
integer

setWpcAttributeType

public void setWpcAttributeType(int i)
Parameters:
i -

getWpcAttribute

public Attribute getWpcAttribute()
Returns:
attribute

setWpcAttribute

public void setWpcAttribute(Attribute attribute)
Parameters:
attribute -

setSearchable

public void setSearchable(boolean flag)

isSearchable

public boolean isSearchable()