org.opencms.workplace.list
Class CmsListSearchAction

java.lang.Object
  extended byorg.opencms.workplace.tools.A_CmsHtmlIconButton
      extended byorg.opencms.workplace.list.A_CmsListAction
          extended byorg.opencms.workplace.list.CmsListIndependentAction
              extended byorg.opencms.workplace.list.A_CmsListSearchAction
                  extended byorg.opencms.workplace.list.CmsListSearchAction
All Implemented Interfaces:
I_CmsHtmlIconButton, I_CmsListAction, I_CmsSearchMethod

public class CmsListSearchAction
extends A_CmsListSearchAction
implements I_CmsSearchMethod

Default implementation for a seach action in an html list.

It allows to search in several columns, including item details.

Since:
6.0.0
Version:
$Revision: 1.14 $
Author:
Michael Moossen

Field Summary
 
Fields inherited from class org.opencms.workplace.list.A_CmsListSearchAction
m_defaultShowAllAction, SEARCH_ACTION_ID, SHOWALL_ACTION_ID
 
Fields inherited from class org.opencms.workplace.list.CmsListIndependentAction
ACTION_EXPLORER_SWITCH_ID
 
Fields inherited from class org.opencms.workplace.tools.A_CmsHtmlIconButton
EMPTY_MESSAGE, m_id
 
Constructor Summary
CmsListSearchAction(CmsListColumnDefinition column)
          Default Constructor.
 
Method Summary
 void addColumn(CmsListColumnDefinition column)
          Adds a column to search into.
 java.lang.String buttonHtml(CmsWorkplace wp)
          Returns the necessary html code.
 java.util.List filter(java.util.List items, java.lang.String filter)
          Returns a sublist of the given items, that match the filter string.
 java.util.List getColumns()
          Returns the list of columns to be searched.
 void setWp(A_CmsListDialog wp)
          Sets the workplace dialog object.
 
Methods inherited from class org.opencms.workplace.list.A_CmsListSearchAction
getShowAllAction, setListId, setShowAllAction, useDefaultShowAllAction
 
Methods inherited from class org.opencms.workplace.list.CmsListIndependentAction
getDefaultExplorerSwitchAction, resolveOnClic
 
Methods inherited from class org.opencms.workplace.list.A_CmsListAction
buttonHtml, defaultConfirmationHtml, getConfirmationMessage, getListId, getWp, setConfirmationMessage
 
Methods inherited from class org.opencms.workplace.tools.A_CmsHtmlIconButton
defaultButtonHtml, defaultButtonHtml, defaultHelpHtml, getHelpText, getIconPath, getId, getName, isEnabled, isVisible, setEnabled, setHelpText, setIconPath, setName, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opencms.workplace.list.I_CmsListAction
buttonHtml, getConfirmationMessage, getListId, getWp, setConfirmationMessage, setListId
 
Methods inherited from interface org.opencms.workplace.tools.I_CmsHtmlIconButton
getHelpText, getIconPath, getId, getName, isEnabled, isVisible, setEnabled, setHelpText, setIconPath, setName, setVisible
 

Constructor Detail

CmsListSearchAction

public CmsListSearchAction(CmsListColumnDefinition column)
Default Constructor.

Parameters:
column - the column to search into
Method Detail

addColumn

public void addColumn(CmsListColumnDefinition column)
Adds a column to search into.

Parameters:
column - the additional column to search into

buttonHtml

public java.lang.String buttonHtml(CmsWorkplace wp)
Description copied from interface: I_CmsHtmlIconButton
Returns the necessary html code.

Specified by:
buttonHtml in interface I_CmsHtmlIconButton
Overrides:
buttonHtml in class A_CmsListSearchAction
See Also:
A_CmsListSearchAction.buttonHtml(org.opencms.workplace.CmsWorkplace)

filter

public java.util.List filter(java.util.List items,
                             java.lang.String filter)
Description copied from interface: I_CmsSearchMethod
Returns a sublist of the given items, that match the filter string.

Specified by:
filter in interface I_CmsSearchMethod
Parameters:
items - the items to filter
filter - the filter string
Returns:
the filtered sublist
See Also:
I_CmsSearchMethod.filter(java.util.List, java.lang.String)

getColumns

public java.util.List getColumns()
Returns the list of columns to be searched.

Returns:
a list of CmsListColumnDefinition objects

setWp

public void setWp(A_CmsListDialog wp)
Description copied from interface: I_CmsListAction
Sets the workplace dialog object.

Specified by:
setWp in interface I_CmsListAction
Overrides:
setWp in class A_CmsListAction
See Also:
I_CmsListAction.setWp(org.opencms.workplace.list.A_CmsListDialog)