Tabnine Logo
Store
Code IndexAdd Tabnine to your IDE (free)

How to use
Store
in
org.springframework.extensions.webscripts

Best Java code snippets using org.springframework.extensions.webscripts.Store (Showing top 20 results out of 315)

Refine searchRefine arrow

  • SearchPath
origin: org.alfresco.surf/spring-webscripts

/**
 * 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()]));
}
 
origin: org.springframework.extensions.surf/spring-webscripts

  /**
   * 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;
  }
}
origin: org.alfresco.surf/spring-webscripts

/**
 * Gets all Web Script Stores
 * 
 * @return  all Web Script Stores
 */
public Collection<Store> getStores()
{
  Collection<Store> aliveStores = new ArrayList<Store>(searchPath.size());
  for (Store store : searchPath)
  {
    if (store.exists())
    {
      aliveStores.add(store);
    }
  }
  return aliveStores;
}
origin: deas/alfresco

/**
 * 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()]));
} 
 
origin: org.springframework.extensions.surf/spring-webscripts

logger.debug("Locating package descriptions within " + apiStore.getBasePath());
packageDescPaths = apiStore.getDocumentPaths("/", true, PackageDescriptionDocument.DESC_NAME_PATTERN);
    packageDescIS = apiStore.getDocument(packageDescPath);
    packageDesc = createPackageDescription(apiStore, packageDescPath, packageDescIS);
    throw new WebScriptException("Failed to read package description document " + apiStore.getBasePath() + packageDescPath, e);
  String path = apiStore.getBasePath() + "/" + packageDescPath;
  Throwable c = e;
  String cause = c.getMessage();
logger.debug("Locating schema descriptions within " + apiStore.getBasePath());
schemaDescPaths = apiStore.getDocumentPaths("/", true, SchemaDescriptionDocument.DESC_NAME_PATTERN);
    schemaDescIS = apiStore.getDocument(schemaDescPath);
    schemaDesc = createSchemaDescription(apiStore, schemaDescPath, schemaDescIS);
    throw new WebScriptException("Failed to read Web Script description document " + apiStore.getBasePath() + schemaDescPath, e);
  String path = apiStore.getBasePath() + "/" + schemaDescPath;
  Throwable c = e;
  String cause = c.getMessage();
logger.debug("Locating Web Scripts within " + apiStore.getBasePath());
serviceDescPaths = apiStore.getDescriptionDocumentPaths();
origin: org.alfresco.surf/spring-surf

if (this.store.hasDocument(path))
  Document document = XMLUtil.parse(this.store.getDocument(path));
origin: org.springframework.extensions.surf/spring-webscripts

if (this.configurationSearchPath != null)
  for (Store store: this.configurationSearchPath.getStores())
      for (String path: store.getDocumentPaths("/", true, "*.xml"))
        InputStream is = store.getDocument(path);
        SAXReader reader = new SAXReader();
        Document document;
origin: deas/alfresco

Collection<Store> stores = getContainer().getSearchPath().getStores();
for (Store store : stores)
  modelStore.path = store.getBasePath();
  try
    scriptPaths = store.getScriptDocumentPaths(script);
    try
      documentIS = store.getDocument(scriptPath);
      InputStreamReader isReader = new InputStreamReader(documentIS);
      StringWriter stringWriter = new StringWriter();
origin: org.springframework.extensions.surf/spring-surf

for (Store apiStore : getSearchPath().getStores())
    if (apiStore.hasDocument(path))
        logger.debug("Found Spring Resource '" + location + " in store: " + apiStore.getClass().getSimpleName() + "(" + apiStore.getBasePath() + ")");
origin: org.alfresco.surf/spring-surf

for (Store apiStore : getSearchPath().getStores())
  String[] paths = apiStore.getDocumentPaths("", locationPattern);
        logger.debug("Found Spring Resource '" + paths[i] + " in store: " + apiStore.getClass().getSimpleName() + "(" + apiStore.getBasePath() + ")");                                                
origin: org.alfresco.surf/spring-webscripts

/**
 * 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;
}

origin: org.alfresco.surf/spring-webscripts

/**
 * 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;
}
origin: org.springframework.extensions.surf/spring-surf

for (Store store : this.searchPath.getStores())
  for (String path: store.getAllDocumentPaths())
          docs.add(XMLUtil.parse(store.getDocument(path)));
origin: org.alfresco.surf/spring-surf

for (Store store : this.searchPath.getStores())
    in = store.getDocument(processPath(path));
    break;
origin: org.springframework.extensions.surf/spring-surf

this.store.createDocument(path, content);
  this.store.createDocument(path, content);
  this.store.removeDocument(oldPath);
  this.store.updateDocument(oldPath, content);
origin: deas/alfresco

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);
  }
}

origin: org.alfresco.surf/spring-webscripts

public InputStream getDescDocument()
  throws IOException
{
  return store.getDocument(descPath);
}
origin: org.alfresco.surf/spring-webscripts

public String getStorePath() 
{
  return store.getBasePath();
}
origin: org.alfresco.surf/spring-surf

if (this.store.hasDocument(path))
  removed = this.store.removeDocument(path);
origin: org.alfresco.surf/spring-surf

if (!this.store.exists())
String[] paths = this.store.getAllDocumentPaths();
for (int i = 0; i < paths.length; i++)
org.springframework.extensions.webscriptsStore

Javadoc

Store for holding Web Script Definitions and Implementations

Most used methods

  • getBasePath
    Gets the base path of the store
  • getDocument
    Gets a document. Note a raw InputStream to the content is returned and must be closed by the accessi
  • hasDocument
    Determines if the document exists.
  • exists
    Determines whether the store actually exists
  • getDocumentPaths
    Gets the paths of given document pattern within given path/sub-paths in this store
  • createDocument
    Creates a document.
  • createDocuments
    Creates multiple XML documents at the specified paths.
  • getAllDocumentPaths
    Gets the paths of all documents in this store
  • getDescriptionDocumentPaths
    Gets the paths of all Web Script description documents in this store
  • getScriptLoader
    Gets the script loader for this store
  • getTemplateLoader
    Gets the template loader for this store
  • init
    Initialise Store (called once)
  • getTemplateLoader,
  • init,
  • isReadOnly,
  • isSecure,
  • lastModified,
  • removeDocument,
  • updateDocument,
  • getScriptDocumentPaths

Popular in Java

  • Making http post requests using okhttp
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getSharedPreferences (Context)
  • compareTo (BigDecimal)
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • JFrame (javax.swing)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now