Class AbstractFindBaseRecordListActionSupport.FindBaseRecordListResponse<M extends Serializable,T extends Serializable>
java.lang.Object
name.matthewgreet.strutscommons.action.AbstractFindBaseRecordListActionSupport.FindBaseRecordListResponse<M,T>
- Enclosing class:
AbstractFindBaseRecordListActionSupport<M extends Serializable,T extends Serializable, F extends AbstractForm>
public static class AbstractFindBaseRecordListActionSupport.FindBaseRecordListResponse<M extends Serializable,T extends Serializable>
extends Object
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor for failure to create a finder Strategy or list rejected.FindBaseRecordListResponse(ListFinder<M, T> baseRecordListfinder) Constructor for successfully creating a finder Strategy. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddErrorMessage(String text) Convenience function to add error message.voidaddInfoMessage(String text) Convenience function to add info message.ListFinder<M, T> Returns Strategy for reloading list with the search parameters.Struts errors messages to be used, usually for update failure.Action result name to use if response reports failure.getList()List returned by finderCommand if it was already retrieved, or null if not.Struts information messages to be used, usually for update success.booleanIndicates creating the finder Command failed or, if it was retrieved, the list was rejected.Action result name to use if response reports success.static <M extends Serializable,T extends Serializable>
AbstractFindBaseRecordListActionSupport.FindBaseRecordListResponse<M, T> makeFailureResponse(String message) Returns response for a failure to create a finder Strategy or list was rejected.static <M extends Serializable,T extends Serializable>
AbstractFindBaseRecordListActionSupport.FindBaseRecordListResponse<M, T> makeSuccessResponse(ListFinder<M, T> finderCommand) Returns response for a successfully created finder Command and template class will retrieve list.static <M extends Serializable,T extends Serializable>
AbstractFindBaseRecordListActionSupport.FindBaseRecordListResponse<M, T> makeSuccessWithListResponse(ListFinder<M, T> finderCommand, List<T> list) Returns response for a successfully created finder Command and list has already been retrieved.voidsetFailureResultName(String value) voidvoidsetSuccessResultName(String value)
-
Constructor Details
-
FindBaseRecordListResponse
public FindBaseRecordListResponse()Constructor for failure to create a finder Strategy or list rejected. -
FindBaseRecordListResponse
Constructor for successfully creating a finder Strategy.- Parameters:
baseRecordListfinder- Strategy for retrieving list, configured with any search parameters.
-
-
Method Details
-
makeFailureResponse
public static <M extends Serializable,T extends Serializable> AbstractFindBaseRecordListActionSupport.FindBaseRecordListResponse<M,T> makeFailureResponse(String message) Returns response for a failure to create a finder Strategy or list was rejected. -
makeSuccessResponse
public static <M extends Serializable,T extends Serializable> AbstractFindBaseRecordListActionSupport.FindBaseRecordListResponse<M,T> makeSuccessResponse(ListFinder<M, T> finderCommand) Returns response for a successfully created finder Command and template class will retrieve list. -
makeSuccessWithListResponse
public static <M extends Serializable,T extends Serializable> AbstractFindBaseRecordListActionSupport.FindBaseRecordListResponse<M,T> makeSuccessWithListResponse(ListFinder<M, T> finderCommand, List<T> list) Returns response for a successfully created finder Command and list has already been retrieved. -
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. -
getBaseRecordListFinder
Returns Strategy for reloading list 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
-
getList
List returned by finderCommand if it was already retrieved, or null if not. -
setList
-
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 list finder) and is displayed even for failure (though that's unusual). -
addErrorMessage
Convenience function to add error message. -
addInfoMessage
Convenience function to add info message.
-