|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.priha.core.ProviderManager
public class ProviderManager
This is a front-end class for managing multiple providers for a single repository.
The ProviderManager is a singleton per Repository.
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_PROVIDERLIST
|
static java.lang.String |
PROP_PRIHA_PROVIDER_PREFIX
|
static java.lang.String |
PROP_PRIHA_PROVIDERS
|
| Constructor Summary | |
|---|---|
ProviderManager(RepositoryImpl repository)
|
|
| Method Summary | |
|---|---|
void |
addNode(StoreTransaction tx,
NodeImpl ni)
|
void |
close(WorkspaceImpl impl)
|
void |
copy(WorkspaceImpl m_workspace,
Path srcpath,
Path destpath)
|
static java.util.Properties |
filterProperties(RepositoryImpl repository,
java.lang.String providerName)
Filters the properties set when the Repository was created to find the property set for a provider. |
NodeImpl |
findByUUID(WorkspaceImpl ws,
java.lang.String uuid)
|
java.lang.String |
getDefaultWorkspace()
Returns the name of the default workspace. |
ItemImpl |
getItem(WorkspaceImpl ws,
Path path)
|
java.util.Collection<? extends PropertyImpl> |
getReferences(WorkspaceImpl ws,
java.lang.String uuid)
Locate all properties of type REFERENCE with the content of the particular UUID. |
static RepositoryProvider |
instantiateProvider(RepositoryImpl rep,
java.lang.String className,
java.util.Properties props)
Instantiates a RepositoryProvider using the given class name and the properties, and calls its start() method. |
boolean |
itemExists(WorkspaceImpl ws,
Path path,
ItemType type)
|
java.util.List<Path> |
listNodes(WorkspaceImpl impl,
Path path)
|
java.util.List<QName> |
listProperties(WorkspaceImpl ws,
Path path)
|
java.util.Collection<java.lang.String> |
listWorkspaces()
Returns the set of workspaces declared in the config file. |
NodeImpl |
loadNode(WorkspaceImpl ws,
Path path)
Loads the state of a node from the repository. |
void |
open(javax.jcr.Credentials credentials,
java.lang.String workspaceName)
|
void |
putProperty(StoreTransaction tx,
Path path,
ValueContainer value)
|
void |
remove(StoreTransaction tx,
Path path)
Removes the item at the end of the path. |
void |
reorderNodes(StoreTransaction tx,
Path internalPath,
java.util.List<Path> childOrder)
|
void |
stop()
|
void |
storeCancelled(StoreTransaction tx)
|
void |
storeFinished(StoreTransaction tx)
|
StoreTransaction |
storeStarted(WorkspaceImpl ws)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String PROP_PRIHA_PROVIDERS
public static final java.lang.String PROP_PRIHA_PROVIDER_PREFIX
public static final java.lang.String DEFAULT_PROVIDERLIST
| Constructor Detail |
|---|
public ProviderManager(RepositoryImpl repository)
throws ConfigurationException
ConfigurationException| Method Detail |
|---|
public static java.util.Properties filterProperties(RepositoryImpl repository,
java.lang.String providerName)
Essentially returns a property set where all instances of
priha.provider.[providerName].property = value
are replaced with property = value.
repository - The repository from which the properties are readproviderName - The name to filter with
instantiateProvider(RepositoryImpl, String, Properties)
public static RepositoryProvider instantiateProvider(RepositoryImpl rep,
java.lang.String className,
java.util.Properties props)
throws ConfigurationException
rep - The RepositoryImpl who will own this RepositoryProviderclassName - The FQN of the class.props - A filtered set of Properties
ConfigurationException - If the provider cannot be instantiated or the configuration
is faulty.filterProperties(RepositoryImpl, String)
public void open(javax.jcr.Credentials credentials,
java.lang.String workspaceName)
throws javax.jcr.NoSuchWorkspaceException,
javax.jcr.RepositoryException
open in interface ItemStorejavax.jcr.NoSuchWorkspaceException
javax.jcr.RepositoryException
public java.util.Collection<java.lang.String> listWorkspaces()
throws ConfigurationException
listWorkspaces in interface ItemStoreConfigurationException
public java.util.List<Path> listNodes(WorkspaceImpl impl,
Path path)
throws javax.jcr.RepositoryException
listNodes in interface ItemStorejavax.jcr.RepositoryExceptionpublic void close(WorkspaceImpl impl)
close in interface ItemStore
public void remove(StoreTransaction tx,
Path path)
throws javax.jcr.RepositoryException
remove in interface ItemStoreimpl - path -
javax.jcr.RepositoryException
public NodeImpl loadNode(WorkspaceImpl ws,
Path path)
throws javax.jcr.RepositoryException
ws - TODOpath -
javax.jcr.RepositoryException
public void addNode(StoreTransaction tx,
NodeImpl ni)
throws javax.jcr.RepositoryException
addNode in interface ItemStorejavax.jcr.RepositoryException
public void copy(WorkspaceImpl m_workspace,
Path srcpath,
Path destpath)
throws javax.jcr.RepositoryException
copy in interface ItemStorejavax.jcr.RepositoryException
public NodeImpl findByUUID(WorkspaceImpl ws,
java.lang.String uuid)
throws javax.jcr.RepositoryException
findByUUID in interface ItemStorejavax.jcr.RepositoryException
public ItemImpl getItem(WorkspaceImpl ws,
Path path)
throws InvalidPathException,
javax.jcr.RepositoryException
getItem in interface ItemStoreInvalidPathException
javax.jcr.RepositoryException
public boolean itemExists(WorkspaceImpl ws,
Path path,
ItemType type)
throws javax.jcr.RepositoryException
itemExists in interface ItemStorejavax.jcr.RepositoryException
public void putProperty(StoreTransaction tx,
Path path,
ValueContainer value)
throws javax.jcr.RepositoryException
putProperty in interface ItemStorejavax.jcr.RepositoryExceptionpublic void stop()
stop in interface ItemStore
public java.util.Collection<? extends PropertyImpl> getReferences(WorkspaceImpl ws,
java.lang.String uuid)
throws javax.jcr.RepositoryException
ItemStore
getReferences in interface ItemStorejavax.jcr.RepositoryException
public java.util.List<QName> listProperties(WorkspaceImpl ws,
Path path)
throws javax.jcr.RepositoryException
listProperties in interface ItemStorejavax.jcr.RepositoryException
public StoreTransaction storeStarted(WorkspaceImpl ws)
throws javax.jcr.RepositoryException
storeStarted in interface ItemStorejavax.jcr.RepositoryException
public void storeFinished(StoreTransaction tx)
throws javax.jcr.RepositoryException
storeFinished in interface ItemStorejavax.jcr.RepositoryException
public void storeCancelled(StoreTransaction tx)
throws javax.jcr.RepositoryException
storeCancelled in interface ItemStorejavax.jcr.RepositoryExceptionpublic java.lang.String getDefaultWorkspace()
public void reorderNodes(StoreTransaction tx,
Path internalPath,
java.util.List<Path> childOrder)
throws javax.jcr.RepositoryException
reorderNodes in interface ItemStorejavax.jcr.RepositoryException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||