public abstract class SearchResultAction extends Object implements HMCStatefulAction
| Modifier and Type | Field and Description |
|---|---|
static String |
FLEXIBLESEARCH_PARAMETERS
action parameter - flexible search parameter map
|
static String |
FLEXIBLESEARCH_QUERY
action parameter - flexible search query String
|
static String |
GENERIC_QUERY |
static String |
ITEM_TYPE
action parameter - the type of the item
|
static String |
SEARCH_CONTEXT |
static String |
SELECTED_ITEMS
action parameter - the list of currently selected items
|
static String |
USE_SELECTED_ONLY
action parameter - Boolean flag, use only the selected items when set to true
|
| Constructor and Description |
|---|
SearchResultAction() |
| Modifier and Type | Method and Description |
|---|---|
AbstractActionDialogChip |
createDialogChip(Chip parent,
AbstractActionChip actionChip) |
protected Collection<Item> |
getAllItems(ActionEvent actionEvent)
Convenience method to fetch all items regardless of a selection is made or the complete item range is requested.
|
String |
getConfirmationMessage()
This default implementation returns
null (It means the standard confirmation message will be used if
confirmation is on). |
protected Map |
getFlexibleSearchParameters(ActionEvent actionEvent)
Reads the flexible search query from the ActionEvent.
|
protected String |
getFlexibleSearchQuery(ActionEvent actionEvent)
Reads the flexible search query from the ActionEvent.
|
protected GenericQuery |
getGenericQuery(ActionEvent actionEvent)
Reads the generic search query from the ActionEvent if available.
|
protected HMCContext |
getHMCContext(ActionEvent actionEvent) |
protected ComposedType |
getItemType(ActionEvent actionEvent)
Reads item type from the ActionEvent.
|
protected Map |
getNodeParams() |
protected List |
getSelectedItems(ActionEvent actionEvent)
Reads the list of selected items from the ActionEvent.
|
protected boolean |
getUseSelectedOnly(ActionEvent actionEvent)
Reads the useSelectedOnly flag from the ActionEvent.
|
boolean |
hasDialogChip(AbstractActionChip actionChip) |
void |
initialize(SearchResultActionNode node) |
boolean |
isActive(ActionEvent actionEvent) |
boolean |
isVisible(ActionEvent actionEvent) |
boolean |
needConfirmation()
This default implementation returns
false. |
abstract ActionResult |
perform(ActionEvent actionEvent)
This action requires Map of parameters in ActionEvent data.
|
protected SearchResult |
search(String query,
Map parameters,
int start,
int count,
boolean dontNeedTotal)
Executes search via
FlexibleSearch. |
public static final String ITEM_TYPE
public static final String FLEXIBLESEARCH_QUERY
public static final String FLEXIBLESEARCH_PARAMETERS
public static final String SELECTED_ITEMS
public static final String USE_SELECTED_ONLY
public static final String GENERIC_QUERY
public static final String SEARCH_CONTEXT
public final void initialize(SearchResultActionNode node)
protected Map getNodeParams()
protected HMCContext getHMCContext(ActionEvent actionEvent)
public abstract ActionResult perform(ActionEvent actionEvent) throws JaloBusinessException
perform in interface HMCActionactionEvent - JaloBusinessExceptionITEM_TYPE,
FLEXIBLESEARCH_QUERY,
FLEXIBLESEARCH_PARAMETERS,
SELECTED_ITEMS,
USE_SELECTED_ONLYpublic boolean needConfirmation()
false. Overwrite this method if you want confirmation for this
action.needConfirmation in interface HMCActionpublic String getConfirmationMessage()
null (It means the standard confirmation message will be used if
confirmation is on). Overwrite this method if you want your own confirmation message for this action.getConfirmationMessage in interface HMCActionprotected ComposedType getItemType(ActionEvent actionEvent)
actionEvent - protected String getFlexibleSearchQuery(ActionEvent actionEvent)
actionEvent - protected GenericQuery getGenericQuery(ActionEvent actionEvent)
actionEvent - protected Map getFlexibleSearchParameters(ActionEvent actionEvent)
actionEvent - protected List getSelectedItems(ActionEvent actionEvent)
actionEvent - protected boolean getUseSelectedOnly(ActionEvent actionEvent)
actionEvent - protected SearchResult search(String query, Map parameters, int start, int count, boolean dontNeedTotal)
FlexibleSearch.
Please note that this method does not work for viewtypes - use
getAllItems(ActionEvent) instead to fetch all viewtype result items.
query - parameters - start - count - dontNeedTotal - protected Collection<Item> getAllItems(ActionEvent actionEvent)
actionEvent - the action eventpublic boolean hasDialogChip(AbstractActionChip actionChip)
hasDialogChip in interface HMCActionpublic AbstractActionDialogChip createDialogChip(Chip parent, AbstractActionChip actionChip)
createDialogChip in interface HMCActionpublic boolean isActive(ActionEvent actionEvent)
isActive in interface HMCStatefulActionpublic boolean isVisible(ActionEvent actionEvent)
isVisible in interface HMCStatefulActionCopyright © 2017 SAP SE. All Rights Reserved.