mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-21 18:09:20 +00:00
CLOUD-2157 "CMIS version is invalid. Setting it to CMIS 1.0." move original fix to Cloud override context file and ensure 1.0 endpoints explicitly set the CMIS version.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@57937 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -41,6 +41,7 @@ import org.alfresco.opencmis.CMISDispatcherRegistry.Binding;
|
||||
import org.alfresco.opencmis.CMISDispatcherRegistry.Endpoint;
|
||||
import org.alfresco.service.descriptor.Descriptor;
|
||||
import org.alfresco.service.descriptor.DescriptorService;
|
||||
import org.apache.chemistry.opencmis.commons.enums.CmisVersion;
|
||||
import org.apache.chemistry.opencmis.commons.server.CmisServiceFactory;
|
||||
import org.apache.chemistry.opencmis.server.impl.CmisRepositoryContextListener;
|
||||
import org.apache.chemistry.opencmis.server.impl.atompub.CmisAtomPubServlet;
|
||||
@@ -64,6 +65,7 @@ public abstract class CMISServletDispatcher implements CMISDispatcher
|
||||
protected String serviceName;
|
||||
protected BaseUrlGenerator baseUrlGenerator;
|
||||
protected String version;
|
||||
protected CmisVersion cmisVersion;
|
||||
|
||||
public void setDescriptorService(DescriptorService descriptorService)
|
||||
{
|
||||
@@ -100,7 +102,12 @@ public abstract class CMISServletDispatcher implements CMISDispatcher
|
||||
return serviceName;
|
||||
}
|
||||
|
||||
protected synchronized Descriptor getCurrentDescriptor()
|
||||
public void setCmisVersion(String cmisVersion)
|
||||
{
|
||||
this.cmisVersion = CmisVersion.fromValue(cmisVersion);
|
||||
}
|
||||
|
||||
protected synchronized Descriptor getCurrentDescriptor()
|
||||
{
|
||||
if(this.currentDescriptor == null)
|
||||
{
|
||||
@@ -205,7 +212,7 @@ public abstract class CMISServletDispatcher implements CMISDispatcher
|
||||
}
|
||||
else if(arg0.equals(CmisAtomPubServlet.PARAM_CMIS_VERSION))
|
||||
{
|
||||
return version;
|
||||
return (cmisVersion != null ? cmisVersion.value() : CmisVersion.CMIS_1_0.value());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user