public class BaseSetHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
KEY |
protected javax.servlet.http.HttpServletRequest |
request |
static java.lang.String |
SELECTABLE |
static java.lang.String |
SELECTED |
Constructor and Description |
---|
BaseSetHelper() |
Modifier and Type | Method and Description |
---|---|
void |
execute(java.util.Set set,
java.lang.String listName,
java.util.List dataSet)
Default struts action one might want to execute
when selectAll, unselectAll, update set actions are clicked
on a table with an Set.
|
protected java.util.List |
getFilteredList(java.lang.String listName,
java.util.List dataSet) |
protected boolean |
lookupEquals(java.lang.String lookupKey,
java.lang.String value) |
void |
selectAll(java.util.Set set,
java.lang.String listName,
java.util.List dataSet)
Puts all systems visible to the user into the set.
|
protected void |
storeSet(java.util.Set set) |
void |
syncSelections(java.util.Set set,
java.util.List dataSet)
Syncs the selections provided by the rhnset to dataset.
|
void |
unselectAll(java.util.Set set,
java.lang.String listName,
java.util.List dataSet)
Clears set for the user.
|
void |
updateSet(java.util.Set set,
java.lang.String listName)
Updates the set with the items on the current page of the list
|
protected javax.servlet.http.HttpServletRequest request
public static final java.lang.String KEY
public static final java.lang.String SELECTABLE
public static final java.lang.String SELECTED
public void execute(java.util.Set set, java.lang.String listName, java.util.List dataSet)
set
- the set to updatelistName
- the name of the list to grab the data fromdataSet
- the dataset that contains everything in the listprotected java.util.List getFilteredList(java.lang.String listName, java.util.List dataSet)
listName
- the name of the listdataSet
- the data setprotected boolean lookupEquals(java.lang.String lookupKey, java.lang.String value)
public void updateSet(java.util.Set set, java.lang.String listName)
set
- the set to updatelistName
- the name of the list to grab the data frompublic void unselectAll(java.util.Set set, java.lang.String listName, java.util.List dataSet)
set
- the set to updatelistName
- the name of the list to grab the data fromdataSet
- the dataSet to deselectpublic void syncSelections(java.util.Set set, java.util.List dataSet)
set
- this is an Set that holds the selectionsdataSet
- the dataset that contains everything in the list.
Note theitems in the dataset are expected to implement
'com.redhat.rhn.frontend.struts.Selectable'.
These are required for use with rhnset.public void selectAll(java.util.Set set, java.lang.String listName, java.util.List dataSet)
set
- the set to updatelistName
- the name of the list to grab the data from.dataSet
- the dataset that contains everything in the list.
Note theitems in the dataset are expected to implement
'com.redhat.rhn.frontend.struts.Selectable'.
These are required for use with rhnset.protected void storeSet(java.util.Set set)