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:
@@ -24,6 +24,7 @@
|
|||||||
<property name="transactionHelper" ref="retryingTransactionHelper" />
|
<property name="transactionHelper" ref="retryingTransactionHelper" />
|
||||||
<property name="tenantAdminService" ref="tenantAdminService" />
|
<property name="tenantAdminService" ref="tenantAdminService" />
|
||||||
<property name="nodeService" ref="NodeService" />
|
<property name="nodeService" ref="NodeService" />
|
||||||
|
<property name="fileFolderService" ref="FileFolderService" />
|
||||||
<property name="contentService" ref="ContentService" />
|
<property name="contentService" ref="ContentService" />
|
||||||
<property name="repository" ref="repositoryHelper" />
|
<property name="repository" ref="repositoryHelper" />
|
||||||
<property name="checkOutCheckInService" ref="CheckoutCheckinService" />
|
<property name="checkOutCheckInService" ref="CheckoutCheckinService" />
|
||||||
|
@@ -41,6 +41,10 @@
|
|||||||
<type>d:boolean</type>
|
<type>d:boolean</type>
|
||||||
<multiple>true</multiple>
|
<multiple>true</multiple>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="cmiscustom:docprop_datetime">
|
||||||
|
<title>Custom Document Property (datetime)</title>
|
||||||
|
<type>d:datetime</type>
|
||||||
|
</property>
|
||||||
</properties>
|
</properties>
|
||||||
<associations>
|
<associations>
|
||||||
<association name="cmiscustom:assoc">
|
<association name="cmiscustom:assoc">
|
||||||
|
@@ -80,6 +80,9 @@ import org.alfresco.service.cmr.coci.CheckOutCheckInServiceException;
|
|||||||
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
|
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
|
||||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||||
import org.alfresco.service.cmr.dictionary.InvalidAspectException;
|
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.AssociationRef;
|
||||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||||
import org.alfresco.service.cmr.repository.ContentService;
|
import org.alfresco.service.cmr.repository.ContentService;
|
||||||
@@ -139,6 +142,7 @@ public class CMISServicesImpl implements CMISServices, ApplicationContextAware,
|
|||||||
private CMISDictionaryService cmisDictionaryService;
|
private CMISDictionaryService cmisDictionaryService;
|
||||||
private SearchService searchService;
|
private SearchService searchService;
|
||||||
private NodeService nodeService;
|
private NodeService nodeService;
|
||||||
|
private FileFolderService fileFolderService;
|
||||||
private ContentService contentService;
|
private ContentService contentService;
|
||||||
private TenantAdminService tenantAdminService;
|
private TenantAdminService tenantAdminService;
|
||||||
private CMISRenditionService cmisRenditionService;
|
private CMISRenditionService cmisRenditionService;
|
||||||
@@ -249,6 +253,14 @@ public class CMISServicesImpl implements CMISServices, ApplicationContextAware,
|
|||||||
this.nodeService = nodeService;
|
this.nodeService = nodeService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param fileFolderService
|
||||||
|
*/
|
||||||
|
public void setFileFolderService(FileFolderService fileFolderService)
|
||||||
|
{
|
||||||
|
this.fileFolderService = fileFolderService;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the content service.
|
* Sets the content service.
|
||||||
*
|
*
|
||||||
@@ -940,7 +952,26 @@ public class CMISServicesImpl implements CMISServices, ApplicationContextAware,
|
|||||||
{
|
{
|
||||||
throw new CMISConstraintException("Unable to set property " + propertyName);
|
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