mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fix issue in CMIS Web Services handling of repository id. CMIS Spaces Flex Client now operates against Alfresco via CMIS Web Services.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13608 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -251,7 +251,7 @@ public class DMAbstractServicePort
|
||||
*/
|
||||
protected void checkRepositoryId(String repositoryId) throws InvalidArgumentException
|
||||
{
|
||||
if (!this.descriptorService.getServerDescriptor().getId().equals(repositoryId))
|
||||
if (!this.descriptorService.getCurrentRepositoryDescriptor().getId().equals(repositoryId))
|
||||
{
|
||||
throw new InvalidArgumentException("Invalid repository id");
|
||||
}
|
||||
|
@@ -117,7 +117,7 @@ public class DMRepositoryServicePort extends DMAbstractServicePort implements Re
|
||||
throws RuntimeException, InvalidArgumentException, OperationNotSupportedException, UpdateConflictException, PermissionDeniedException
|
||||
{
|
||||
CmisRepositoryEntryType repositoryEntryType = new CmisRepositoryEntryType();
|
||||
Descriptor serverDescriptor = descriptorService.getServerDescriptor();
|
||||
Descriptor serverDescriptor = descriptorService.getCurrentRepositoryDescriptor();
|
||||
repositoryEntryType.setRepositoryID(serverDescriptor.getId());
|
||||
repositoryEntryType.setRepositoryName(serverDescriptor.getName());
|
||||
return Collections.singletonList(repositoryEntryType);
|
||||
@@ -139,12 +139,9 @@ public class DMRepositoryServicePort extends DMAbstractServicePort implements Re
|
||||
public CmisRepositoryInfoType getRepositoryInfo(GetRepositoryInfo parameters)
|
||||
throws PermissionDeniedException, UpdateConflictException, ObjectNotFoundException, OperationNotSupportedException, InvalidArgumentException, RuntimeException, ConstraintViolationException
|
||||
{
|
||||
Descriptor serverDescriptor = descriptorService.getServerDescriptor();
|
||||
if (serverDescriptor.getId().equals(parameters.getRepositoryId()) == false)
|
||||
{
|
||||
throw new InvalidArgumentException("Invalid repository id");
|
||||
}
|
||||
checkRepositoryId(parameters.getRepositoryId());
|
||||
|
||||
Descriptor serverDescriptor = descriptorService.getCurrentRepositoryDescriptor();
|
||||
CmisRepositoryInfoType repositoryInfoType = new CmisRepositoryInfoType();
|
||||
repositoryInfoType.setRepositoryId(serverDescriptor.getId());
|
||||
repositoryInfoType.setRepositoryName(serverDescriptor.getName());
|
||||
@@ -408,10 +405,7 @@ public class DMRepositoryServicePort extends DMAbstractServicePort implements Re
|
||||
public GetTypesResponse getTypes(GetTypes parameters)
|
||||
throws RuntimeException, InvalidArgumentException, ObjectNotFoundException, ConstraintViolationException, OperationNotSupportedException, UpdateConflictException, PermissionDeniedException
|
||||
{
|
||||
if (descriptorService.getServerDescriptor().getId().equals(parameters.getRepositoryId()) == false)
|
||||
{
|
||||
throw new InvalidArgumentException("Invalid repository id");
|
||||
}
|
||||
checkRepositoryId(parameters.getRepositoryId());
|
||||
|
||||
Collection<CMISTypeId> typeIds;
|
||||
if (parameters.getTypeId() == null)
|
||||
@@ -469,10 +463,7 @@ public class DMRepositoryServicePort extends DMAbstractServicePort implements Re
|
||||
public GetTypeDefinitionResponse getTypeDefinition(GetTypeDefinition parameters)
|
||||
throws PermissionDeniedException, UpdateConflictException, ObjectNotFoundException, OperationNotSupportedException, TypeNotFoundException, InvalidArgumentException, RuntimeException, ConstraintViolationException
|
||||
{
|
||||
if (descriptorService.getServerDescriptor().getId().equals(parameters.getRepositoryId()) == false)
|
||||
{
|
||||
throw new InvalidArgumentException("Invalid repository id");
|
||||
}
|
||||
checkRepositoryId(parameters.getRepositoryId());
|
||||
|
||||
GetTypeDefinitionResponse response = new GetTypeDefinitionResponse();
|
||||
response.setType(getCmisTypeDefinition(parameters.getTypeId(), true));
|
||||
|
Reference in New Issue
Block a user