|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.james.jcr.JCRMailRepository
org.apache.james.phoenix.jcr.AvalonJCRMailRepository
public class AvalonJCRMailRepository
Managed Avalon wrapper for the JCRMailRepository
class.
Field Summary | |
---|---|
protected javax.jcr.Credentials |
credentials
Login credentials for accessing the repository. |
protected org.apache.commons.logging.Log |
logger
|
protected java.lang.String |
path
Path (relative to root) of the mail repository within the workspace. |
protected javax.jcr.Repository |
repository
JCR content repository used as the mail repository. |
protected java.lang.String |
workspace
Name of the workspace used as the mail repository. |
Fields inherited from interface org.apache.james.services.MailRepository |
---|
MAIL, ROLE |
Constructor Summary | |
---|---|
AvalonJCRMailRepository()
|
Method Summary | |
---|---|
void |
configure(org.apache.avalon.framework.configuration.Configuration configuration)
|
javax.jcr.Credentials |
getCredentials()
Returns the login credentials for accessing the repository. |
org.apache.commons.logging.Log |
getLogger()
Gets the current logger. |
java.lang.String |
getPath()
Returns the path of the mail repository within the workspace. |
javax.jcr.Repository |
getRepository()
Retuns the JCR content repository used as the mail repository. |
java.lang.String |
getWorkspace()
Returns the name of the workspace used as the mail repository. |
void |
initialize()
|
protected javax.jcr.Session |
login()
Logs into a new session. |
protected javax.jcr.NodeIterator |
query(javax.jcr.Session session,
java.lang.String xpath)
|
void |
setCredentials(javax.jcr.Credentials credentials)
Sets the login credentials for accessing the repository. |
void |
setLogger(org.apache.commons.logging.Log logger)
Sets the current logger. |
void |
setPath(java.lang.String path)
Sets the path of the mail repository within the workspace. |
void |
setRepository(javax.jcr.Repository repository)
Sets the JCR content repository to be used as the mail repository. |
void |
setWorkspace(java.lang.String workspace)
Sets the name of the workspace used as the mail repository. |
protected java.lang.String |
toSafeName(java.lang.String key)
|
Methods inherited from class org.apache.james.jcr.JCRMailRepository |
---|
list, lock, remove, remove, remove, retrieve, store, unlock |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.apache.commons.logging.Log logger
protected javax.jcr.Repository repository
protected javax.jcr.Credentials credentials
null
(the default) to use default credentials.
protected java.lang.String workspace
null
(the default) to use the default workspace.
protected java.lang.String path
Constructor Detail |
---|
public AvalonJCRMailRepository()
Method Detail |
---|
public void configure(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException
configure
in interface org.apache.avalon.framework.configuration.Configurable
org.apache.avalon.framework.configuration.ConfigurationException
public void initialize() throws java.lang.Exception
initialize
in interface org.apache.avalon.framework.activity.Initializable
java.lang.Exception
public final org.apache.commons.logging.Log getLogger()
public final void setLogger(org.apache.commons.logging.Log logger)
logger
- the logger to set, not nullpublic javax.jcr.Repository getRepository()
public void setRepository(javax.jcr.Repository repository)
repository
- JCR content repositorypublic javax.jcr.Credentials getCredentials()
null
if using the default credentialspublic void setCredentials(javax.jcr.Credentials credentials)
credentials
- login credentials,
or null
to use the default credentialspublic java.lang.String getWorkspace()
null
if using the default workspacepublic void setWorkspace(java.lang.String workspace)
workspace
- workspace name,
or null
to use the default workspacepublic java.lang.String getPath()
public void setPath(java.lang.String path)
path
- repository pathprotected javax.jcr.Session login() throws javax.jcr.LoginException, javax.jcr.NoSuchWorkspaceException, javax.jcr.RepositoryException
javax.jcr.LoginException
- when login fails
javax.jcr.NoSuchWorkspaceException
- when workspace does not exist
javax.jcr.RepositoryException
- when access failsprotected java.lang.String toSafeName(java.lang.String key)
protected javax.jcr.NodeIterator query(javax.jcr.Session session, java.lang.String xpath) throws javax.jcr.RepositoryException, javax.jcr.query.InvalidQueryException
javax.jcr.RepositoryException
javax.jcr.query.InvalidQueryException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |