/** * Determines if the document exists anywhere on the search path * * @param documentPath document path * @return true => exists, false => does not exist * @throws IOException */ public boolean hasDocument(String documentPath) throws IOException { for (Store store : getStores()) { if (store.hasDocument(documentPath)) { return true; } } return false; }
/** * Determines if the document exists anywhere on the search path * * @param documentPath document path * @return true => exists, false => does not exist * @throws IOException */ public boolean hasDocument(String documentPath) throws IOException { for (Store store : getStores()) { if (store.hasDocument(documentPath)) { return true; } } return false; }
/** * Determines if the document exists anywhere on the search path * * @param documentPath document path * @return true => exists, false => does not exist * @throws IOException */ public boolean hasDocument(String documentPath) throws IOException { for (Store store : getStores()) { if (store.hasDocument(documentPath)) { return true; } } return false; }
/** * Gets a document from anywhere on the search path. Note a raw InputStream to the * content is returned and must be closed by the accessing method. * * @param documentPath document path * @return input stream onto document or null if it * does not exist on the search path * * @throws IOException */ public InputStream getDocument(String documentPath) throws IOException { for (Store store : getStores()) { if (store.hasDocument(documentPath)) { return store.getDocument(documentPath); } } return null; } }
/** * Gets a document from anywhere on the search path. Note a raw InputStream to the * content is returned and must be closed by the accessing method. * * @param documentPath document path * @return input stream onto document or null if it * does not exist on the search path * * @throws IOException */ public InputStream getDocument(String documentPath) throws IOException { for (Store store : getStores()) { if (store.hasDocument(documentPath)) { return store.getDocument(documentPath); } } return null; } }
/** * Gets a document from anywhere on the search path. Note a raw InputStream to the * content is returned and must be closed by the accessing method. * * @param documentPath document path * @return input stream onto document or null if it * does not exist on the search path * * @throws IOException */ public InputStream getDocument(String documentPath) throws IOException { for (Store store : getStores()) { if (store.hasDocument(documentPath)) { return store.getDocument(documentPath); } } return null; } }
public boolean hasObject(ModelPersistenceContext context, String objectTypeId, String objectId) throws ModelObjectPersisterException { // do not process if persister is disabled if (!isEnabled()) { return false; } // determine the path of this object in the store String path = generatePath(objectTypeId, objectId); try { return this.store.hasDocument(path); } catch (IOException ioe) { throw new ModelObjectPersisterException("Unable to test object at path: " + path, ioe); } }
public boolean hasObject(ModelPersistenceContext context, String objectTypeId, String objectId) throws ModelObjectPersisterException { // do not process if persister is disabled if (!isEnabled()) { return false; } // determine the path of this object in the store String path = generatePath(objectTypeId, objectId); try { return this.store.hasDocument(path); } catch (IOException ioe) { throw new ModelObjectPersisterException("Unable to test object at path: " + path, ioe); } }
if (apiStore.hasDocument(path))
if (apiStore.hasDocument(path))
if (this.store.hasDocument(path))
if (this.store.hasDocument(path))
if (this.store.hasDocument(path))
if (this.store.hasDocument(path))
if (this.store.hasDocument(path))
if (this.store.hasDocument(path))
private void installFile(String storePath, String file, String content) { // retrieve appropriate web script store Store store = getContainer().getSearchPath().getStore(storePath); if (store == null) { throw new WebScriptException(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Store path " + storePath + " refers to a store that does not exist"); } try { // determine if file already exists in store if (store.hasDocument(file)) { throw new WebScriptException(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Web Script file " + file + " already exists in store " + storePath); } // create the web script file store.createDocument(file, content); } catch(IOException e) { throw new WebScriptException(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Failed to install Web Script file " + file + " into store" + storePath); } }
if (this.store.hasDocument(path))
if (this.store.hasDocument(path))
if (this.store.hasDocument(path))