Class ResultContainer<V>

java.lang.Object
io.jenkins.plugins.restlistparam.model.ResultContainer<V>

public class ResultContainer<V> extends Object
  • Constructor Details

    • ResultContainer

      public ResultContainer(V defaultValue)
  • Method Details

    • setErrorMsg

      public void setErrorMsg(String errorMsg)
    • setNoValues

      public void setNoValues(String errorMsg)
      Records that the response was fetched and parsed fine but yielded no values. Unlike other errors, this may be an expected outcome (see allowEmptyValue).
    • isNoValues

      public boolean isNoValues()
    • getErrorMsg

      public Optional<String> getErrorMsg()
    • setValue

      public void setValue(V value)
    • getValue

      public V getValue()
    • getPagesFetched

      public int getPagesFetched()
      Returns:
      How many pages were fetched to produce this result (1 without pagination)
    • setPagesFetched

      public void setPagesFetched(int pagesFetched)
    • isPageLimitReached

      public boolean isPageLimitReached()
      Returns:
      Whether pagination stopped at the page limit while a next page was still available
    • setPageLimitReached

      public void setPageLimitReached(boolean pageLimitReached)
    • getErrorDetails

      public Optional<FetchErrorDetails> getErrorDetails()
      Returns:
      Request metadata of the failure, when the error came from fetching
    • setErrorDetails

      public void setErrorDetails(FetchErrorDetails errorDetails)
    • getErrorCause

      public String getErrorCause()
      Returns:
      The HTTP status code or the exception's simple name behind the error, if known
    • setErrorCause

      public void setErrorCause(String errorCause)
    • isTimedOut

      public boolean isTimedOut()
      Returns:
      Whether the error is that the fetch ran out of time
    • setTimedOut

      public void setTimedOut(boolean timedOut)