com.atlassian.greenhopper.web.rapid
Class ResultEntry<T>

java.lang.Object
  extended by com.atlassian.greenhopper.web.rapid.RestTemplate
      extended by com.atlassian.greenhopper.web.rapid.ResultEntry<T>

public class ResultEntry<T>
extends RestTemplate

Represents a result object


Constructor Summary
ResultEntry()
           
 
Method Summary
static
<T> ResultEntry<T>
createCombinedResult(ErrorCollection errors, T successObject, I18n2 i18n)
           
static
<T> ResultEntry<T>
createErrorResult(ErrorCollection errorCollection, I18n2 i18n)
          Creates an error result
 T getSuccess()
           
 boolean hasErrors()
           
static
<T> ResultEntry<T>
success()
           
static
<T> ResultEntry<T>
success(T successObject)
           
 
Methods inherited from class com.atlassian.greenhopper.web.rapid.RestTemplate
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResultEntry

public ResultEntry()
Method Detail

success

public static <T> ResultEntry<T> success()

success

public static <T> ResultEntry<T> success(T successObject)

getSuccess

public T getSuccess()

hasErrors

public boolean hasErrors()

createErrorResult

public static <T> ResultEntry<T> createErrorResult(ErrorCollection errorCollection,
                                                   I18n2 i18n)
Creates an error result

Parameters:
errorCollection - the collection of errors
i18n - the i18n object for the user
Returns:
an error ResultEntry object

createCombinedResult

public static <T> ResultEntry<T> createCombinedResult(ErrorCollection errors,
                                                      T successObject,
                                                      I18n2 i18n)


Copyright © 2007-2012 Atlassian. All Rights Reserved.