Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.modeshape.web.jcr.spi
Interface RepositoryProvider

All Known Implementing Classes:
  FactoryRepositoryProvider

    public interface RepositoryProvider

Interface for any class that provides access to one or more local JCR repositories.

Repository providers must provide a public, no-argument constructor and be thread-safe.

Method Summary
`Set<String>` | `getJcrRepositoryNames()` Returns the available repository names JCR implementations that do not support multiple repositories on the same server should provide a singleton set containing some default repository name.
`Session` | `getSession(javax.servlet.http.HttpServletRequest request, String repositoryName, String workspaceName)` Returns an active session for the given workspace name in the named repository.
`void` | `shutdown()` Signals the repository provider that it should complete any pending transactions, shutdown, and release any external resource held.
`void` | `startup(javax.servlet.ServletContext context)` Signals the repository provider that it should initialize itself based on the provided `servlet context` and begin accepting connections.

Method Detail

### getSession

    Session getSession(javax.servlet.http.HttpServletRequest request,
                       String repositoryName,
                       String workspaceName)
                       throws RepositoryException

  Returns an active session for the given workspace name in the named repository.

  JCR implementations that do not support multiple repositories on the same server can ignore the repositoryName parameter.

  Parameters:
    `request` - the servlet request; may not be null or unauthenticated
    `repositoryName` - the name of the repository in which the session is created
    `workspaceName` - the name of the workspace to which the session should be connected
  Returns:
    an active session with the given workspace in the named repository
  Throws:
    `RepositoryException` - if any other error occurs

### getJcrRepositoryNames

    Set<String> getJcrRepositoryNames()

  Returns the available repository names

  JCR implementations that do not support multiple repositories on the same server should provide a singleton set containing some default repository name.

  Returns:
    the available repository names; may not be null or empty

### startup

    void startup(javax.servlet.ServletContext context)

  Signals the repository provider that it should initialize itself based on the provided `servlet context` and begin accepting connections.

  Parameters:
    `context` - the servlet context for the REST servlet

### shutdown

    void shutdown()

  Signals the repository provider that it should complete any pending transactions, shutdown, and release any external resource held.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008-2011 JBoss, a division of Red Hat. All Rights Reserved.