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 Details

    • FindBaseRecordListResponse

      public FindBaseRecordListResponse()
      Constructor for failure to create a finder Strategy or list rejected.
    • FindBaseRecordListResponse

      public FindBaseRecordListResponse(ListFinder<M,T> baseRecordListfinder)
      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 by getFailureResultName(), otherwise uses action result named by getSuccessResultName(). Defaults to true.
    • getBaseRecordListFinder

      public ListFinder<M,T> getBaseRecordListFinder()
      Returns Strategy for reloading list with the search parameters.
    • getFailureResultName

      public String getFailureResultName()
      Action result name to use if response reports failure. Defaults to "input".
    • setFailureResultName

      public void setFailureResultName(String value)
    • getSuccessResultName

      public String getSuccessResultName()
      Action result name to use if response reports success. Defaults to "success".
    • setSuccessResultName

      public void setSuccessResultName(String value)
    • getList

      public List<T> getList()
      List returned by finderCommand if it was already retrieved, or null if not.
    • setList

      public void setList(List<T> list)
    • getErrors

      public Collection<String> 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

      public Collection<String> 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

      public void addErrorMessage(String text)
      Convenience function to add error message.
    • addInfoMessage

      public void addInfoMessage(String text)
      Convenience function to add info message.