Class AbstractStore

java.lang.Object
org.springframework.extensions.webscripts.AbstractStore
All Implemented Interfaces:
Store
Direct Known Subclasses:
ClassPathStore, RemoteStore

public abstract class AbstractStore extends Object implements Store
Abstract store class provided as a convenience for developers who wish to build their own custom Store implementations for use with the Web Script framework.
Author:
muzquiano
  • Field Details

  • Constructor Details

    • AbstractStore

      public AbstractStore()
  • Method Details

    • setReadOnly

      public void setReadOnly(boolean readOnly)
      Sets whether the class path store is to operate in read-only mode. Read only prevents users from performing creates, updates and removes
      Parameters:
      readOnly - boolean
    • isReadOnly

      public boolean isReadOnly()
      Whether the store is in read-only mode
      Specified by:
      isReadOnly in interface Store
      Returns:
      boolean
    • setPreviewContextProvider

      public void setPreviewContextProvider(PreviewContextProvider previewContextProvider)
      Sets the preview context provider
      Parameters:
      previewContextProvider - PreviewContextProvider
    • getPreviewContext

      public PreviewContext getPreviewContext()
      Gets the preview context
      Returns:
      preview context
    • createDocuments

      public void createDocuments(List<org.springframework.extensions.surf.util.Pair<String,org.dom4j.Document>> pathContents) throws IOException
      Description copied from interface: Store
      Creates multiple XML documents at the specified paths.
      Specified by:
      createDocuments in interface Store
      Parameters:
      pathContents - list of path, document pairs
      Throws:
      IOException - if a document already exists or a create fails
    • getDocumentPaths

      public String[] getDocumentPaths(String path, String filePathPattern)
      Description copied from interface: Store
      Gets the paths matching a given file path pattern in this store.
      Specified by:
      getDocumentPaths in interface Store
      Parameters:
      path - start path
      filePathPattern - file path pattern string, allows wildcards, eg. *.ftl or my*.ftl or *\/a\/*.xml
      Returns:
      array of document paths