com.ibm.ccd.ui.portlets.search.core
Class SearchBean

java.lang.Object
  extended by com.ibm.ccd.ui.portlets.search.core.SearchBean
All Implemented Interfaces:
IDataBean, IBaseSearch, java.io.Serializable
Direct Known Subclasses:
LookupTableSearchBean

public class SearchBean
extends java.lang.Object
implements IDataBean, IBaseSearch, java.io.Serializable

This class provides implementation for the IBaseSearch interface.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.ibm.ccd.ui.portlets.search.core.IBaseSearch
AND_OPERATOR, BUSINESS_ACTION_CONFIG, BUSINESS_ACTION_EDIT, BUSINESS_ACTION_VIEW, BUSINESS_FUNCTION_SEARCH, CLASS_NAME_FILE_SAVED_SEARCH, DEFAULT_BOOLEAN_OPERATOR, DEFAULT_DATE_OPERATOR, DEFAULT_NUMERIC_OPERATOR, DEFAULT_TEXT_OPERATOR, DEFAULT_TRAVERSAL_SIZE, FLAG_FALSE, FLAG_TRUE, FORM_ACTION_CONFIG, FORM_ACTION_EDIT_SEARCH_CRITERIA, FORM_ACTION_PERFORM_SEARCH, FORM_ACTION_QUICK_SEARCH, FORM_ACTION_SAVED_SEARCH, FORM_ACTION_VIEW, FORM_ACTION_WORK_WITH_ITEM, HISTORY_FOLDER_NAME, KEY_ACTION, KEY_MAX_SAVED_SEARCHS, KEY_SAVED_SEARCH_KEY, KEY_SEARCH_CONFIG_BEAN, KEY_SEARCH_CRITERIA_BEAN, KEY_SEARCH_ID, KEY_SEARCH_RESULTS_BEAN, KEY_SELECT_SEARCH_CRITERIA, KEY_SELECT_SEARCH_RESULT, KEY_TRAVERSAL_SIZE, LABEL_CONFIG_SUBMIT, LABEL_DOWNLOAD, LABEL_KEY_NONE, LABEL_SCROLL_SIZE, LABEL_VIEW_AND, MAX_SEARCH_COLS, MAX_SEARCH_HISTORY, MAX_SEARCH_RESULTS, MAX_TRAVERSAL_SIZE, MSG_APPLICATION_EXCEPTION, MSG_CONFIG_UPDATE_SUCCESS, MSG_EDIT_INFO, MSG_EDIT_UPDATE_SUCCESS, MSG_INVALID_NUMBER_VALUE, MSG_INVALID_TRAVERSAL_SIZE, MSG_MAX_FETCHED_RESULTS, MSG_NO_SEARCH_CRITERIA, MSG_SEARCH_ATTRIBUTES_NOT_SELECTED, MSG_SEARCH_CRITERIA, MSG_SEARCH_HISTORY, MSG_SELECT_QUICK_SEARCH, MSG_SYSTEM_EXCEPTION, MSG_TRY_LATER, OP_BEGINSWITH, OP_BEGINSWITH_NOT, OP_CONTAINS, OP_CONTAINS_NOT, OP_ENDSWITH, OP_ENDSWITH_NOT, OP_EXACTMATCH, OP_EXACTMATCH_NOT, OP_ISEMPTY, OP_ISEMPTY_NOT, PREFIX_LOCALISATION, PREFIX_SEARCH_CRITERIA, PREFIX_SEARCH_RESULT, RELATIVE_FOLDER_PATH, SEARCH_RESULT_FORM_ACTION_EDIT, SEARCH_RESULT_FORM_ACTION_VIEW, TYPE_SELECT, TYPE_TEXT, URL_STRING_SEPERATOR, WORK_WITH_ITEM_PORLET_NAME, WPC_SEARCH_ATTRIBUTE_END_TAG, WPC_SEARCH_ATTRIBUTE_START_TAG, WPC_SEARCH_ELEMENT_END_TAG, WPC_SEARCH_ELEMENT_OPERATOR_END_TAG, WPC_SEARCH_ELEMENT_OPERATOR_START_TAG, WPC_SEARCH_ELEMENT_START_TAG, WPC_SEARCH_OPERATOR_END_TAG, WPC_SEARCH_OPERATOR_OR_START_TAG, WPC_SEARCH_OPERATOR_START_TAG, WPC_SEARCH_PREDICATE_END_TAG, WPC_SEARCH_PREDICATE_START_TAG, WPC_SEARCH_VALUE_END_TAG, WPC_SEARCH_VALUE_START_TAG
 
