mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-781: RM Dependency update (update to HEAD QA build #165, Deleted overriding files, Bug fixes)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/DEV/UPDATE@52789 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -180,7 +180,6 @@
|
|||||||
class="org.alfresco.module.org_alfresco_module_rm.script.AuditLogPost"
|
class="org.alfresco.module.org_alfresco_module_rm.script.AuditLogPost"
|
||||||
parent="webscript">
|
parent="webscript">
|
||||||
<property name="nodeService" ref="nodeService" />
|
<property name="nodeService" ref="nodeService" />
|
||||||
<property name="contentService" ref="ContentService" />
|
|
||||||
<property name="permissionService" ref="PermissionService" />
|
<property name="permissionService" ref="PermissionService" />
|
||||||
<property name="mimetypeService" ref="mimetypeService" />
|
<property name="mimetypeService" ref="mimetypeService" />
|
||||||
<property name="recordsManagementAuditService" ref="RecordsManagementAuditService" />
|
<property name="recordsManagementAuditService" ref="RecordsManagementAuditService" />
|
||||||
@@ -205,10 +204,10 @@
|
|||||||
class="org.alfresco.module.org_alfresco_module_rm.script.ExportPost"
|
class="org.alfresco.module.org_alfresco_module_rm.script.ExportPost"
|
||||||
parent="webscript">
|
parent="webscript">
|
||||||
<property name="nodeService" ref="nodeService" />
|
<property name="nodeService" ref="nodeService" />
|
||||||
<property name="contentService" ref="ContentService" />
|
|
||||||
<property name="permissionService" ref="PermissionService" />
|
<property name="permissionService" ref="PermissionService" />
|
||||||
<property name="mimetypeService" ref="mimetypeService" />
|
<property name="mimetypeService" ref="mimetypeService" />
|
||||||
<property name="exporterService" ref="ExporterService" />
|
<property name="exporterService" ref="ExporterService" />
|
||||||
|
<property name="contentStreamer" ref="webscript.content.streamer" />
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<!-- REST impl for POST import -->
|
<!-- REST impl for POST import -->
|
||||||
@@ -226,7 +225,6 @@
|
|||||||
<!-- Base bean for transfer web scripts -->
|
<!-- Base bean for transfer web scripts -->
|
||||||
<bean id="rmBaseTransferWebscript" parent="webscript" abstract="true">
|
<bean id="rmBaseTransferWebscript" parent="webscript" abstract="true">
|
||||||
<property name="nodeService" ref="nodeService" />
|
<property name="nodeService" ref="nodeService" />
|
||||||
<property name="contentService" ref="ContentService" />
|
|
||||||
<property name="permissionService" ref="PermissionService" />
|
<property name="permissionService" ref="PermissionService" />
|
||||||
<property name="mimetypeService" ref="mimetypeService" />
|
<property name="mimetypeService" ref="mimetypeService" />
|
||||||
<property name="exporterService" ref="ExporterService" />
|
<property name="exporterService" ref="ExporterService" />
|
||||||
@@ -236,6 +234,7 @@
|
|||||||
<bean id="webscript.org.alfresco.rma.transfer.get"
|
<bean id="webscript.org.alfresco.rma.transfer.get"
|
||||||
class="org.alfresco.module.org_alfresco_module_rm.script.TransferGet"
|
class="org.alfresco.module.org_alfresco_module_rm.script.TransferGet"
|
||||||
parent="rmBaseTransferWebscript">
|
parent="rmBaseTransferWebscript">
|
||||||
|
<property name="contentStreamer" ref="webscript.content.streamer" />
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<!-- REST impl for GET transfer report -->
|
<!-- REST impl for GET transfer report -->
|
||||||
@@ -245,6 +244,7 @@
|
|||||||
<property name="dictionaryService" ref="DictionaryService" />
|
<property name="dictionaryService" ref="DictionaryService" />
|
||||||
<property name="recordsManagementService" ref="RecordsManagementService" />
|
<property name="recordsManagementService" ref="RecordsManagementService" />
|
||||||
<property name="dispositionService" ref="DispositionService" />
|
<property name="dispositionService" ref="DispositionService" />
|
||||||
|
<property name="contentStreamer" ref="webscript.content.streamer" />
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<!-- REST impl for POST transfer report -->
|
<!-- REST impl for POST transfer report -->
|
||||||
@@ -255,6 +255,7 @@
|
|||||||
<property name="recordsManagementService" ref="RecordsManagementService" />
|
<property name="recordsManagementService" ref="RecordsManagementService" />
|
||||||
<property name="recordsManagementActionService" ref="RecordsManagementActionService" />
|
<property name="recordsManagementActionService" ref="RecordsManagementActionService" />
|
||||||
<property name="dispositionService" ref="DispositionService" />
|
<property name="dispositionService" ref="DispositionService" />
|
||||||
|
<property name="contentService" ref="ContentService"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<!-- RM Role API-->
|
<!-- RM Role API-->
|
||||||
@@ -522,10 +523,10 @@
|
|||||||
<!-- REST impl for GET Audit Log -->
|
<!-- REST impl for GET Audit Log -->
|
||||||
<bean id="webscript.org.alfresco.rma.rmauditlog.get" class="org.alfresco.module.org_alfresco_module_rm.script.AuditLogGet" parent="webscript">
|
<bean id="webscript.org.alfresco.rma.rmauditlog.get" class="org.alfresco.module.org_alfresco_module_rm.script.AuditLogGet" parent="webscript">
|
||||||
<property name="nodeService" ref="nodeService"/>
|
<property name="nodeService" ref="nodeService"/>
|
||||||
<property name="contentService" ref="ContentService"/>
|
|
||||||
<property name="permissionService" ref="PermissionService"/>
|
<property name="permissionService" ref="PermissionService"/>
|
||||||
<property name="mimetypeService" ref="mimetypeService"/>
|
<property name="mimetypeService" ref="mimetypeService"/>
|
||||||
<property name="recordsManagementAuditService" ref="RecordsManagementAuditService"/>
|
<property name="recordsManagementAuditService" ref="RecordsManagementAuditService"/>
|
||||||
|
<property name="contentStreamer" ref="webscript.content.streamer" />
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<!-- REST impl for GET Class Definitions for RM/DM -->
|
<!-- REST impl for GET Class Definitions for RM/DM -->
|
||||||
|
@@ -23,6 +23,7 @@ import java.io.IOException;
|
|||||||
|
|
||||||
import org.springframework.extensions.webscripts.WebScriptRequest;
|
import org.springframework.extensions.webscripts.WebScriptRequest;
|
||||||
import org.springframework.extensions.webscripts.WebScriptResponse;
|
import org.springframework.extensions.webscripts.WebScriptResponse;
|
||||||
|
import org.alfresco.repo.web.scripts.content.ContentStreamer;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
|
||||||
@@ -39,6 +40,17 @@ public class AuditLogGet extends BaseAuditRetrievalWebScript
|
|||||||
|
|
||||||
protected final static String PARAM_EXPORT = "export";
|
protected final static String PARAM_EXPORT = "export";
|
||||||
|
|
||||||
|
/** Content Streamer */
|
||||||
|
protected ContentStreamer contentStreamer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param contentStreamer
|
||||||
|
*/
|
||||||
|
public void setContentStreamer(ContentStreamer contentStreamer)
|
||||||
|
{
|
||||||
|
this.contentStreamer = contentStreamer;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(WebScriptRequest req, WebScriptResponse res) throws IOException
|
public void execute(WebScriptRequest req, WebScriptResponse res) throws IOException
|
||||||
{
|
{
|
||||||
@@ -65,7 +77,7 @@ public class AuditLogGet extends BaseAuditRetrievalWebScript
|
|||||||
}
|
}
|
||||||
|
|
||||||
// stream the file back to the client
|
// stream the file back to the client
|
||||||
streamContent(req, res, auditTrail, attach, attachFileName);
|
contentStreamer.streamContent(req, res, auditTrail, null, attach, attachFileName, null);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
@@ -28,6 +28,7 @@ import org.alfresco.model.RenditionModel;
|
|||||||
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
||||||
import org.alfresco.module.org_alfresco_module_rm.model.behaviour.RecordsManagementSearchBehaviour;
|
import org.alfresco.module.org_alfresco_module_rm.model.behaviour.RecordsManagementSearchBehaviour;
|
||||||
import org.alfresco.repo.exporter.ACPExportPackageHandler;
|
import org.alfresco.repo.exporter.ACPExportPackageHandler;
|
||||||
|
import org.alfresco.repo.web.scripts.content.ContentStreamer;
|
||||||
import org.alfresco.repo.web.scripts.content.StreamACP;
|
import org.alfresco.repo.web.scripts.content.StreamACP;
|
||||||
import org.alfresco.service.cmr.repository.NodeRef;
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
import org.alfresco.service.cmr.view.ExporterCrawlerParameters;
|
import org.alfresco.service.cmr.view.ExporterCrawlerParameters;
|
||||||
@@ -56,6 +57,17 @@ public class ExportPost extends StreamACP
|
|||||||
|
|
||||||
protected static final String PARAM_TRANSFER_FORMAT = "transferFormat";
|
protected static final String PARAM_TRANSFER_FORMAT = "transferFormat";
|
||||||
|
|
||||||
|
/** Content Streamer */
|
||||||
|
private ContentStreamer contentStreamer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param contentStreamer
|
||||||
|
*/
|
||||||
|
public void setContentStreamer(ContentStreamer contentStreamer)
|
||||||
|
{
|
||||||
|
this.contentStreamer = contentStreamer;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.alfresco.web.scripts.WebScript#execute(org.alfresco.web.scripts.WebScriptRequest, org.alfresco.web.scripts.WebScriptResponse)
|
* @see org.alfresco.web.scripts.WebScript#execute(org.alfresco.web.scripts.WebScriptRequest, org.alfresco.web.scripts.WebScriptResponse)
|
||||||
*/
|
*/
|
||||||
@@ -117,7 +129,7 @@ public class ExportPost extends StreamACP
|
|||||||
transferFormat);
|
transferFormat);
|
||||||
|
|
||||||
// stream the ACP back to the client as an attachment (forcing save as)
|
// stream the ACP back to the client as an attachment (forcing save as)
|
||||||
streamContent(req, res, tempACPFile, true, tempACPFile.getName());
|
contentStreamer.streamContent(req, res, tempACPFile, null, true, tempACPFile.getName(), null);
|
||||||
}
|
}
|
||||||
catch (IOException ioe)
|
catch (IOException ioe)
|
||||||
{
|
{
|
||||||
|
@@ -25,6 +25,7 @@ import org.alfresco.model.ContentModel;
|
|||||||
import org.alfresco.model.RenditionModel;
|
import org.alfresco.model.RenditionModel;
|
||||||
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
||||||
import org.alfresco.module.org_alfresco_module_rm.model.behaviour.RecordsManagementSearchBehaviour;
|
import org.alfresco.module.org_alfresco_module_rm.model.behaviour.RecordsManagementSearchBehaviour;
|
||||||
|
import org.alfresco.repo.web.scripts.content.ContentStreamer;
|
||||||
import org.alfresco.service.cmr.repository.NodeRef;
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
import org.alfresco.service.cmr.view.ExporterCrawlerParameters;
|
import org.alfresco.service.cmr.view.ExporterCrawlerParameters;
|
||||||
import org.alfresco.service.cmr.view.Location;
|
import org.alfresco.service.cmr.view.Location;
|
||||||
@@ -47,6 +48,17 @@ public class TransferGet extends BaseTransferWebScript
|
|||||||
/** Logger */
|
/** Logger */
|
||||||
private static Log logger = LogFactory.getLog(TransferGet.class);
|
private static Log logger = LogFactory.getLog(TransferGet.class);
|
||||||
|
|
||||||
|
/** Content Streamer */
|
||||||
|
private ContentStreamer contentStreamer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param contentStreamer
|
||||||
|
*/
|
||||||
|
public void setContentStreamer(ContentStreamer contentStreamer)
|
||||||
|
{
|
||||||
|
this.contentStreamer = contentStreamer;
|
||||||
|
}
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
@Override
|
@Override
|
||||||
protected File executeTransfer(NodeRef transferNode,
|
protected File executeTransfer(NodeRef transferNode,
|
||||||
@@ -78,7 +90,7 @@ public class TransferGet extends BaseTransferWebScript
|
|||||||
}
|
}
|
||||||
|
|
||||||
// stream the archive back to the client as an attachment (forcing save as)
|
// stream the archive back to the client as an attachment (forcing save as)
|
||||||
streamContent(req, res, tempFile, true, tempFile.getName());
|
contentStreamer.streamContent(req, res, tempFile, null, true, tempFile.getName(), null);
|
||||||
|
|
||||||
// return the temp file for deletion
|
// return the temp file for deletion
|
||||||
return tempFile;
|
return tempFile;
|
||||||
|
@@ -31,6 +31,7 @@ import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionSchedul
|
|||||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionService;
|
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionService;
|
||||||
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
||||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||||
|
import org.alfresco.repo.web.scripts.content.ContentStreamer;
|
||||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||||
import org.alfresco.service.cmr.repository.NodeRef;
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
@@ -60,6 +61,7 @@ public class TransferReportGet extends BaseTransferWebScript
|
|||||||
protected DictionaryService ddService;
|
protected DictionaryService ddService;
|
||||||
protected RecordsManagementService rmService;
|
protected RecordsManagementService rmService;
|
||||||
protected DispositionService dispositionService;
|
protected DispositionService dispositionService;
|
||||||
|
protected ContentStreamer contentStreamer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the DictionaryService instance
|
* Sets the DictionaryService instance
|
||||||
@@ -91,6 +93,14 @@ public class TransferReportGet extends BaseTransferWebScript
|
|||||||
this.rmService = rmService;
|
this.rmService = rmService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param contentStreamer
|
||||||
|
*/
|
||||||
|
public void setContentStreamer(ContentStreamer contentStreamer)
|
||||||
|
{
|
||||||
|
this.contentStreamer = contentStreamer;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected File executeTransfer(NodeRef transferNode,
|
protected File executeTransfer(NodeRef transferNode,
|
||||||
WebScriptRequest req, WebScriptResponse res,
|
WebScriptRequest req, WebScriptResponse res,
|
||||||
@@ -100,7 +110,7 @@ public class TransferReportGet extends BaseTransferWebScript
|
|||||||
File report = generateJSONTransferReport(transferNode);
|
File report = generateJSONTransferReport(transferNode);
|
||||||
|
|
||||||
// stream the report back to the client
|
// stream the report back to the client
|
||||||
streamContent(req, res, report, false);
|
contentStreamer.streamContent(req, res, report, null, false, null, null);
|
||||||
|
|
||||||
// return the file for deletion
|
// return the file for deletion
|
||||||
return report;
|
return report;
|
||||||
|
@@ -39,6 +39,7 @@ import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
|||||||
import org.alfresco.repo.content.MimetypeMap;
|
import org.alfresco.repo.content.MimetypeMap;
|
||||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||||
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.ContentWriter;
|
import org.alfresco.service.cmr.repository.ContentWriter;
|
||||||
import org.alfresco.service.cmr.repository.NodeRef;
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
import org.alfresco.service.namespace.NamespaceService;
|
import org.alfresco.service.namespace.NamespaceService;
|
||||||
@@ -78,6 +79,7 @@ public class TransferReportPost extends BaseTransferWebScript
|
|||||||
protected RecordsManagementActionService rmActionService;
|
protected RecordsManagementActionService rmActionService;
|
||||||
protected RecordsManagementService rmService;
|
protected RecordsManagementService rmService;
|
||||||
protected DispositionService dispositionService;
|
protected DispositionService dispositionService;
|
||||||
|
protected ContentService contentService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the DictionaryService instance
|
* Sets the DictionaryService instance
|
||||||
@@ -119,6 +121,16 @@ public class TransferReportPost extends BaseTransferWebScript
|
|||||||
this.rmActionService = rmActionService;
|
this.rmActionService = rmActionService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the ContentSerivce instance
|
||||||
|
*
|
||||||
|
* @param contentService ContentService instance
|
||||||
|
*/
|
||||||
|
public void setContentService(ContentService contentService)
|
||||||
|
{
|
||||||
|
this.contentService = contentService;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected File executeTransfer(NodeRef transferNode,
|
protected File executeTransfer(NodeRef transferNode,
|
||||||
WebScriptRequest req, WebScriptResponse res,
|
WebScriptRequest req, WebScriptResponse res,
|
||||||
@@ -436,7 +448,7 @@ public class TransferReportPost extends BaseTransferWebScript
|
|||||||
ContentModel.TYPE_CONTENT, properties).getChildRef();
|
ContentModel.TYPE_CONTENT, properties).getChildRef();
|
||||||
|
|
||||||
// Set the content
|
// Set the content
|
||||||
ContentWriter writer = this.contentService.getWriter(record, ContentModel.PROP_CONTENT, true);
|
ContentWriter writer = contentService.getWriter(record, ContentModel.PROP_CONTENT, true);
|
||||||
writer.setMimetype(MimetypeMap.MIMETYPE_HTML);
|
writer.setMimetype(MimetypeMap.MIMETYPE_HTML);
|
||||||
writer.setEncoding("UTF-8");
|
writer.setEncoding("UTF-8");
|
||||||
writer.putContent(report);
|
writer.putContent(report);
|
||||||
|
Reference in New Issue
Block a user