public class Oak extends Object
ContentRepository
instances with
a set of specified plugin components. This class acts as a public facade
that hides the internal implementation classes and the details of how
they get instantiated and wired together.Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_WORKSPACE_NAME
Constant for the default workspace name
|
Modifier and Type | Method and Description |
---|---|
ContentRepository |
createContentRepository() |
ContentSession |
createContentSession()
Creates a content repository with the given configuration
and logs in to the default workspace with no credentials,
returning the resulting content session.
|
Root |
createRoot()
Creates a content repository with the given configuration
and returns a
Root instance after logging in to the
default workspace with no credentials. |
static ExecutorService |
defaultExecutorService()
Default
ExecutorService used for scheduling concurrent tasks. |
static ScheduledExecutorService |
defaultScheduledExecutor()
Default
ScheduledExecutorService used for scheduling background tasks. |
Whiteboard |
getWhiteboard() |
Oak |
with(CommitHook hook)
Associates the given commit hook with the repository to be created.
|
Oak |
with(ConflictHandler conflictHandler)
Associates the given conflict handler with the repository to be created.
|
Oak |
with(Editor editor)
Associates the given editor with the repository to be created.
|
Oak |
with(EditorProvider provider)
Associates the given editor provider with the repository to be created.
|
Oak |
with(Executor executor) |
Oak |
with(IndexEditorProvider provider)
Associates the given index hook provider with the repository to
be created.
|
Oak |
with(MBeanServer mbeanServer) |
Oak |
with(Observer observer) |
Oak |
with(QueryEngineSettings queryEngineSettings) |
Oak |
with(QueryIndexProvider provider)
Associates the given query index provider with the repository to
be created.
|
Oak |
with(RepositoryInitializer initializer) |
Oak |
with(ScheduledExecutorService scheduledExecutor) |
Oak |
with(SecurityProvider securityProvider) |
Oak |
with(String defaultWorkspaceName)
Sets the default workspace name that should be used in case of login
with
null workspace name. |
Oak |
with(Whiteboard whiteboard) |
Oak |
withAsyncIndexing()
Enable the asynchronous (background) indexing behavior.
|
public static final String DEFAULT_WORKSPACE_NAME
public Oak(NodeStore store)
public Oak()
public static ScheduledExecutorService defaultScheduledExecutor()
ScheduledExecutorService
used for scheduling background tasks.
This default spawns up to 32 background thread on an as need basis. Idle
threads are pruned after one minute.public static ExecutorService defaultExecutorService()
ExecutorService
used for scheduling concurrent tasks.
This default spawns as many threads as required with a priority of
Thread.MIN_PRIORITY
. Idle threads are pruned after one minute.public Oak with(String defaultWorkspaceName)
null
workspace name. If this method has not been called
some internal default value will be used.defaultWorkspaceName
- The name of the default workspace.public Oak with(RepositoryInitializer initializer)
public Oak with(QueryEngineSettings queryEngineSettings)
public Oak with(QueryIndexProvider provider)
provider
- query index providerpublic Oak with(IndexEditorProvider provider)
provider
- index hook providerpublic Oak with(CommitHook hook)
hook
- commit hookpublic Oak with(EditorProvider provider)
provider
- editor providerpublic Oak with(Editor editor)
editor
- editorpublic Oak with(SecurityProvider securityProvider)
public Oak with(ConflictHandler conflictHandler)
conflictHandler
- conflict handlerpublic Oak with(ScheduledExecutorService scheduledExecutor)
public Oak with(MBeanServer mbeanServer)
public Oak with(Whiteboard whiteboard)
public Oak withAsyncIndexing()
#shutdown on the executor provided for this Oak instance.
public Whiteboard getWhiteboard()
public ContentRepository createContentRepository()
public ContentSession createContentSession()
public Root createRoot()
Root
instance after logging in to the
default workspace with no credentials.
This method exists mostly as a convenience for one-off tests, as
the returned root is the only way to access the session or the
repository.
Note that since there is no way to close the underlying content
session, this method should only be used when no components that
require sessions to be closed have been configured. The repository
and the session will be garbage collected once the root is no longer
used."Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"