@PublicApi public class SharePermissionUtils extends Object
SharePermission
instances.
TODO move to UI package
Modifier and Type | Method and Description |
---|---|
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.
|
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
Copyright © 2002-2015 Atlassian. All Rights Reserved.