public abstract class AgileResource extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
ATTR_ID |
static String |
ATTR_NAME |
static String |
ATTR_SELF |
static String |
RESOURCE_URI |
| Constructor and Description |
|---|
AgileResource(RestClient restclient,
net.sf.json.JSONObject json)
Creates a new Agile resource.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
getAttribute(String name)
Retrieve the specified attribute as a generic object.
|
long |
getId() |
String |
getName() |
protected static <T extends AgileResource> |
getResource(Class<T> type,
Object r,
RestClient restclient)
Gets an Agile resource from the given object.
|
protected static <T extends AgileResource> |
getResourceArray(Class<T> type,
Object ra,
RestClient restclient,
String listName)
Gets a list of GreenHopper resources from the given object.
|
protected RestClient |
getRestclient() |
String |
getSelfURL() |
String |
toString() |
public static final String ATTR_ID
public static final String ATTR_NAME
public static final String ATTR_SELF
public static final String RESOURCE_URI
public AgileResource(RestClient restclient, net.sf.json.JSONObject json) throws JiraException
restclient - REST client instancejson - JSON payloadJiraException - when the retrieval failsprotected static <T extends AgileResource> T getResource(Class<T> type, Object r, RestClient restclient) throws JiraException
type - Resource data typer - a JSONObject instancerestclient - REST client instanceJiraException - when the retrieval failsprotected static <T extends AgileResource> List<T> getResourceArray(Class<T> type, Object ra, RestClient restclient, String listName) throws JiraException
type - Resource data typera - a JSONArray instancerestclient - REST client instancelistName - The name of the list of items from the JSON result.JiraException - when the retrieval failspublic long getId()
public String getName()
public String getSelfURL()
protected RestClient getRestclient()
public Object getAttribute(String name)
name - The name of the attribute to retrieve.Copyright © 2022. All rights reserved.