Search in sources :

Example 1 with BoxCollection

use of com.box.androidsdk.content.models.BoxCollection in project box-android-sdk by box.

the class BoxRequestCollectionUpdate method setCollectionId.

/**
 * Sets the id of the collection to update.
 *
 * @param id    id of the collection to update.
 * @return  request with the updated collection id.
 */
protected R setCollectionId(String id) {
    JsonArray jsonArray = new JsonArray();
    if (!TextUtils.isEmpty(id)) {
        BoxCollection col = BoxCollection.createFromId(id);
        jsonArray.add(col.toJsonObject());
    }
    mBodyMap.put(FIELD_COLLECTIONS, jsonArray);
    return (R) this;
}
Also used : JsonArray(com.eclipsesource.json.JsonArray) BoxCollection(com.box.androidsdk.content.models.BoxCollection)

Aggregations

BoxCollection (com.box.androidsdk.content.models.BoxCollection)1 JsonArray (com.eclipsesource.json.JsonArray)1