mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged BRANCHES/DEV/V3.3-BUG-FIX to HEAD:
21646: ALF-3752: Getting Parent on a specific version throws exception 21655: Fix ALF-4006: Incorrect search result after renaming a folder 21634: Fix ALF-3822: Storing of datetime does not work git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@21662 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -80,6 +80,9 @@ import org.alfresco.service.cmr.coci.CheckOutCheckInServiceException;
|
||||
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
import org.alfresco.service.cmr.dictionary.InvalidAspectException;
|
||||
import org.alfresco.service.cmr.model.FileExistsException;
|
||||
import org.alfresco.service.cmr.model.FileFolderService;
|
||||
import org.alfresco.service.cmr.model.FileNotFoundException;
|
||||
import org.alfresco.service.cmr.repository.AssociationRef;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.ContentService;
|
||||
@@ -139,6 +142,7 @@ public class CMISServicesImpl implements CMISServices, ApplicationContextAware,
|
||||
private CMISDictionaryService cmisDictionaryService;
|
||||
private SearchService searchService;
|
||||
private NodeService nodeService;
|
||||
private FileFolderService fileFolderService;
|
||||
private ContentService contentService;
|
||||
private TenantAdminService tenantAdminService;
|
||||
private CMISRenditionService cmisRenditionService;
|
||||
@@ -249,6 +253,14 @@ public class CMISServicesImpl implements CMISServices, ApplicationContextAware,
|
||||
this.nodeService = nodeService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param fileFolderService
|
||||
*/
|
||||
public void setFileFolderService(FileFolderService fileFolderService)
|
||||
{
|
||||
this.fileFolderService = fileFolderService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the content service.
|
||||
*
|
||||
@@ -940,7 +952,26 @@ public class CMISServicesImpl implements CMISServices, ApplicationContextAware,
|
||||
{
|
||||
throw new CMISConstraintException("Unable to set property " + propertyName);
|
||||
}
|
||||
nodeService.setProperty(nodeRef, property, value);
|
||||
|
||||
if (property.equals(ContentModel.PROP_NAME))
|
||||
{
|
||||
try
|
||||
{
|
||||
fileFolderService.rename(nodeRef, value.toString());
|
||||
}
|
||||
catch (FileExistsException e)
|
||||
{
|
||||
throw new CMISConstraintException("Object already exists with name " + value.toString());
|
||||
}
|
||||
catch (FileNotFoundException e)
|
||||
{
|
||||
throw new CMISInvalidArgumentException("Object with id " + nodeRef.toString() + " not found");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
nodeService.setProperty(nodeRef, property, value);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user