public class RepositoryProvider extends AbstractLogEnabled implements Contextualizable, Component
| Modifier and Type | Field and Description | 
|---|---|
private Context | 
_avalonContext
The avalon context, initialized during the contextualize method 
 | 
private Context | 
_context  | 
private static String | 
_CONTEXT_CREDENTIALS_KEY
The credentials object key. 
 | 
static String | 
CONTEXT_IS_JNDI_KEY
The JNDI variable key. 
 | 
static String | 
CONTEXT_REPOSITORY_KEY
The context repository key. 
 | 
static String | 
ROLE
The avalon role. 
 | 
static String | 
SESSION_JCR_SESSIONS_KEY
The session map key. 
 | 
| Constructor and Description | 
|---|
RepositoryProvider()  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
contextualize(Context context)  | 
void | 
disconnect()
Disconnect from the repository. 
 | 
Credentials | 
getCredentials()
Get the credentials. 
 | 
Repository | 
getRepository()
Get the repository. 
 | 
Session | 
getSession(String workspaceName)
Get a session on the given workspace. 
 | 
Map<String,Session> | 
getSessions()
Get the JCR session map. 
 | 
boolean | 
isJndi()
Determines if the repository is obtained through JNDI 
 | 
void | 
registerRepository(Repository repository,
                  Credentials credentials,
                  boolean jndi)
Register a repository. 
 | 
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerpublic static final String SESSION_JCR_SESSIONS_KEY
public static final String CONTEXT_REPOSITORY_KEY
public static final String CONTEXT_IS_JNDI_KEY
private static final String _CONTEXT_CREDENTIALS_KEY
private Context _avalonContext
public RepositoryProvider()
public void contextualize(Context context) throws ContextException
contextualize in interface ContextualizableContextExceptionpublic Repository getRepository()
public Credentials getCredentials()
public boolean isJndi()
public void registerRepository(Repository repository, Credentials credentials, boolean jndi)
repository - The repository to registercredentials - The credentials to connectjndi - True to connect using jndipublic Map<String,Session> getSessions()
public Session getSession(String workspaceName) throws RepositoryException
workspaceName - the workspace name.RepositoryException - if an error occurredpublic void disconnect()