/** * Gets the Web Script Store for the given Store path * * @param storePath String * @return store (or null, if not found) */ public Store getStore(String storePath) { Collection<Store> stores = getStores(); for (Store store : stores) { if (store.getBasePath().equals(storePath)) { return store; } } return null; }
/** * 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 the Web Script Store for the given Store path * * @param storePath String * @return store (or null, if not found) */ public Store getStore(String storePath) { Collection<Store> stores = getStores(); for (Store store : stores) { if (store.getBasePath().equals(storePath)) { return store; } } return null; }
/** * 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 the Web Script Store for the given Store path * * @param storePath * @return store (or null, if not found) */ public Store getStore(String storePath) { Collection<Store> stores = getStores(); for (Store store : stores) { if (store.getBasePath().equals(storePath)) { return store; } } return null; }
/** * Logs info-level searchpath configuration info during autowire startup * * @param searchPath SearchPath */ protected void reportSearchPath(SearchPath searchPath) { if (logger.isInfoEnabled()) { StringBuilder s = new StringBuilder(); s.append("["); if (searchPath != null) { Iterator<Store> it = searchPath.getStores().iterator(); while (it.hasNext()) { Store store = (Store) it.next(); s.append("'"); s.append(store.toString()); s.append("'"); if (it.hasNext()) { s.append(","); } } } s.append("]"); logger.info("Search Path: " + searchPath + " = " + s.toString()); } }
/** * Initializes the script loaders */ protected void initLoaders() { List<ScriptLoader> loaders = new ArrayList<ScriptLoader>(searchPath.getStores().size()); for (Store apiStore : searchPath.getStores()) { ScriptLoader loader = apiStore.getScriptLoader(); if (loader == null) { throw new WebScriptException("Unable to retrieve script loader for Web Script store " + apiStore.getBasePath()); } loaders.add(loader); } this.scriptLoader = new MultiScriptLoader(loaders.toArray(new ScriptLoader[loaders.size()])); }
/** * Logs info-level searchpath configuration info during autowire startup * * @param searchPath SearchPath */ protected void reportSearchPath(SearchPath searchPath) { if (logger.isInfoEnabled()) { StringBuilder s = new StringBuilder(); s.append("["); if (searchPath != null) { Iterator<Store> it = searchPath.getStores().iterator(); while (it.hasNext()) { Store store = (Store) it.next(); s.append("'"); s.append(store.toString()); s.append("'"); if (it.hasNext()) { s.append(","); } } } s.append("]"); logger.info("Search Path: " + searchPath + " = " + s.toString()); } }
/** * Initializes the script loaders */ protected void initLoaders() { List<ScriptLoader> loaders = new ArrayList<ScriptLoader>(searchPath.getStores().size()); for (Store apiStore : searchPath.getStores()) { ScriptLoader loader = apiStore.getScriptLoader(); if (loader == null) { throw new WebScriptException("Unable to retrieve script loader for Web Script store " + apiStore.getBasePath()); } loaders.add(loader); } this.scriptLoader = new MultiScriptLoader(loaders.toArray(new ScriptLoader[loaders.size()])); }
/** * Initializes the script loaders */ protected void initLoaders() { List<ScriptLoader> loaders = new ArrayList<ScriptLoader>(searchPath.getStores().size()); for (Store apiStore : searchPath.getStores()) { ScriptLoader loader = apiStore.getScriptLoader(); if (loader == null) { throw new WebScriptException("Unable to retrieve script loader for Web Script store " + apiStore.getBasePath()); } loaders.add(loader); } this.scriptLoader = new MultiScriptLoader(loaders.toArray(new ScriptLoader[loaders.size()])); }
/** * Initializes the template loaders */ protected void initLoaders() { if (searchPath != null) { for (Store apiStore : searchPath.getStores()) { TemplateLoader loader = apiStore.getTemplateLoader(); if (loader == null) { logger.error("Unable to retrieve template loader for Web Script store " + apiStore.getBasePath()); } loaders.add(loader); } } this.templateLoader = new MultiTemplateLoader(loaders.toArray(new TemplateLoader[loaders.size()])); }
/** * Initializes the template loaders */ protected void initLoaders() { if (searchPath != null) { for (Store apiStore : searchPath.getStores()) { TemplateLoader loader = apiStore.getTemplateLoader(); if (loader == null) { logger.error("Unable to retrieve template loader for Web Script store " + apiStore.getBasePath()); } loaders.add(loader); } } this.templateLoader = new MultiTemplateLoader(loaders.toArray(new TemplateLoader[loaders.size()])); }
/** * Initializes the template loaders */ protected void initLoaders() { if (searchPath != null) { for (Store apiStore : searchPath.getStores()) { TemplateLoader loader = apiStore.getTemplateLoader(); if (loader == null) { logger.error("Unable to retrieve template loader for Web Script store " + apiStore.getBasePath()); } loaders.add(loader); } } this.templateLoader = new MultiTemplateLoader(loaders.toArray(new TemplateLoader[loaders.size()])); }
/** * 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; } }
for (Store store : this.searchPath.getStores())
for (Store apiStore : getSearchPath().getStores())
for (Store apiStore : getSearchPath().getStores())