public String[] getAllDocumentPaths() { Response res = callGet(buildEncodeCall(API_LISTALL, "")); if (logger.isDebugEnabled()) logger.debug("RemoteStore.getAllDocumentPaths() " + res.getStatus().getCode()); if (Status.STATUS_OK == res.getStatus().getCode()) { // convert to an array of store root-relative paths List<String> list = new ArrayList<String>(128); StringTokenizer t = new StringTokenizer(res.getResponse(), "\n"); while (t.hasMoreTokens()) { list.add(t.nextToken()); } String[] paths = list.toArray(new String[list.size()]); // truncate paths so that they are relative to the store path // and invariant of the type of AVM store (WCM or plain) convertToRelativePaths(paths); return paths; } else { return new String[0]; } }
public String[] getAllDocumentPaths() { Response res = callGet(buildEncodeCall(API_LISTALL, "")); if (logger.isDebugEnabled()) logger.debug("RemoteStore.getAllDocumentPaths() " + res.getStatus().getCode()); if (Status.STATUS_OK == res.getStatus().getCode()) { // convert to an array of store root-relative paths List<String> list = new ArrayList<String>(128); StringTokenizer t = new StringTokenizer(res.getResponse(), "\n"); while (t.hasMoreTokens()) { list.add(t.nextToken()); } String[] paths = list.toArray(new String[list.size()]); // truncate paths so that they are relative to the store path // and invariant of the type of AVM store (WCM or plain) convertToRelativePaths(paths); return paths; } else { return new String[0]; } }
public String[] getAllDocumentPaths() { Response res = callGet(buildEncodeCall(API_LISTALL, "")); if (logger.isDebugEnabled()) logger.debug("RemoteStore.getAllDocumentPaths() " + res.getStatus().getCode()); if (Status.STATUS_OK == res.getStatus().getCode()) { // convert to an array of store root-relative paths List<String> list = new ArrayList<String>(128); StringTokenizer t = new StringTokenizer(res.getResponse(), "\n"); while (t.hasMoreTokens()) { list.add(t.nextToken()); } String[] paths = list.toArray(new String[list.size()]); // truncate paths so that they are relative to the store path // and invariant of the type of AVM store (WCM or plain) convertToRelativePaths(paths); return paths; } else { return new String[0]; } }
Response res = callGet(buildEncodeCall(API_LISTPATTERN, path, args));
Response res = callGet(buildEncodeCall(API_LISTPATTERN, path, args));
Response res = callGet(buildEncodeCall(API_LISTPATTERN, path, args));
public long lastModified(String documentPath) throws IOException { Response res = callGet(buildEncodeCall(API_LASTMODIFIED, documentPath)); if (Status.STATUS_OK == res.getStatus().getCode()) { try { long lastMod = Long.parseLong(res.getResponse()); if (logger.isDebugEnabled()) logger.debug("RemoteStore.lastModified() " + documentPath + " = " + lastMod); return lastMod; } catch (NumberFormatException ne) { throw new IOException("Failed to process lastModified response: " + ne.getMessage()); } } else { throw new IOException("Unable to get lastModified date of document path: " + documentPath + " in remote store: " + this.getEndpoint() + " due to error: " + res.getStatus().getCode() + " " + res.getStatus().getMessage()); } }
public long lastModified(String documentPath) throws IOException { Response res = callGet(buildEncodeCall(API_LASTMODIFIED, documentPath)); if (Status.STATUS_OK == res.getStatus().getCode()) { try { long lastMod = Long.parseLong(res.getResponse()); if (logger.isDebugEnabled()) logger.debug("RemoteStore.lastModified() " + documentPath + " = " + lastMod); return lastMod; } catch (NumberFormatException ne) { throw new IOException("Failed to process lastModified response: " + ne.getMessage()); } } else { throw new IOException("Unable to get lastModified date of document path: " + documentPath + " in remote store: " + this.getEndpoint() + " due to error: " + res.getStatus().getCode() + " " + res.getStatus().getMessage()); } }
public long lastModified(String documentPath) throws IOException { Response res = callGet(buildEncodeCall(API_LASTMODIFIED, documentPath)); if (Status.STATUS_OK == res.getStatus().getCode()) { try { long lastMod = Long.parseLong(res.getResponse()); if (logger.isDebugEnabled()) logger.debug("RemoteStore.lastModified() " + documentPath + " = " + lastMod); return lastMod; } catch (NumberFormatException ne) { throw new IOException("Failed to process lastModified response: " + ne.getMessage()); } } else { throw new IOException("Unable to get lastModified date of document path: " + documentPath + " in remote store: " + this.getEndpoint() + " due to error: " + res.getStatus().getCode() + " " + res.getStatus().getMessage()); } }
public boolean hasDocument(String documentPath) throws IOException { boolean hasDocument = false; Response res = callGet(buildEncodeCall(API_HAS, documentPath)); if (Status.STATUS_OK == res.getStatus().getCode()) { hasDocument = Boolean.parseBoolean(res.getResponse()); } else { throw new IOException("Unable to test document path: " + documentPath + " in remote store: " + this.getEndpoint() + " due to error: " + res.getStatus().getCode() + " " + res.getStatus().getMessage()); } if (logger.isDebugEnabled()) logger.debug("RemoteStore.hasDocument() " + documentPath + " = " + hasDocument); return hasDocument; }
public boolean hasDocument(String documentPath) throws IOException { boolean hasDocument = false; Response res = callGet(buildEncodeCall(API_HAS, documentPath)); if (Status.STATUS_OK == res.getStatus().getCode()) { hasDocument = Boolean.parseBoolean(res.getResponse()); } else { throw new IOException("Unable to test document path: " + documentPath + " in remote store: " + this.getEndpoint() + " due to error: " + res.getStatus().getCode() + " " + res.getStatus().getMessage()); } if (logger.isDebugEnabled()) logger.debug("RemoteStore.hasDocument() " + documentPath + " = " + hasDocument); return hasDocument; }
public boolean hasDocument(String documentPath) throws IOException { boolean hasDocument = false; Response res = callGet(buildEncodeCall(API_HAS, documentPath)); if (Status.STATUS_OK == res.getStatus().getCode()) { hasDocument = Boolean.parseBoolean(res.getResponse()); } else { throw new IOException("Unable to test document path: " + documentPath + " in remote store: " + this.getEndpoint() + " due to error: " + res.getStatus().getCode() + " " + res.getStatus().getMessage()); } if (logger.isDebugEnabled()) logger.debug("RemoteStore.hasDocument() " + documentPath + " = " + hasDocument); return hasDocument; }
private Response getDocumentResponse(String path) throws IOException { Response res = callGet(buildEncodeCall(API_GET, path)); if (logger.isDebugEnabled()) logger.debug("RemoteStore.getDocument() " + path + " = " + res.getStatus().getCode()); if (Status.STATUS_OK == res.getStatus().getCode()) { return res; } else { throw new IOException("Unable to retrieve document path: " + path + " in remote store: " + this.getEndpoint() + " due to error: " + res.getStatus().getCode() + " " + res.getStatus().getMessage()); } }
private Response getDocumentResponse(String path) throws IOException { Response res = callGet(buildEncodeCall(API_GET, path)); if (logger.isDebugEnabled()) logger.debug("RemoteStore.getDocument() " + path + " = " + res.getStatus().getCode()); if (Status.STATUS_OK == res.getStatus().getCode()) { return res; } else { throw new IOException("Unable to retrieve document path: " + path + " in remote store: " + this.getEndpoint() + " due to error: " + res.getStatus().getCode() + " " + res.getStatus().getMessage()); } }
private Response getDocumentResponse(String path) throws IOException { Response res = callGet(buildEncodeCall(API_GET, path)); if (logger.isDebugEnabled()) logger.debug("RemoteStore.getDocument() " + path + " = " + res.getStatus().getCode()); if (Status.STATUS_OK == res.getStatus().getCode()) { return res; } else { throw new IOException("Unable to retrieve document path: " + path + " in remote store: " + this.getEndpoint() + " due to error: " + res.getStatus().getCode() + " " + res.getStatus().getMessage()); } }