com.atlassian.confluence.ui.rest.content
Class RestHelper

java.lang.Object
  extended by com.atlassian.confluence.ui.rest.content.RestHelper

public class RestHelper
extends Object


Constructor Summary
RestHelper()
           
 
Method Summary
static Map<String,Object> createFailureResultMap(IllegalArgumentException e)
          Creates a JSON serializable response when a request fails
static Map<String,Object> createSuccessResultMap(Iterable<Label> labels)
          Creates a JSON serializable response when a request succeeds
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RestHelper

public RestHelper()
Method Detail

createFailureResultMap

public static Map<String,Object> createFailureResultMap(IllegalArgumentException e)
Creates a JSON serializable response when a request fails

Parameters:
e - Exception that caused the request to fail
Returns:
a JSON serializable Map containing REST response

createSuccessResultMap

public static Map<String,Object> createSuccessResultMap(Iterable<Label> labels)
Creates a JSON serializable response when a request succeeds

Parameters:
labels - Label data to include in the rest response
Returns:
a JSON serializable Map containing REST response


Copyright © 2003–2015 Atlassian. All rights reserved.