public class RepositoryProvider extends AbstractLogEnabled implements Contextualizable, Component
| Modifier and Type | Field and Description | 
|---|---|
| private Context | _avalonContextThe avalon context, initialized during the contextualize method | 
| private Context | _context | 
| private static String | _CONTEXT_CREDENTIALS_KEYThe credentials object key. | 
| static String | CONTEXT_IS_JNDI_KEYThe JNDI variable key. | 
| static String | CONTEXT_REPOSITORY_KEYThe context repository key. | 
| static String | ROLEThe avalon role. | 
| static String | SESSION_JCR_SESSIONS_KEYThe 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()