mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged DEV/SWIFT to HEAD
26012: OpenCMIS server bug fixes: PWC properties update and document version delete 26205: - integrated the CMIS Client API project into the build - made the local CMIS client use the Alfresco OpenCMIS Extension - updated OpenCMIS 26300: expose all non-child associations through OpenCMIS and check relationship source and target instead of the relationship type 26356: OpenCMIS update 26378: added more CMIS client examples 26380: added helper methods for CMIS client 26500: - fixed CMIS date aspect property encoding - fixed CMIS rendition filter handling 26519: OpenCMIS update 26523: fixed CMISConnectionManager 26596: renamed CMIS JavaScript root objects (cmis -> cmisserver, cmisclient -> cmis) 26651: removed the cmis-client-api project and replaced it with a jar in 3rd-party 26652: - corrected CMIS samples 26656: - removed cmis-client-api from build 26658: - removed the last bit of cmis-client-api 26663: - added CMIS samples (browser and upload) 26742: CMIS webscripts samples update 26743: CMIS webscripts samples update 26939: removed duplicate commons-fileupload 26942: updated commons-lang to 2.6 26943: updated OpenCMIS (browser binding is now included in the server framework) 26953: refactored OpenCMIS client integration 26974: Update classpath for Florian - OpenCMIS browser bindings are now rolled into the main jar, no need for their own one 26975: removed outdated CMIS browser binding demo page 27048: port of the Spring Surf CMIS browser plus a few new features (create folder, create document, delete object) 27077: bug fix: CMIS id for associations 27079: OpenCMIS update 27085: added check if CMIS is supported 27086: OpenCMIS client bindings update (force JAX-WS RI) 27138: clean up 27764: CMIS default connection handling 27879: OpenCMIS client: moved server definitions to separate config file 27880: OpenCMIS client: removed test repositories from configuration 27918: changed CMIS server configuration tag name to match Spring Surf configuration 27920: enabled relationships in CMIS browser 27924: Updated Spring Surf and added the Spring Surf CMIS framework [Merge note: Kept most recent HEAD jars where conflicts occured] 27926: Updated Spring Surf source jars [Merge note: Kept most recent HEAD jars where conflicts occured] git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28219 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -19,19 +19,22 @@
|
||||
package org.alfresco.repo.cmis.client;
|
||||
|
||||
import org.apache.chemistry.opencmis.client.api.Session;
|
||||
import org.apache.chemistry.opencmis.commons.enums.CapabilityQuery;
|
||||
|
||||
public class CMISConnectionImpl implements CMISConnection
|
||||
{
|
||||
private AbstractCMISConnectionManagerImpl connectionManager;
|
||||
|
||||
private String id;
|
||||
private String internalId;
|
||||
private Session session;
|
||||
private CMISServer server;
|
||||
private String username;
|
||||
private boolean isLocal;
|
||||
private boolean isDefault;
|
||||
private boolean isShared;
|
||||
|
||||
public CMISConnectionImpl(AbstractCMISConnectionManagerImpl connectionManager, String id, Session session,
|
||||
CMISServer server, String username, boolean isLocal)
|
||||
CMISServer server, String username, boolean isDefault, boolean isShared)
|
||||
{
|
||||
if (connectionManager == null)
|
||||
{
|
||||
@@ -49,47 +52,75 @@ public class CMISConnectionImpl implements CMISConnection
|
||||
}
|
||||
|
||||
this.connectionManager = connectionManager;
|
||||
this.id = id;
|
||||
this.internalId = id;
|
||||
int x = id.indexOf(AbstractCMISConnectionManagerImpl.RESERVED_ID_CHAR);
|
||||
this.id = (x > -1 ? id.substring(0, x) : id);
|
||||
this.session = session;
|
||||
this.server = server;
|
||||
this.username = username;
|
||||
this.isLocal = isLocal;
|
||||
this.isDefault = isDefault;
|
||||
this.isShared = isShared;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getInternalId()
|
||||
{
|
||||
return internalId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Session getSession()
|
||||
{
|
||||
return session;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CMISServer getServer()
|
||||
{
|
||||
return server;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUserName()
|
||||
{
|
||||
return username;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLocal()
|
||||
public boolean isDefault()
|
||||
{
|
||||
return isLocal;
|
||||
return isDefault;
|
||||
}
|
||||
|
||||
public boolean isShared()
|
||||
{
|
||||
return isShared;
|
||||
}
|
||||
|
||||
public boolean supportsQuery()
|
||||
{
|
||||
if (session == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (session.getRepositoryInfo().getCapabilities() == null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return session.getRepositoryInfo().getCapabilities().getQueryCapability() != CapabilityQuery.NONE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close()
|
||||
{
|
||||
connectionManager.removeConnection(this);
|
||||
session = null;
|
||||
}
|
||||
|
||||
public int compareTo(CMISConnection conn)
|
||||
{
|
||||
return id.compareTo(conn.getId());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user