Class AbstractFindListMultiModeActionSupport.FindListMultiModeResponse<M extends Serializable,K extends Serializable,T extends Serializable>
java.lang.Object
name.matthewgreet.strutscommons.action.AbstractFindListMultiModeActionSupport.FindListMultiModeResponse<M,K,T>
- Enclosing class:
AbstractFindListMultiModeActionSupport<M extends Serializable,
K extends Serializable, T extends Serializable, F extends Form>
public static class AbstractFindListMultiModeActionSupport.FindListMultiModeResponse<M extends Serializable,K extends Serializable,T extends Serializable>
extends Object
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor for failure to create a finder Command or list rejected. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addErrorMessage
(String text) Convenience function to add error message.void
addInfoMessage
(String text) Convenience function to add info message.Returns error messages to display.Action result name to use if response is failure.Returns full list or base record list that's already been found for full list or base record pagination mode, or null otherwise.ListFinder
<M, T> Returns full list finder or base record list finder Command object for full list or base record pagination mode.Returns id list that's already been found for page by ids pagination mode, or null otherwise.Returns id list finder for page by ids pagination mode.Returns list size that's already been found for page by index pagination mode, or null otherwise.Returns list size finder for page by index pagination mode.Returns info messages to display.Returns page by index finder for page by index pagination mode.Returns pagination mode.boolean
Indicates creating the finder Command failed or, if it was retrieved, the list was rejected.Action result name to use if response is success.Action result name to use if response is success, useSuccessSingle is true, and search result contains just one result.boolean
If true and search result has just one entry, uses successSingleForwardName Action result.static <M extends Serializable,
K extends Serializable, T extends Serializable>
AbstractFindListMultiModeActionSupport.FindListMultiModeResponse<M, K, T> makeFailureResponse
(String message) Returns response for a failure to create a finder Command or list was rejected.static <M extends Serializable,
K extends Serializable, T extends Serializable>
AbstractFindListMultiModeActionSupport.FindListMultiModeResponse<M, K, T> makeSuccessBaseRecordListResponse
(ListFinder<M, T> finderCommand) Returns response for a successfully created base record list finder Command.static <M extends Serializable,
K extends Serializable, T extends Serializable>
AbstractFindListMultiModeActionSupport.FindListMultiModeResponse<M, K, T> makeSuccessBaseRecordListWithResultsResponse
(ListFinder<M, T> finderCommand, List<T> resultList) Returns response for a successfully created base record list finder Command with results already found.static <M extends Serializable,
K extends Serializable, T extends Serializable>
AbstractFindListMultiModeActionSupport.FindListMultiModeResponse<M, K, T> makeSuccessFullListResponse
(ListFinder<M, T> finderCommand) Returns response for a successfully created full list finder Command.static <M extends Serializable,
K extends Serializable, T extends Serializable>
AbstractFindListMultiModeActionSupport.FindListMultiModeResponse<M, K, T> makeSuccessFullListWithResultsResponse
(ListFinder<M, T> finderCommand, List<T> resultList) Returns response for a successfully created full list finder Command with results already found.static <M extends Serializable,
K extends Serializable, T extends Serializable>
AbstractFindListMultiModeActionSupport.FindListMultiModeResponse<M, K, T> makeSuccessIdListResponse
(IdListFinder<M, K> finderCommand) Returns response for a successfully created id list finder Command.static <M extends Serializable,
K extends Serializable, T extends Serializable>
AbstractFindListMultiModeActionSupport.FindListMultiModeResponse<M, K, T> makeSuccessIdListWithResultsResponse
(IdListFinder<M, K> finderCommand, List<K> idList) Returns response for a successfully created id list finder Command with results already found.static <M extends Serializable,
K extends Serializable, T extends Serializable>
AbstractFindListMultiModeActionSupport.FindListMultiModeResponse<M, K, T> makeSuccessIndexListResponse
(ListSizeFinder<M> listSizeFinderCommand, PageByIndexRangeFinder<M, T> pageByIndexFinderCommand) Returns response for a successfully created index list finder Command and page by index Command.static <M extends Serializable,
K extends Serializable, T extends Serializable>
AbstractFindListMultiModeActionSupport.FindListMultiModeResponse<M, K, T> makeSuccessIndexListWithResultsResponse
(ListSizeFinder<M> listSizeFinderCommand, PageByIndexRangeFinder<M, T> pageByIndexFinderCommand, int listSize) Returns response for a successfully created index list finder Command and page by index Command.void
setErrors
(Collection<String> errors) void
setFailureResultName
(String value) void
setFullList
(List<T> fullList) void
setFullListFinderCommand
(ListFinder<M, T> fullListFinderCommand) void
void
setIdListFinderCommand
(IdListFinder<M, K> idListFinderCommand) void
setListSize
(Integer listSize) void
setListSizeFinderCommand
(ListSizeFinder<M> listSizeFinderCommand) void
setMessages
(Collection<String> messages) void
setPageByIndexRangeFinder
(PageByIndexRangeFinder<M, T> pageByIndexRangeFinder) void
setPaginationMode
(ListCache.PaginationMode paginationMode) void
setRejected
(boolean rejected) void
setSuccessResultName
(String value) void
setSuccessSingleForwardName
(String successSingleForwardName) void
setUseSuccessSingle
(boolean useSuccessSingle)
-
Constructor Details
-
FindListMultiModeResponse
public FindListMultiModeResponse()Constructor for failure to create a finder Command or list rejected.
-
-
Method Details
-
makeFailureResponse
public static <M extends Serializable,K extends Serializable, AbstractFindListMultiModeActionSupport.FindListMultiModeResponse<M,T extends Serializable> K, makeFailureResponseT> (String message) Returns response for a failure to create a finder Command or list was rejected. -
makeSuccessBaseRecordListResponse
public static <M extends Serializable,K extends Serializable, AbstractFindListMultiModeActionSupport.FindListMultiModeResponse<M,T extends Serializable> K, makeSuccessBaseRecordListResponseT> (ListFinder<M, T> finderCommand) Returns response for a successfully created base record list finder Command. -
makeSuccessBaseRecordListWithResultsResponse
public static <M extends Serializable,K extends Serializable, AbstractFindListMultiModeActionSupport.FindListMultiModeResponse<M,T extends Serializable> K, makeSuccessBaseRecordListWithResultsResponseT> (ListFinder<M, T> finderCommand, List<T> resultList) Returns response for a successfully created base record list finder Command with results already found. -
makeSuccessFullListResponse
public static <M extends Serializable,K extends Serializable, AbstractFindListMultiModeActionSupport.FindListMultiModeResponse<M,T extends Serializable> K, makeSuccessFullListResponseT> (ListFinder<M, T> finderCommand) Returns response for a successfully created full list finder Command. -
makeSuccessFullListWithResultsResponse
public static <M extends Serializable,K extends Serializable, AbstractFindListMultiModeActionSupport.FindListMultiModeResponse<M,T extends Serializable> K, makeSuccessFullListWithResultsResponseT> (ListFinder<M, T> finderCommand, List<T> resultList) Returns response for a successfully created full list finder Command with results already found. -
makeSuccessIdListResponse
public static <M extends Serializable,K extends Serializable, AbstractFindListMultiModeActionSupport.FindListMultiModeResponse<M,T extends Serializable> K, makeSuccessIdListResponseT> (IdListFinder<M, K> finderCommand) Returns response for a successfully created id list finder Command. -
makeSuccessIdListWithResultsResponse
public static <M extends Serializable,K extends Serializable, AbstractFindListMultiModeActionSupport.FindListMultiModeResponse<M,T extends Serializable> K, makeSuccessIdListWithResultsResponseT> (IdListFinder<M, K> finderCommand, List<K> idList) Returns response for a successfully created id list finder Command with results already found. -
makeSuccessIndexListResponse
public static <M extends Serializable,K extends Serializable, AbstractFindListMultiModeActionSupport.FindListMultiModeResponse<M,T extends Serializable> K, makeSuccessIndexListResponseT> (ListSizeFinder<M> listSizeFinderCommand, PageByIndexRangeFinder<M, T> pageByIndexFinderCommand) Returns response for a successfully created index list finder Command and page by index Command. -
makeSuccessIndexListWithResultsResponse
public static <M extends Serializable,K extends Serializable, AbstractFindListMultiModeActionSupport.FindListMultiModeResponse<M,T extends Serializable> K, makeSuccessIndexListWithResultsResponseT> (ListSizeFinder<M> listSizeFinderCommand, PageByIndexRangeFinder<M, T> pageByIndexFinderCommand, int listSize) Returns response for a successfully created index list finder Command and page by index Command. -
getRejected
public boolean getRejected()Indicates creating the finder Command failed or, if it was retrieved, the list was rejected. If set, template base class uses action result named bygetFailureResultName()
, otherwise uses action result named bygetSuccessResultName()
. Defaults to true. -
setRejected
public void setRejected(boolean rejected) -
getFailureResultName
Action result name to use if response is failure. Defaults to "input". -
setFailureResultName
-
getSuccessResultName
Action result name to use if response is success. Defaults to "success". -
setSuccessResultName
-
getSuccessSingleForwardName
Action result name to use if response is success, useSuccessSingle is true, and search result contains just one result. -
setSuccessSingleForwardName
-
getFullListFinderCommand
Returns full list finder or base record list finder Command object for full list or base record pagination mode. -
setFullListFinderCommand
-
getFullList
Returns full list or base record list that's already been found for full list or base record pagination mode, or null otherwise. -
setFullList
-
getIdListFinderCommand
Returns id list finder for page by ids pagination mode. -
setIdListFinderCommand
-
getIdList
Returns id list that's already been found for page by ids pagination mode, or null otherwise. -
setIdList
-
getListSizeFinderCommand
Returns list size finder for page by index pagination mode. listSizeFinderCommand and pageByIndexRangeFinder are set in pairs. -
setListSizeFinderCommand
-
getPageByIndexRangeFinder
Returns page by index finder for page by index pagination mode. listSizeFinderCommand and pageByIndexRangeFinder are set in pairs. -
setPageByIndexRangeFinder
-
getListSize
Returns list size that's already been found for page by index pagination mode, or null otherwise. -
setListSize
-
getUseSuccessSingle
public boolean getUseSuccessSingle()If true and search result has just one entry, uses successSingleForwardName Action result. -
setUseSuccessSingle
public void setUseSuccessSingle(boolean useSuccessSingle) -
getPaginationMode
Returns pagination mode. -
setPaginationMode
-
getErrors
Returns error messages to display. -
setErrors
-
getMessages
Returns info messages to display. -
setMessages
-
addErrorMessage
Convenience function to add error message. -
addInfoMessage
Convenience function to add info message.
-