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
Class AbstractSearchEngine.SearchWorkspaces

    java.lang.Object
      org.modeshape.graph.search.AbstractSearchEngine.SearchWorkspaces

All Implemented Interfaces:
  AbstractSearchEngine.Workspaces<WorkspaceType>

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

    protected class AbstractSearchEngine.SearchWorkspaces

extends Object
implements AbstractSearchEngine.Workspaces<WorkspaceType>

Constructor Summary
`protected` | `AbstractSearchEngine.SearchWorkspaces(RepositoryConnectionFactory connectionFactory)`

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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AbstractSearchEngine.SearchWorkspaces

    protected AbstractSearchEngine.SearchWorkspaces(RepositoryConnectionFactory connectionFactory)

Method Detail

### getRepositoryConnectionFactory

    public RepositoryConnectionFactory getRepositoryConnectionFactory()

  Get the connection factory for repository sources.

  Specified by:
    `getRepositoryConnectionFactory` in interface `AbstractSearchEngine.Workspaces<WorkspaceType extends SearchEngineWorkspace>`
  Returns:
    the connection factory; never null
  See Also:
    `AbstractSearchEngine.Workspaces.getRepositoryConnectionFactory()`

### getWorkspace

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

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

  Specified by:
    `getWorkspace` in interface `AbstractSearchEngine.Workspaces<WorkspaceType extends SearchEngineWorkspace>`
  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
  See Also:
    `AbstractSearchEngine.Workspaces.getWorkspace(org.modeshape.graph.ExecutionContext, java.lang.String, boolean)`

### getWorkspaces

    public Collection<WorkspaceType> getWorkspaces()

  Get the existing workspaces.

  Specified by:
    `getWorkspaces` in interface `AbstractSearchEngine.Workspaces<WorkspaceType extends SearchEngineWorkspace>`
  Returns:
    the workspaces
  See Also:
    `AbstractSearchEngine.Workspaces.getWorkspaces()`

### removeWorkspace

    public 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.

  Specified by:
    `removeWorkspace` in interface `AbstractSearchEngine.Workspaces<WorkspaceType extends SearchEngineWorkspace>`
  Parameters:
    `workspaceName` - the name of the workspace
  Returns:
    the workspace that was removed, or null if there was workspace with the supplied name
  See Also:
    `AbstractSearchEngine.Workspaces.removeWorkspace(java.lang.String)`

### removeAllWorkspaces

    public Map<String,WorkspaceType> removeAllWorkspaces()

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

  Specified by:
    `removeAllWorkspaces` in interface `AbstractSearchEngine.Workspaces<WorkspaceType extends SearchEngineWorkspace>`
  Returns:
    the mutable map containing the `SearchEngineWorkspace` objects keyed by their name; never null but possibly empty
  See Also:
    `AbstractSearchEngine.Workspaces.removeAllWorkspaces()`

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.