Class AbstractFindIndexListActionSupport.FindIndexListResponse<M extends Serializable,T extends Serializable>
java.lang.Object
name.matthewgreet.strutscommons.action.AbstractFindIndexListActionSupport.FindIndexListResponse<M,T>
- Enclosing class:
AbstractFindIndexListActionSupport<M extends Serializable,
T extends Serializable, F extends AbstractForm>
public static class AbstractFindIndexListActionSupport.FindIndexListResponse<M extends Serializable,T extends Serializable>
extends Object
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor for failure to create a finder Command.FindIndexListResponse
(ListSizeFinder<M> sizeFinderCommand, PageByIndexRangeFinder<M, T> pageFinderCommand) Constructor for successfully creating a finder Command. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addErrorMessage
(String text) Convenience function to add error message.void
addInfoMessage
(String text) Convenience function to add info message.Struts errors messages to be used, usually for update failure.Action result name to use if response reports failure.List size returned by sizeFinderCommand if it was already retrieved, or null if not.Struts information messages to be used, usually for update success.Returns Command object for reloading list size with the search parameters.boolean
Indicates creating the finder Command failed or, if it was retrieved, the list size was rejected.Returns Command object for reloading list size with the search parameters.Action result name to use if response reports success.static <M extends Serializable,
T extends Serializable>
AbstractFindIndexListActionSupport.FindIndexListResponse<M, T> makeFailureResponse
(String message) Returns response for a failure to create a finder Command or list size was rejected.static <M extends Serializable,
T extends Serializable>
AbstractFindIndexListActionSupport.FindIndexListResponse<M, T> makeSuccessResponse
(ListSizeFinder<M> sizeFinderCommand, PageByIndexRangeFinder<M, T> pageFinderCommand) Returns response for a successfully created finder Command and template class will retrieve list size.static <M extends Serializable,
T extends Serializable>
AbstractFindIndexListActionSupport.FindIndexListResponse<M, T> makeSuccessWithListSizeResponse
(ListSizeFinder<M> sizeFinderCommand, PageByIndexRangeFinder<M, T> pageFinderCommand, int listSize) Returns response for a successfully created finder Command and list size has already been retrieved.void
setFailureResultName
(String value) void
setListSize
(Integer listSize) void
setSuccessResultName
(String value)
-
Constructor Details
-
FindIndexListResponse
public FindIndexListResponse()Constructor for failure to create a finder Command. -
FindIndexListResponse
public FindIndexListResponse(ListSizeFinder<M> sizeFinderCommand, PageByIndexRangeFinder<M, T> pageFinderCommand) Constructor for successfully creating a finder Command.- Parameters:
sizeFinderCommand
- Command object for retrieving list size, configured with any search parameters.pageFinderCommand
- Command object for retrieving page, configured with any search parameters.
-
-
Method Details
-
makeFailureResponse
public static <M extends Serializable,T extends Serializable> AbstractFindIndexListActionSupport.FindIndexListResponse<M,T> makeFailureResponse(String message) Returns response for a failure to create a finder Command or list size was rejected. -
makeSuccessResponse
public static <M extends Serializable,T extends Serializable> AbstractFindIndexListActionSupport.FindIndexListResponse<M,T> makeSuccessResponse(ListSizeFinder<M> sizeFinderCommand, PageByIndexRangeFinder<M, T> pageFinderCommand) Returns response for a successfully created finder Command and template class will retrieve list size. -
makeSuccessWithListSizeResponse
public static <M extends Serializable,T extends Serializable> AbstractFindIndexListActionSupport.FindIndexListResponse<M,T> makeSuccessWithListSizeResponse(ListSizeFinder<M> sizeFinderCommand, PageByIndexRangeFinder<M, T> pageFinderCommand, int listSize) Returns response for a successfully created finder Command and list size has already been retrieved. -
getRejected
public boolean getRejected()Indicates creating the finder Command failed or, if it was retrieved, the list size was rejected. If set, template base class uses action result named bygetFailureResultName()
, otherwise uses action result named bygetSuccessResultName()
. Defaults to true. -
getSizeFinderCommand
Returns Command object for reloading list size with the search parameters. -
getPageFinderCommand
Returns Command object for reloading list size with the search parameters. -
getFailureResultName
Action result name to use if response reports failure. Defaults to "input". -
setFailureResultName
-
getSuccessResultName
Action result name to use if response reports success. Defaults to "success". -
setSuccessResultName
-
getListSize
List size returned by sizeFinderCommand if it was already retrieved, or null if not. -
setListSize
-
getErrors
Struts errors messages to be used, usually for update failure. An error message does not indicate an error (use default constructor) and is displayed even for success (though that's unusual). -
getMessages
Struts information messages to be used, usually for update success. An info message does not indicate a success (use constructor accepting size and page finders) and is displayed even for failure (though that's unusual). -
addErrorMessage
Convenience function to add error message. -
addInfoMessage
Convenience function to add info message.
-