|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.sharing.SharePermissionUtils
public class SharePermissionUtils
Some utility functions for dealing with SharePermission
instances.
TODO move to UI package
Method Summary | |
---|---|
static SharedEntity.SharePermissions |
fromJsonArray(JSONArray array)
Convert the passed array into SharePermissions. |
static SharedEntity.SharePermissions |
fromJsonArrayString(String jsonString)
|
static SharePermission |
fromJsonObject(JSONObject json)
Return a SharePermission from a JSON object. |
static SharePermission |
fromJsonObjectString(String jsonString)
Create a SharePermission from the passed JSON string. |
static JSONObject |
toJson(SharePermission permission)
Convert the passed permission into a JSON object. |
static JSONArray |
toJsonArray(Collection<SharePermission> permissions)
Converts the passed SharePermissions into a JSON array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static JSONObject toJson(SharePermission permission) throws JSONException
permission
- the permission to convert.
JSONException
- if an error occurs while creating the JSON object.public static JSONArray toJsonArray(Collection<SharePermission> permissions) throws JSONException
permissions
- the permissions to convert.
JSONException
- if an error occurs while creating the JSONArray.public static SharePermission fromJsonObject(JSONObject json) throws JSONException
json
- the JSON object to convert.
JSONException
- if an error occurs while converting the object.public static SharePermission fromJsonObjectString(String jsonString) throws JSONException
jsonString
- the JSON string make a SharePermission from.
JSONException
- if an error occurs while converting the object.public static SharedEntity.SharePermissions fromJsonArray(JSONArray array) throws JSONException
array
- the JSON array to convert.
JSONException
- if an error occurs during convertion.public static SharedEntity.SharePermissions fromJsonArrayString(String jsonString) throws JSONException
JSONException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |