|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.priha.core.RepositoryImpl
public class RepositoryImpl
Provides the main Repository class for Priha. You may use this by simply instantiating it with a suitable Properties object.
Nested Class Summary | |
---|---|
protected static interface |
RepositoryImpl.SessionVisitor
|
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_WORKSPACE
|
Fields inherited from interface javax.jcr.Repository |
---|
LEVEL_1_SUPPORTED, LEVEL_2_SUPPORTED, OPTION_LOCKING_SUPPORTED, OPTION_OBSERVATION_SUPPORTED, OPTION_QUERY_SQL_SUPPORTED, OPTION_TRANSACTIONS_SUPPORTED, OPTION_VERSIONING_SUPPORTED, QUERY_XPATH_DOC_ORDER, QUERY_XPATH_POS_INDEX, REP_NAME_DESC, REP_VENDOR_DESC, REP_VENDOR_URL_DESC, REP_VERSION_DESC, SPEC_NAME_DESC, SPEC_VERSION_DESC |
Constructor Summary | |
---|---|
RepositoryImpl(java.util.Properties prefs)
Create a new Repository using the given properties. |
Method Summary | |
---|---|
java.lang.String |
getDescriptor(java.lang.String key)
|
java.lang.String[] |
getDescriptorKeys()
|
static NamespaceRegistryImpl |
getGlobalNamespaceRegistry()
|
java.lang.String |
getProperty(java.lang.String key)
|
java.lang.String |
getProperty(java.lang.String key,
java.lang.String defValue)
|
java.util.Enumeration<java.lang.String> |
getPropertyNames()
|
protected ProviderManager |
getProviderManager()
|
protected org.priha.core.RepositoryImpl.SessionManager |
getSessionManager()
|
SessionImpl |
login()
|
SessionImpl |
login(javax.jcr.Credentials credentials)
|
SessionImpl |
login(javax.jcr.Credentials credentials,
java.lang.String workspaceName)
|
SessionImpl |
login(java.lang.String workspaceName)
|
protected void |
removeSession(SessionImpl s)
|
void |
setProperty(java.lang.String key,
java.lang.String property)
Set transient properties for this repository. |
void |
shutdown()
Shuts down the entire repository, stops all providers and releases resources. |
SessionImpl |
superUserLogin(java.lang.String workspaceName)
Returns a Session which has write permissions to the repository. |
protected void |
visit(RepositoryImpl.SessionVisitor v)
Visits all current Sessions |
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 DEFAULT_WORKSPACE
Constructor Detail |
---|
public RepositoryImpl(java.util.Properties prefs) throws ConfigurationException
prefs
- Properties to use. Must not be null.
ConfigurationException
- If the properties are wrong.Method Detail |
---|
public java.lang.String getProperty(java.lang.String key)
public java.lang.String getProperty(java.lang.String key, java.lang.String defValue)
protected ProviderManager getProviderManager() throws ConfigurationException
ConfigurationException
protected org.priha.core.RepositoryImpl.SessionManager getSessionManager()
public void setProperty(java.lang.String key, java.lang.String property)
key
- property
- public java.util.Enumeration<java.lang.String> getPropertyNames()
public java.lang.String getDescriptor(java.lang.String key)
getDescriptor
in interface javax.jcr.Repository
public java.lang.String[] getDescriptorKeys()
getDescriptorKeys
in interface javax.jcr.Repository
public SessionImpl login(javax.jcr.Credentials credentials, java.lang.String workspaceName) throws javax.jcr.LoginException, javax.jcr.NoSuchWorkspaceException, javax.jcr.RepositoryException
login
in interface javax.jcr.Repository
javax.jcr.LoginException
javax.jcr.NoSuchWorkspaceException
javax.jcr.RepositoryException
public SessionImpl login(javax.jcr.Credentials credentials) throws javax.jcr.LoginException, javax.jcr.RepositoryException
login
in interface javax.jcr.Repository
javax.jcr.LoginException
javax.jcr.RepositoryException
public SessionImpl login(java.lang.String workspaceName) throws javax.jcr.LoginException, javax.jcr.NoSuchWorkspaceException, javax.jcr.RepositoryException
login
in interface javax.jcr.Repository
javax.jcr.LoginException
javax.jcr.NoSuchWorkspaceException
javax.jcr.RepositoryException
public SessionImpl login() throws javax.jcr.LoginException, javax.jcr.RepositoryException
login
in interface javax.jcr.Repository
javax.jcr.LoginException
javax.jcr.RepositoryException
public void shutdown()
public SessionImpl superUserLogin(java.lang.String workspaceName) throws javax.jcr.LoginException, javax.jcr.NoSuchWorkspaceException, javax.jcr.RepositoryException
This method is guaranteed to always return a Session which has all permissions into the repository - assuming the underlying repository implementation does not have any limitations (which it normally should not have).
workspaceName
- The workspace to which the login is done.
javax.jcr.LoginException
javax.jcr.NoSuchWorkspaceException
javax.jcr.RepositoryException
public static NamespaceRegistryImpl getGlobalNamespaceRegistry()
protected void visit(RepositoryImpl.SessionVisitor v)
v
- protected void removeSession(SessionImpl s)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |