com.atlassian.jira.rest.util
Class ResponseUtils

java.lang.Object
  extended by com.atlassian.jira.rest.util.ResponseUtils

public class ResponseUtils
extends Object

Builds response objects for REST service

Since:
v6.1

Method Summary
static javax.ws.rs.core.Response throwEx(ErrorCollection errorCollection)
          Throws exceptions that corresponds to a ErrorCollection.Reason
static void throwIfError(SimpleErrorCollection errorCollection)
          Checks if the collection has an error and throws if necessary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

throwEx

public static javax.ws.rs.core.Response throwEx(ErrorCollection errorCollection)
Throws exceptions that corresponds to a ErrorCollection.Reason

Parameters:
errorCollection - error list
Returns:
never, only throws exceptions

throwIfError

public static void throwIfError(SimpleErrorCollection errorCollection)
Checks if the collection has an error and throws if necessary

Parameters:
errorCollection - the error collection


Copyright © 2002-2015 Atlassian. All Rights Reserved.