public abstract class AbstractCMISConnectionManagerImpl extends CMISHelper implements CMISConnectionManager
| Modifier and Type | Field and Description |
|---|---|
protected AuthenticationService |
authenticationService |
protected org.springframework.extensions.config.ConfigService |
configService |
static String |
DEFAULT_CONNECTION_ID |
protected ReentrantReadWriteLock |
lock |
static char |
RESERVED_ID_CHAR |
static String |
SERVER_DESCRIPTION |
static String |
SERVER_NAME |
protected Map<String,CMISServer> |
servers |
protected org.apache.chemistry.opencmis.client.api.SessionFactory |
sessionFactory |
protected LinkedHashMap<String,CMISConnection> |
sharedConnections |
protected int |
sharedConnectionsCapacity |
protected LinkedHashMap<String,CMISConnection> |
userConnections |
protected int |
userConnectionsCapacity |
| Constructor and Description |
|---|
AbstractCMISConnectionManagerImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected CMISConnection |
createConnection(CMISServer server,
String connectionId,
boolean isShared) |
CMISServer |
createServerDefinition(CMISServer server,
String username,
String password)
Creates a new server definition from a template.
|
CMISServer |
createServerDefinition(CMISServer server,
String username,
String password,
String repositoryId)
Creates a new server definition from a template.
|
protected CMISServer |
createServerDefinition(Map<String,String> parameters) |
CMISServer |
createServerDefinition(String serverName,
Map<String,String> parameters)
Creates a new server definition.
|
protected org.apache.chemistry.opencmis.client.api.Session |
createSession(Map<String,String> parameters) |
CMISConnection |
createSharedConnection(CMISServer server,
String connectionId)
Creates a new connection that is visible to all users.
|
CMISConnection |
createUserConnection(CMISServer server,
String connectionId)
Creates a new connection that is only visible to the current user.
|
protected String |
createUserConnectionId(String username,
String connectionId) |
abstract CMISConnection |
getConnection()
Gets or creates a connection to the local server or a default server.
|
CMISConnection |
getConnection(String connectionId)
Returns a specific connection or
null if the connection id
is unknown. |
List<org.apache.chemistry.opencmis.client.api.Repository> |
getRepositories(CMISServer server)
Returns all repositories available at this server.
|
CMISServer |
getServerDefinition(String serverName)
Gets a server definitions by name.
|
List<CMISServer> |
getServerDefinitions()
Returns all configured server definitions.
|
List<CMISConnection> |
getSharedConnections()
Returns all shared connections.
|
List<CMISConnection> |
getUserConnections()
Returns all user connections.
|
void |
init() |
void |
removeConnection(CMISConnection connection) |
void |
setAuthenticationService(AuthenticationService authenticationService) |
void |
setConfigService(org.springframework.extensions.config.ConfigService configService) |
void |
setSharedConnectionsCapacity(int sharedConnectionsCapacity) |
void |
setUserConnectionsCapacity(int userConnectionsCapacity) |
createContentStream, createContentStream, createMap, isDocument, isFolder, isPolicy, isRelationshipclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateDefaultConnectionpublic static final String SERVER_NAME
public static final String SERVER_DESCRIPTION
public static final String DEFAULT_CONNECTION_ID
public static final char RESERVED_ID_CHAR
protected org.springframework.extensions.config.ConfigService configService
protected AuthenticationService authenticationService
protected final org.apache.chemistry.opencmis.client.api.SessionFactory sessionFactory
protected LinkedHashMap<String,CMISConnection> sharedConnections
protected LinkedHashMap<String,CMISConnection> userConnections
protected int userConnectionsCapacity
protected int sharedConnectionsCapacity
protected Map<String,CMISServer> servers
protected final ReentrantReadWriteLock lock
public void setConfigService(org.springframework.extensions.config.ConfigService configService)
public void setAuthenticationService(AuthenticationService authenticationService)
public void setUserConnectionsCapacity(int userConnectionsCapacity)
public void setSharedConnectionsCapacity(int sharedConnectionsCapacity)
public void init()
public CMISConnection createUserConnection(CMISServer server, String connectionId)
CMISConnectionManagercreateUserConnection in interface CMISConnectionManagerprotected String createUserConnectionId(String username, String connectionId)
public CMISConnection createSharedConnection(CMISServer server, String connectionId)
CMISConnectionManagercreateSharedConnection in interface CMISConnectionManagerprotected CMISConnection createConnection(CMISServer server, String connectionId, boolean isShared)
public abstract CMISConnection getConnection()
CMISConnectionManagergetConnection in interface CMISConnectionManagerpublic CMISConnection getConnection(String connectionId)
CMISConnectionManagernull if the connection id
is unknown.getConnection in interface CMISConnectionManagerpublic List<CMISConnection> getUserConnections()
CMISConnectionManagergetUserConnections in interface CMISConnectionManagerpublic List<CMISConnection> getSharedConnections()
CMISConnectionManagergetSharedConnections in interface CMISConnectionManagerpublic void removeConnection(CMISConnection connection)
protected org.apache.chemistry.opencmis.client.api.Session createSession(Map<String,String> parameters)
public List<CMISServer> getServerDefinitions()
CMISConnectionManagergetServerDefinitions in interface CMISConnectionManagerpublic CMISServer getServerDefinition(String serverName)
CMISConnectionManagergetServerDefinition in interface CMISConnectionManagerpublic CMISServer createServerDefinition(String serverName, Map<String,String> parameters)
CMISConnectionManagercreateServerDefinition in interface CMISConnectionManagerpublic CMISServer createServerDefinition(CMISServer server, String username, String password)
CMISConnectionManagercreateServerDefinition in interface CMISConnectionManagerpublic CMISServer createServerDefinition(CMISServer server, String username, String password, String repositoryId)
CMISConnectionManagercreateServerDefinition in interface CMISConnectionManagerprotected CMISServer createServerDefinition(Map<String,String> parameters)
public List<org.apache.chemistry.opencmis.client.api.Repository> getRepositories(CMISServer server)
CMISConnectionManagergetRepositories in interface CMISConnectionManagerCopyright © 2005–2014 Alfresco Software. All rights reserved.