private Map<String, String> doGetSpaceProperties(String spaceId) throws ContentStoreException { String task = "get space properties"; String url = buildSpaceURL(spaceId); try { HttpResponse response = restHelper.head(url); checkResponse(response, HttpStatus.SC_OK); return extractPropertiesFromHeaders(response); } catch (NotFoundException e) { throw new NotFoundException(task, spaceId, e); } catch (UnauthorizedException e) { throw new UnauthorizedException(task, spaceId, e); } catch (Exception e) { throw new ContentStoreException(task, spaceId, e); } }
private Map<String, AclType> doGetSpaceACLs(String spaceId) throws ContentStoreException { String task = "get space ACLs"; String url = buildAclURL(spaceId); try { HttpResponse response = restHelper.head(url); checkResponse(response, HttpStatus.SC_OK); return doGetSpaceACLs(response); } catch (NotFoundException e) { throw new NotFoundException(task, spaceId, e); } catch (UnauthorizedException e) { throw new UnauthorizedException(task, spaceId, e); } catch (Exception e) { throw new ContentStoreException(task, spaceId, e); } }
@Override public BitIntegrityReportProperties getBitIntegrityReportProperties(String spaceId) throws ContentStoreException { String task = "get bit integrity report properties"; String url = buildBitIntegrityReportURL(spaceId); try { HttpResponse response = restHelper.head(url); if (hasNoContent(response)) { return null; } checkResponse(response, HttpStatus.SC_OK); return extractBitIntegrityProperties(response); } catch (UnauthorizedException e) { throw new UnauthorizedException(task, spaceId, e); } catch (Exception e) { throw new ContentStoreException(task, spaceId, e); } }
private Map<String, String> doGetContentProperties(String spaceId, String contentId) throws ContentStoreException { String task = "get properties"; String url = buildContentURL(spaceId, contentId); try { HttpResponse response = restHelper.head(url); checkResponse(response, HttpStatus.SC_OK); return mergeMaps(extractPropertiesFromHeaders(response), extractNonPropertiesHeaders(response)); } catch (NotFoundException e) { throw new NotFoundException(task, spaceId, contentId, e); } catch (UnauthorizedException e) { throw new UnauthorizedException(task, spaceId, contentId, e); } catch (Exception e) { throw new ContentStoreException(task, spaceId, contentId, e); } }