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.graph.search
Interface AbstractSearchEngine.Workspaces<WorkspaceType extends SearchEngineWorkspace>

All Known Implementing Classes:
  AbstractSearchEngine.SearchWorkspaces

Enclosing class:
  AbstractSearchEngine<WorkspaceType extends SearchEngineWorkspace,ProcessorType extends SearchEngineProcessor>

    public static interface AbstractSearchEngine.Workspaces<WorkspaceType extends SearchEngineWorkspace>

Method Summary
`RepositoryConnectionFactory` | `getRepositoryConnectionFactory()` Get the connection factory for repository sources.
`WorkspaceType` | `getWorkspace(ExecutionContext context, String workspaceName, boolean createIfMissing)` Get the search engine for the workspace with the supplied name.
`Collection<WorkspaceType>` | `getWorkspaces()` Get the existing workspaces.
`Map<String,WorkspaceType>` | `removeAllWorkspaces()` Remove from the search engine all workspace-related indexes, thereby cleaning up any resources used by this search engine.
`WorkspaceType` | `removeWorkspace(String workspaceName)` Remove the supplied workspace from the search engine.

Method Detail

### getRepositoryConnectionFactory

    RepositoryConnectionFactory getRepositoryConnectionFactory()

  Get the connection factory for repository sources.

  Returns:
    the connection factory; never null

### getWorkspace

    WorkspaceType getWorkspace(ExecutionContext context,
                               String workspaceName,
                               boolean createIfMissing)

  Get the search engine for the workspace with the supplied name.

  Parameters:
    `context` - the execution context; never null
    `workspaceName` - the name of the workspace; never null
    `createIfMissing` - true if the workspace should be created if missing, or false otherwise
  Returns:
    the workspace's search engine
  Throws:
    `InvalidWorkspaceException` - if the workspace does not exist

### getWorkspaces

    Collection<WorkspaceType> getWorkspaces()

  Get the existing workspaces.

  Returns:
    the workspaces

### removeWorkspace

    WorkspaceType removeWorkspace(String workspaceName)

  Remove the supplied workspace from the search engine. This is typically done when the workspace is being deleted. Note that the resulting Workspace needs to then be cleaned up by the caller.

  Parameters:
    `workspaceName` - the name of the workspace
  Returns:
    the workspace that was removed, or null if there was workspace with the supplied name

### removeAllWorkspaces

    Map<String,WorkspaceType> removeAllWorkspaces()

  Remove from the search engine all workspace-related indexes, thereby cleaning up any resources used by this search engine.

  Returns:
    the mutable map containing the `SearchEngineWorkspace` objects keyed by their name; never null but possibly empty

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-2012 JBoss, a division of Red Hat. All Rights Reserved.