/** * Get protectionType attached with a virtual array * * @param id the URN of a ViPR varray * @return the protection type */ public String getProtectionType(URI id) { String getFlag = String.format(INTERNAL_VARRAY_GET_PROTECTIONTYPE, id.toString()); WebResource rRoot = createRequest(getFlag); VirtualArrayInternalFlags resp = null; try { resp = addSignature(rRoot).get(VirtualArrayInternalFlags.class); } catch (UniformInterfaceException e) { _log.warn("could not get protection of varray {}. Err:{}", id, e); if (e.getResponse().getStatus() == 404) { throw APIException.notFound.unableToFindEntityInURL(id); } } return resp.getProtectionType(); }