use of com.box.sdk.BoxGroupMembership in project camel by apache.
the class BoxGroupsManager method deleteGroupMembership.
/**
* Delete group membership.
*
* @param groupMembershipId
* - the id of group membership to delete.
*/
public void deleteGroupMembership(String groupMembershipId) {
try {
LOG.debug("Deleting groupMembership(id=" + groupMembershipId + ")");
if (groupMembershipId == null) {
throw new IllegalArgumentException("Parameter 'groupMemebershipId' can not be null");
}
BoxGroupMembership groupMembership = new BoxGroupMembership(boxConnection, groupMembershipId);
groupMembership.delete();
} catch (BoxAPIException e) {
throw new RuntimeException(String.format("Box API returned the error code %d\n\n%s", e.getResponseCode(), e.getResponse()), e);
}
}
use of com.box.sdk.BoxGroupMembership in project camel by apache.
the class BoxGroupsManager method getGroupMembershipInfo.
/**
* Get group membership information.
*
* @param groupMemebershipId
* - the id of group membership.
* @return The group information.
*/
public BoxGroupMembership.Info getGroupMembershipInfo(String groupMemebershipId) {
try {
LOG.debug("Getting info for groupMemebership(id=" + groupMemebershipId + ")");
if (groupMemebershipId == null) {
throw new IllegalArgumentException("Parameter 'groupMemebershipId' can not be null");
}
BoxGroupMembership group = new BoxGroupMembership(boxConnection, groupMemebershipId);
return group.getInfo();
} catch (BoxAPIException e) {
throw new RuntimeException(String.format("Box API returned the error code %d\n\n%s", e.getResponseCode(), e.getResponse()), e);
}
}
use of com.box.sdk.BoxGroupMembership in project camel by apache.
the class BoxGroupsManager method updateGroupMembershipInfo.
/**
* Update group membership information.
*
* @param groupMembershipId
* - the id of group membership to update.
* @param info
* - the updated information.
* @return The group information.
*/
public BoxGroupMembership updateGroupMembershipInfo(String groupMemebershipId, BoxGroupMembership.Info info) {
try {
LOG.debug("Updating info for groupMembership(id=" + groupMemebershipId + ")");
if (groupMemebershipId == null) {
throw new IllegalArgumentException("Parameter 'groupMemebershipId' can not be null");
}
if (info == null) {
throw new IllegalArgumentException("Parameter 'info' can not be null");
}
BoxGroupMembership groupMembership = new BoxGroupMembership(boxConnection, groupMemebershipId);
groupMembership.updateInfo(info);
return groupMembership;
} catch (BoxAPIException e) {
throw new RuntimeException(String.format("Box API returned the error code %d\n\n%s", e.getResponseCode(), e.getResponse()), e);
}
}
Aggregations