Constructor Summary
SearchBean()
           
 
Method Summary
 void fromXML(org.w3c.dom.Node domNode)
          Decodes the XML Element and sets the element values as the bean properties
 void fromXML(java.lang.String xml)
          Mediator calls thsi method and sets the xml
 java.lang.String getCollabName()
           
 org.apache.jetspeed.portlet.PortletContext getContext()
           
 long getEndIndex()
           
 java.lang.String getMaxResults()
           
 org.apache.jetspeed.portlet.PortletRequest getPortletRequest()
           
 java.lang.String getReqXML()
           
 java.lang.String getResponseXML()
           
 Attribute[] getSearchAttributes()
           
 java.util.ArrayList getSearchCriteriaElements()
          This method returns the list of BasicSearchElement
 Attribute[] getSearchResultAttributes()
           
 java.util.ArrayList getSearchResultElements()
           
 ResultData getSearchResults()
          This method returns the ResultData which holds the search results
 long getStartIndex()
           
 WPSContext getWpsContext()
           
 java.util.HashMap prepareFlatAttributeMap(Attribute[] attributesParam)
          prepare map of all attributes available including the map inside group attributes
 void setCollabName(java.lang.String collabName)
           
 void setContext(org.apache.jetspeed.portlet.PortletContext context)
           
 void setEndIndex(long i)
           
 void setMaxResults(java.lang.String string)
           
 void setPortletRequest(org.apache.jetspeed.portlet.PortletRequest request)
           
 MessageMap setProperties(org.apache.jetspeed.portlet.PortletRequest portletRequest)
          sets the PortletRequest Object
 void setReqXML(java.lang.String string)
           
 void setResponseXML(java.lang.String string)
           
 void setStartIndex(long i)
           
 void setWpsContext(WPSContext context)
           
 java.lang.String toXML()
          Encodes the object properties to XML
 MessageMap updateProperties(org.apache.jetspeed.portlet.PortletRequest portletRequest)
          updates the properties of the bean from the portlet request
 MessageList validate(org.apache.jetspeed.portlet.PortletRequest request, java.lang.String action)
          Validation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchBean

public SearchBean()
Method Detail

toXML

public java.lang.String toXML()
Description copied from interface: IDataBean
Encodes the object properties to XML

Specified by:
toXML in interface IDataBean

fromXML

public void fromXML(java.lang.String xml)
Mediator calls thsi method and sets the xml

Specified by:
fromXML in interface IDataBean

setProperties

public MessageMap setProperties(org.apache.jetspeed.portlet.PortletRequest portletRequest)
sets the PortletRequest Object


validate

public MessageList validate(org.apache.jetspeed.portlet.PortletRequest request,
                            java.lang.String action)
Validation


fromXML

public void fromXML(org.w3c.dom.Node domNode)
Description copied from interface: IDataBean
Decodes the XML Element and sets the element values as the bean properties

Specified by:
fromXML in interface IDataBean

getSearchCriteriaElements

public java.util.ArrayList getSearchCriteriaElements()
                                              throws UIException,
                                                     WPCMediatorException
This method returns the list of BasicSearchElement

Specified by:
getSearchCriteriaElements in interface IBaseSearch
Returns:
ArraList
Throws:
UIException
WPCMediatorException

getSearchAttributes

public Attribute[] getSearchAttributes()
                                throws UIException,
                                       WPCMediatorException
Returns:
ArrayList of Attribute Objects
Throws:
UIException
WPCMediatorException

getSearchResultAttributes

public Attribute[] getSearchResultAttributes()
                                      throws UIException,
                                             WPCMediatorException
Throws:
UIException
WPCMediatorException

getSearchResults

public ResultData getSearchResults()
                            throws UIException
This method returns the ResultData which holds the search results

Specified by:
getSearchResults in interface IBaseSearch
Returns:
ResultData
Throws:
UIException

getReqXML

public java.lang.String getReqXML()
Specified by:
getReqXML in interface IBaseSearch
Returns:
string

setReqXML

public void setReqXML(java.lang.String string)
Specified by:
setReqXML in interface IBaseSearch
Parameters:
string -

getResponseXML

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

setResponseXML

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

getPortletRequest

public org.apache.jetspeed.portlet.PortletRequest getPortletRequest()
Returns:
portletRequest

setPortletRequest

public void setPortletRequest(org.apache.jetspeed.portlet.PortletRequest request)
Parameters:
request -

getContext

public org.apache.jetspeed.portlet.PortletContext getContext()
Returns:
portletContext

setContext

public void setContext(org.apache.jetspeed.portlet.PortletContext context)
Parameters:
context -

getWpsContext

public WPSContext getWpsContext()
Returns:
wpscontext

setWpsContext

public void setWpsContext(WPSContext context)
Parameters:
context -

getMaxResults

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

setMaxResults

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

updateProperties

public MessageMap updateProperties(org.apache.jetspeed.portlet.PortletRequest portletRequest)
Description copied from interface: IDataBean
updates the properties of the bean from the portlet request

Specified by:
updateProperties in interface IDataBean
Parameters:
portletRequest - - The portletrequest containing the prperties to represent.
Returns:
MessageMap - null/empy in case of no errors - populated with the appropriate list in case of errors

getSearchResultElements

public java.util.ArrayList getSearchResultElements()
                                            throws UIException,
                                                   WPCMediatorException
Returns:
arraylist
Throws:
UIException
WPCMediatorException

prepareFlatAttributeMap

public java.util.HashMap prepareFlatAttributeMap(Attribute[] attributesParam)
prepare map of all attributes available including the map inside group attributes

Parameters:
attributesParam -
Returns:
hashmap

getEndIndex

public long getEndIndex()

getStartIndex

public long getStartIndex()
Returns:
long

setEndIndex

public void setEndIndex(long i)
Parameters:
i -

setStartIndex

public void setStartIndex(long i)
Parameters:
i -

getCollabName

public java.lang.String getCollabName()
Returns:
string Returns the collabName.

setCollabName

public void setCollabName(java.lang.String collabName)
Parameters:
collabName - The collabName to set.