Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.core.storage.sql
Class RepositoryImpl

java.lang.Object
  extended by org.nuxeo.ecm.core.storage.sql.RepositoryImpl
All Implemented Interfaces:
java.io.Serializable, javax.naming.Referenceable, javax.resource.cci.ConnectionFactory, Repository, RepositoryManagement

public class RepositoryImpl
extends java.lang.Object
implements Repository

Repository implementation, to be extended by backend-specific initialization code.

See Also:
RepositoryBackend, Serialized Form

Nested Class Summary
static class RepositoryImpl.SessionPathResolver
           
 
Field Summary
 java.lang.String repositoryId
          Transient id for this repository assigned by the server on first connection.
static java.lang.String SERVER_PATH_BINARY
           
static java.lang.String SERVER_PATH_VCS
           
 
Constructor Summary
RepositoryImpl(RepositoryDescriptor repositoryDescriptor)
           
 
Method Summary
 void activateServer()
          Activates the VCS server used for remote connections.
 int clearCaches()
          Clears all the caches.
 void close()
          Closes the repository and release all resources.
 void deactivateServer()
          Deactivates the VCS server used for remote connections.
 int getActiveSessionsCount()
          Gets the number of active sessions.
 BinaryManager getBinaryManager()
           
 java.util.Collection<MapperClientInfo> getClientInfos()
          Get info about current VCS server clients
 SessionImpl getConnection()
          Gets a new connection by logging in to the repository with default credentials.
 SessionImpl getConnection(javax.resource.cci.ConnectionSpec connectionSpec)
          Gets a new connection by logging in to the repository with given connection information (credentials).
 HttpClient getHttpClient()
           
 javax.resource.cci.ResourceAdapterMetaData getMetaData()
           
 java.lang.String getName()
          Gets the repository name.
 javax.resource.cci.RecordFactory getRecordFactory()
           
 javax.naming.Reference getReference()
           
 RepositoryDescriptor getRepositoryDescriptor()
           
 java.lang.String getServerURL()
          Which is the remote location ?
 boolean isServerActivated()
          Is the server available remotely ?
 void processClusterInvalidationsNext()
          Makes sure that the next transaction will process cluster invalidations.
 void setReference(javax.naming.Reference reference)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVER_PATH_VCS

public static final java.lang.String SERVER_PATH_VCS
See Also:
Constant Field Values

SERVER_PATH_BINARY

public static final java.lang.String SERVER_PATH_BINARY
See Also:
Constant Field Values

repositoryId

public java.lang.String repositoryId
Transient id for this repository assigned by the server on first connection. This is not persisted.

Constructor Detail

RepositoryImpl

public RepositoryImpl(RepositoryDescriptor repositoryDescriptor)
               throws StorageException
Throws:
StorageException
Method Detail

getHttpClient

public HttpClient getHttpClient()

isServerActivated

public boolean isServerActivated()
Description copied from interface: RepositoryManagement
Is the server available remotely ?

Specified by:
isServerActivated in interface RepositoryManagement

getServerURL

public java.lang.String getServerURL()
Description copied from interface: RepositoryManagement
Which is the remote location ? TODO this info would be better served by a provisioning service. The remote location is dependent to the context of access.

Specified by:
getServerURL in interface RepositoryManagement

activateServer

public void activateServer()
Description copied from interface: RepositoryManagement
Activates the VCS server used for remote connections.

Specified by:
activateServer in interface RepositoryManagement

deactivateServer

public void deactivateServer()
Description copied from interface: RepositoryManagement
Deactivates the VCS server used for remote connections.

Specified by:
deactivateServer in interface RepositoryManagement

getClientInfos

public java.util.Collection<MapperClientInfo> getClientInfos()
Description copied from interface: RepositoryManagement
Get info about current VCS server clients

Specified by:
getClientInfos in interface RepositoryManagement

getRepositoryDescriptor

public RepositoryDescriptor getRepositoryDescriptor()

getBinaryManager

public BinaryManager getBinaryManager()

getConnection

public SessionImpl getConnection()
                          throws StorageException
Gets a new connection by logging in to the repository with default credentials.

Specified by:
getConnection in interface javax.resource.cci.ConnectionFactory
Specified by:
getConnection in interface Repository
Returns:
the session
Throws:
StorageException

getConnection

public SessionImpl getConnection(javax.resource.cci.ConnectionSpec connectionSpec)
                          throws StorageException
Gets a new connection by logging in to the repository with given connection information (credentials).

Specified by:
getConnection in interface javax.resource.cci.ConnectionFactory
Specified by:
getConnection in interface Repository
Parameters:
connectionSpec - the parameters to use to connnect
Returns:
the session
Throws:
StorageException

getMetaData

public javax.resource.cci.ResourceAdapterMetaData getMetaData()
Specified by:
getMetaData in interface javax.resource.cci.ConnectionFactory

getRecordFactory

public javax.resource.cci.RecordFactory getRecordFactory()
Specified by:
getRecordFactory in interface javax.resource.cci.ConnectionFactory

setReference

public void setReference(javax.naming.Reference reference)

getReference

public javax.naming.Reference getReference()
Specified by:
getReference in interface javax.naming.Referenceable

close

public void close()
           throws StorageException
Description copied from interface: Repository
Closes the repository and release all resources.

Specified by:
close in interface Repository
Throws:
StorageException

getName

public java.lang.String getName()
Description copied from interface: RepositoryManagement
Gets the repository name.

Specified by:
getName in interface RepositoryManagement

getActiveSessionsCount

public int getActiveSessionsCount()
Description copied from interface: RepositoryManagement
Gets the number of active sessions.

Specified by:
getActiveSessionsCount in interface RepositoryManagement

clearCaches

public int clearCaches()
Description copied from interface: RepositoryManagement
Clears all the caches.

Specified by:
clearCaches in interface RepositoryManagement
Returns:
an indicative count of objects removed

processClusterInvalidationsNext

public void processClusterInvalidationsNext()
Description copied from interface: RepositoryManagement
Makes sure that the next transaction will process cluster invalidations.

Specified by:
processClusterInvalidationsNext in interface RepositoryManagement

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.