public Site cancelRequestToJoinSite(Site site) - Cancels a
previous request to join a site made by the current user. If the request is successful a new
Site object is returned reflecting the changed state. If the request cannot
be completed successfully an exception is thrown with error code 400.
Parameters
- Site site
- The site to cancel the pending request for.
Returns
The modified Site object.
Exception
Throws an SkyVaultServiceException if the operation cannot be carried out with error code 400.
Example
case CANCEL: // get pending join requests // and cancel where shortName matches List<Site> requests = siteService .getPendingSites(); for (Site request : requests) { if (request.getShortName().equals( site.getShortName())) { site = siteService.cancelRequestToJoinSite(request); } } message = "Requests cancelled for "+site.getShortName(); break;
Note: This method was added in version 1.1.