mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
Merge changes from 2.6.1 release to 3.0
This commit is contained in:
@@ -51,9 +51,13 @@ import org.alfresco.repo.policy.annotation.BehaviourBean;
|
||||
import org.alfresco.repo.policy.annotation.BehaviourKind;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
|
||||
import org.alfresco.service.cmr.model.FileFolderService;
|
||||
import org.alfresco.service.cmr.quickshare.QuickShareService;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.ContentData;
|
||||
import org.alfresco.service.cmr.repository.ContentReader;
|
||||
import org.alfresco.service.cmr.repository.ContentService;
|
||||
import org.alfresco.service.cmr.repository.ContentWriter;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.ScriptService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
@@ -94,6 +98,9 @@ public class RecordAspect extends AbstractDisposableItem
|
||||
/** quickShare service */
|
||||
private QuickShareService quickShareService;
|
||||
|
||||
/** File folder service */
|
||||
private FileFolderService fileFolderService;
|
||||
|
||||
/** I18N */
|
||||
private static final String MSG_CANNOT_UPDATE_RECORD_CONTENT = "rm.service.update-record-content";
|
||||
|
||||
@@ -130,6 +137,15 @@ public class RecordAspect extends AbstractDisposableItem
|
||||
this.quickShareService = quickShareService;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param fileFolderService file folder service
|
||||
*/
|
||||
public void setFileFolderService(FileFolderService fileFolderService)
|
||||
{
|
||||
this.fileFolderService = fileFolderService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Behaviour to ensure renditions have the appropriate extended security.
|
||||
*
|
||||
@@ -358,6 +374,14 @@ public class RecordAspect extends AbstractDisposableItem
|
||||
{
|
||||
// then remove any extended security from the newly copied record
|
||||
extendedSecurityService.remove(targetNodeRef);
|
||||
|
||||
//create a new content URL for the copy
|
||||
ContentReader reader = fileFolderService.getReader(targetNodeRef);
|
||||
if (reader != null)
|
||||
{
|
||||
ContentWriter writer = fileFolderService.getWriter(targetNodeRef);
|
||||
writer.putContent(reader);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -36,10 +36,6 @@ import java.util.Map;
|
||||
import org.alfresco.api.AlfrescoPublicApi;
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter;
|
||||
import org.alfresco.service.cmr.repository.datatype.TypeConversionException;
|
||||
import org.alfresco.service.cmr.repository.datatype.TypeConverter;
|
||||
import org.alfresco.service.cmr.search.SearchParameters;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.json.JSONArray;
|
||||
@@ -381,20 +377,5 @@ public class RecordsManagementSearchParameters
|
||||
{
|
||||
return includedContainerTypes;
|
||||
}
|
||||
|
||||
// This code needs to be removed once MNT-14795 (Search does not work when RM is installed) has been fixed.
|
||||
static
|
||||
{
|
||||
DefaultTypeConverter.INSTANCE.addConverter(
|
||||
SearchParameters.class,
|
||||
String.class,
|
||||
new TypeConverter.Converter<SearchParameters, String>()
|
||||
{
|
||||
public String convert(SearchParameters source)
|
||||
{
|
||||
throw new TypeConversionException("Dummy converter! Should throw a TypeConversionException");
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user