public final class Field extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Field.Meta
Field metadata structure.
|
static class |
Field.Operation
Field update operation.
|
static class |
Field.ValueTuple
Value and value type pair.
|
static class |
Field.ValueType
Allowed value types.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
ASSIGNEE |
static String |
ATTACHMENT |
static String |
CHANGE_LOG |
static String |
CHANGE_LOG_ENTRIES |
static String |
CHANGE_LOG_ITEMS |
static String |
COMMENT |
static String |
COMPONENTS |
static String |
CREATED_DATE |
static String |
DATE_FORMAT |
static String |
DATETIME_FORMAT |
static String |
DESCRIPTION |
static String |
DUE_DATE |
static String |
FIX_VERSIONS |
static String |
ISSUE_LINKS |
static String |
ISSUE_TYPE |
static String |
LABELS |
static String |
PARENT |
static String |
PRIORITY |
static String |
PROJECT |
static String |
REPORTER |
static String |
RESOLUTION |
static String |
RESOLUTION_DATE |
static String |
SECURITY |
static String |
STATUS |
static String |
SUBTASKS |
static String |
SUMMARY |
static String |
TIME_ESTIMATE |
static String |
TIME_SPENT |
static String |
TIME_TRACKING |
static String |
TRANSITION_TO_STATUS |
static String |
UPDATED_DATE |
static String |
VERSIONS |
static String |
VOTES |
static String |
WATCHES |
static String |
WORKLOG |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
getBoolean(Object b)
Gets a boolean value from the given object.
|
static List<Comment> |
getComments(Object c,
RestClient restclient,
String issueKey)
Gets a list of comments from the given object.
|
static Date |
getDate(Object d)
Gets a date from the given object.
|
static Date |
getDateTime(Object d)
Gets a date with a time from the given object.
|
static Double |
getDouble(Object i)
Gets an floating-point number from the given object.
|
static Field.Meta |
getFieldMetadata(String name,
net.sf.json.JSONObject editmeta)
Extracts field metadata from an editmeta JSON object.
|
static int |
getInteger(Object i)
Gets an integer from the given object.
|
static long |
getLong(Object i)
+ * Gets a long from the given object.
|
static <TK,TV> Map<TK,TV> |
getMap(Class<TK> keytype,
Class<TV> valtype,
Object m)
Gets a generic map from the given object.
|
static List<RemoteLink> |
getRemoteLinks(Object c,
RestClient restclient)
Gets a list of remote links from the given object.
|
static <T extends Resource> |
getResource(Class<T> type,
Object r,
RestClient restclient)
Gets a JIRA resource from the given object.
|
static <T extends Resource> |
getResource(Class<T> type,
Object r,
RestClient restclient,
String parentId)
Gets a JIRA resource from the given object.
|
static <T extends Resource> |
getResourceArray(Class<T> type,
Object ra,
RestClient restclient)
Gets a list of JIRA resources from the given object.
|
static <T extends Resource> |
getResourceArray(Class<T> type,
Object ra,
RestClient restclient,
String parentId)
Gets a list of JIRA resources from the given object.
|
static String |
getString(Object s)
Gets a string from the given object.
|
static List<String> |
getStringArray(Object sa)
Gets a list of strings from the given object.
|
static TimeTracking |
getTimeTracking(Object tt)
Gets a time tracking object from the given object.
|
static List<WorkLog> |
getWorkLogs(Object c,
RestClient restclient)
Gets a list of work logs from the given object.
|
static net.sf.json.JSONArray |
toArray(Iterable iter,
String type,
String custom)
Converts an iterable type to a JSON array.
|
static Date |
toDate(Object value)
Converts the given value to a date.
|
static Object |
toJson(String name,
Object value,
net.sf.json.JSONObject editmeta)
Converts the given value to a JSON object.
|
static Object |
toJsonMap(List list)
Converts the given map to a JSON object.
|
static Field.ValueTuple |
valueById(String id)
Create a value tuple with value type of ID number.
|
static Field.ValueTuple |
valueByKey(String key)
Create a value tuple with value type of key.
|
static Field.ValueTuple |
valueByName(String name)
Create a value tuple with value type of name.
|
public static final String ASSIGNEE
public static final String ATTACHMENT
public static final String CHANGE_LOG
public static final String CHANGE_LOG_ENTRIES
public static final String CHANGE_LOG_ITEMS
public static final String COMMENT
public static final String COMPONENTS
public static final String DESCRIPTION
public static final String DUE_DATE
public static final String FIX_VERSIONS
public static final String ISSUE_LINKS
public static final String ISSUE_TYPE
public static final String LABELS
public static final String PARENT
public static final String PRIORITY
public static final String PROJECT
public static final String REPORTER
public static final String RESOLUTION
public static final String RESOLUTION_DATE
public static final String STATUS
public static final String SUBTASKS
public static final String SUMMARY
public static final String TIME_TRACKING
public static final String VERSIONS
public static final String VOTES
public static final String WATCHES
public static final String WORKLOG
public static final String TIME_ESTIMATE
public static final String TIME_SPENT
public static final String CREATED_DATE
public static final String UPDATED_DATE
public static final String TRANSITION_TO_STATUS
public static final String SECURITY
public static final String DATE_FORMAT
public static final String DATETIME_FORMAT
public static boolean getBoolean(Object b)
b - a Boolean instancepublic static List<Comment> getComments(Object c, RestClient restclient, String issueKey)
c - a JSONObject instancerestclient - REST client instanceissueKey - key of the parent issuepublic static List<WorkLog> getWorkLogs(Object c, RestClient restclient)
c - a JSONObject instancerestclient - REST client instancepublic static List<RemoteLink> getRemoteLinks(Object c, RestClient restclient)
c - a JSONObject instancerestclient - REST client instancepublic static Date getDate(Object d)
d - a string representation of a datepublic static Date getDateTime(Object d)
d - a string representation of a datepublic static Double getDouble(Object i)
i - an Double instancepublic static int getInteger(Object i)
i - an Integer instancepublic static long getLong(Object i)
public static <TK,TV> Map<TK,TV> getMap(Class<TK> keytype, Class<TV> valtype, Object m)
keytype - Map key data typevaltype - Map value data typem - a JSONObject instancepublic static <T extends Resource> T getResource(Class<T> type, Object r, RestClient restclient)
type - Resource data typer - a JSONObject instancerestclient - REST client instancepublic static <T extends Resource> T getResource(Class<T> type, Object r, RestClient restclient, String parentId)
type - Resource data typer - a JSONObject instancerestclient - REST client instanceparentId - id/key of the parent resourcepublic static String getString(Object s)
s - a String instancepublic static List<String> getStringArray(Object sa)
sa - a JSONArray instancepublic static <T extends Resource> List<T> getResourceArray(Class<T> type, Object ra, RestClient restclient)
type - Resource data typera - a JSONArray instancerestclient - REST client instancepublic static <T extends Resource> List<T> getResourceArray(Class<T> type, Object ra, RestClient restclient, String parentId)
type - Resource data typera - a JSONArray instancerestclient - REST client instanceparentId - id/key of the parent resourcepublic static TimeTracking getTimeTracking(Object tt)
tt - a JSONObject instancepublic static Field.Meta getFieldMetadata(String name, net.sf.json.JSONObject editmeta) throws JiraException
name - Field nameeditmeta - Edit metadata JSON objectJiraException - when the field is missing or metadata is badpublic static Date toDate(Object value)
value - New field valuepublic static net.sf.json.JSONArray toArray(Iterable iter, String type, String custom) throws JiraException
iter - Iterable type containing field valuestype - Name of the item typecustom - Name of the custom typeJiraExceptionpublic static Object toJson(String name, Object value, net.sf.json.JSONObject editmeta) throws JiraException, UnsupportedOperationException
name - Field namevalue - New field valueeditmeta - Edit metadata JSON objectJiraException - when a value is bad or field has invalid metadataUnsupportedOperationException - when a field type isn't supportedpublic static Object toJsonMap(List list)
list - List of values to be convertedpublic static Field.ValueTuple valueByKey(String key)
key - The key valuepublic static Field.ValueTuple valueByName(String name)
name - The name valuepublic static Field.ValueTuple valueById(String id)
id - The ID number valueCopyright © 2022. All rights reserved.