org.modeshape.connector.filesystem
Class FileSystemRepository
java.lang.Object
org.modeshape.graph.connector.path.PathRepository
org.modeshape.graph.connector.path.WritablePathRepository
org.modeshape.connector.filesystem.FileSystemRepository
public class FileSystemRepository
- extends WritablePathRepository
Implementation of WritablePathRepository
that provides access to an underlying file system. This repository only
natively supports nodes of primary types nt:folder
, nt:file
, and
dna:resource
, although the CustomPropertiesFactory
allows for the addition of mixin
types to any and all primary types.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
source
protected final FileSystemSource source
FileSystemRepository
public FileSystemRepository(FileSystemSource source)
initialize
protected void initialize()
- Creates any predefined workspaces, including the default workspace.
- Specified by:
initialize
in class PathRepository
getCache
public WorkspaceCache getCache(String workspaceName)
createWorkspace
protected WritablePathWorkspace createWorkspace(ExecutionContext context,
String name)
- Description copied from class:
WritablePathRepository
- Creates a new workspace with the given name containing only a root node.
This method does NOT automatically add the newly created workspace to the workspace map
or check to
see if a workspace already exists in this repository with the same name.
- Specified by:
createWorkspace
in class WritablePathRepository
- Parameters:
context
- the context in which the workspace is to be createdname
- the name of the workspace
- Returns:
- the newly created workspace; may not be null
getWorkspaceDirectory
protected File getWorkspaceDirectory(String workspaceName)
- Parameters:
workspaceName
- the name of the workspace for which the root directory should be returned
- Returns:
- the directory that maps to the root node in the named workspace; may be null if the directory does not exist, is a
file, or cannot be read.
Copyright © 2008-2010 JBoss, a division of Red Hat. All Rights Reserved.