|
|||||||||
| 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(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(Credentials credentials,
java.lang.String workspaceName)
throws NoSuchWorkspaceException,
RepositoryException
open in interface ItemStoreNoSuchWorkspaceException
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 RepositoryException
listNodes in interface ItemStoreRepositoryExceptionpublic void close(WorkspaceImpl impl)
close in interface ItemStore
public void remove(StoreTransaction tx,
Path path)
throws RepositoryException
remove in interface ItemStoreimpl - path -
RepositoryException
public NodeImpl loadNode(WorkspaceImpl ws,
Path path)
throws RepositoryException
ws - TODOpath -
RepositoryException
public void addNode(StoreTransaction tx,
NodeImpl ni)
throws RepositoryException
addNode in interface ItemStoreRepositoryException
public void copy(WorkspaceImpl m_workspace,
Path srcpath,
Path destpath)
throws RepositoryException
copy in interface ItemStoreRepositoryException
public NodeImpl findByUUID(WorkspaceImpl ws,
java.lang.String uuid)
throws RepositoryException
findByUUID in interface ItemStoreRepositoryException
public ItemImpl getItem(WorkspaceImpl ws,
Path path)
throws InvalidPathException,
RepositoryException
getItem in interface ItemStoreInvalidPathException
RepositoryException
public boolean itemExists(WorkspaceImpl ws,
Path path,
ItemType type)
throws RepositoryException
itemExists in interface ItemStoreRepositoryException
public void putProperty(StoreTransaction tx,
Path path,
ValueContainer value)
throws RepositoryException
putProperty in interface ItemStoreRepositoryExceptionpublic void stop()
stop in interface ItemStore
public java.util.Collection<? extends PropertyImpl> getReferences(WorkspaceImpl ws,
java.lang.String uuid)
throws RepositoryException
ItemStore
getReferences in interface ItemStoreRepositoryException
public java.util.List<QName> listProperties(WorkspaceImpl ws,
Path path)
throws RepositoryException
listProperties in interface ItemStoreRepositoryException
public StoreTransaction storeStarted(WorkspaceImpl ws)
throws RepositoryException
storeStarted in interface ItemStoreRepositoryException
public void storeFinished(StoreTransaction tx)
throws RepositoryException
storeFinished in interface ItemStoreRepositoryException
public void storeCancelled(StoreTransaction tx)
throws RepositoryException
storeCancelled in interface ItemStoreRepositoryExceptionpublic java.lang.String getDefaultWorkspace()
public void reorderNodes(StoreTransaction tx,
Path internalPath,
java.util.List<Path> childOrder)
throws RepositoryException
reorderNodes in interface ItemStoreRepositoryException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||