public abstract class AbstractCMISConnectionManagerImpl extends CMISHelper implements CMISConnectionManager
| Modifier and Type | Field and Description |
|---|---|
protected org.alfresco.service.cmr.security.AuthenticationService |
authenticationService |
protected org.springframework.extensions.config.ConfigService |
configService |
static java.lang.String |
DEFAULT_CONNECTION_ID |
protected java.util.concurrent.locks.ReentrantReadWriteLock |
lock |
static char |
RESERVED_ID_CHAR |
static java.lang.String |
SERVER_DESCRIPTION |
static java.lang.String |
SERVER_NAME |
protected java.util.Map |
servers |
protected org.apache.chemistry.opencmis.client.api.SessionFactory |
sessionFactory |
protected java.util.LinkedHashMap |
sharedConnections |
protected int |
sharedConnectionsCapacity |
protected java.util.LinkedHashMap |
userConnections |
protected int |
userConnectionsCapacity |
| Constructor and Description |
|---|
AbstractCMISConnectionManagerImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected CMISConnection |
createConnection(CMISServer server,
java.lang.String connectionId,
boolean isShared) |
CMISServer |
createServerDefinition(CMISServer server,
java.lang.String username,
java.lang.String password)
Creates a new server definition from a template.
|
CMISServer |
createServerDefinition(CMISServer server,
java.lang.String username,
java.lang.String password,
java.lang.String repositoryId)
Creates a new server definition from a template.
|
protected CMISServer |
createServerDefinition(java.util.Map parameters) |
CMISServer |
createServerDefinition(java.lang.String serverName,
java.util.Map parameters)
Creates a new server definition.
|
protected org.apache.chemistry.opencmis.client.api.Session |
createSession(java.util.Map parameters) |
CMISConnection |
createSharedConnection(CMISServer server,
java.lang.String connectionId)
Creates a new connection that is visible to all users.
|
CMISConnection |
createUserConnection(CMISServer server,
java.lang.String connectionId)
Creates a new connection that is only visible to the current user.
|
protected java.lang.String |
createUserConnectionId(java.lang.String username,
java.lang.String connectionId) |
abstract CMISConnection |
getConnection()
Gets or creates a connection to the local server or a default server.
|
CMISConnection |
getConnection(java.lang.String connectionId)
Returns a specific connection or
null if the connection id
is unknown. |
java.util.List |
getRepositories(CMISServer server)
Returns all repositories available at this server.
|
CMISServer |
getServerDefinition(java.lang.String serverName)
Gets a server definitions by name.
|
java.util.List |
getServerDefinitions()
Returns all configured server definitions.
|
java.util.List |
getSharedConnections()
Returns all shared connections.
|
java.util.List |
getUserConnections()
Returns all user connections.
|
void |
init() |
void |
removeConnection(CMISConnection connection) |
void |
setAuthenticationService(org.alfresco.service.cmr.security.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 java.lang.String SERVER_NAME
public static final java.lang.String SERVER_DESCRIPTION
public static final java.lang.String DEFAULT_CONNECTION_ID
public static final char RESERVED_ID_CHAR
protected org.springframework.extensions.config.ConfigService configService
protected org.alfresco.service.cmr.security.AuthenticationService authenticationService
protected final org.apache.chemistry.opencmis.client.api.SessionFactory sessionFactory
protected java.util.LinkedHashMap sharedConnections
protected java.util.LinkedHashMap userConnections
protected int userConnectionsCapacity
protected int sharedConnectionsCapacity
protected java.util.Map servers
protected final java.util.concurrent.locks.ReentrantReadWriteLock lock
public void setConfigService(org.springframework.extensions.config.ConfigService configService)
public void setAuthenticationService(org.alfresco.service.cmr.security.AuthenticationService authenticationService)
public void setUserConnectionsCapacity(int userConnectionsCapacity)
public void setSharedConnectionsCapacity(int sharedConnectionsCapacity)
public void init()
public CMISConnection createUserConnection(CMISServer server, java.lang.String connectionId)
CMISConnectionManagercreateUserConnection in interface CMISConnectionManagerprotected java.lang.String createUserConnectionId(java.lang.String username,
java.lang.String connectionId)
public CMISConnection createSharedConnection(CMISServer server, java.lang.String connectionId)
CMISConnectionManagercreateSharedConnection in interface CMISConnectionManagerprotected CMISConnection createConnection(CMISServer server, java.lang.String connectionId, boolean isShared)
public abstract CMISConnection getConnection()
CMISConnectionManagergetConnection in interface CMISConnectionManagerpublic CMISConnection getConnection(java.lang.String connectionId)
CMISConnectionManagernull if the connection id
is unknown.getConnection in interface CMISConnectionManagerpublic java.util.List getUserConnections()
CMISConnectionManagergetUserConnections in interface CMISConnectionManagerpublic java.util.List getSharedConnections()
CMISConnectionManagergetSharedConnections in interface CMISConnectionManagerpublic void removeConnection(CMISConnection connection)
protected org.apache.chemistry.opencmis.client.api.Session createSession(java.util.Map parameters)
public java.util.List getServerDefinitions()
CMISConnectionManagergetServerDefinitions in interface CMISConnectionManagerpublic CMISServer getServerDefinition(java.lang.String serverName)
CMISConnectionManagergetServerDefinition in interface CMISConnectionManagerpublic CMISServer createServerDefinition(java.lang.String serverName, java.util.Map parameters)
CMISConnectionManagercreateServerDefinition in interface CMISConnectionManagerpublic CMISServer createServerDefinition(CMISServer server, java.lang.String username, java.lang.String password)
CMISConnectionManagercreateServerDefinition in interface CMISConnectionManagerpublic CMISServer createServerDefinition(CMISServer server, java.lang.String username, java.lang.String password, java.lang.String repositoryId)
CMISConnectionManagercreateServerDefinition in interface CMISConnectionManagerprotected CMISServer createServerDefinition(java.util.Map parameters)
public java.util.List getRepositories(CMISServer server)
CMISConnectionManagergetRepositories in interface CMISConnectionManagerCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.