mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
RM-1099 (Refactor Transfer and Accession reports)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@58333 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -183,36 +183,53 @@
|
||||
</view:associations>
|
||||
</cm:folder>
|
||||
|
||||
<cm:folder view:childName="cm:rm_report_templates">
|
||||
<view:properties>
|
||||
<sys:store-protocol>workspace</sys:store-protocol>
|
||||
<sys:store-identifier>SpacesStore</sys:store-identifier>
|
||||
<sys:node-uuid>rm_report_templates</sys:node-uuid>
|
||||
<cm:name>Records Management Report Templates</cm:name>
|
||||
<cm:title>Records Management Report Templates</cm:title>
|
||||
<cm:description>Records management report templates.</cm:description>
|
||||
</view:properties>
|
||||
<view:associations>
|
||||
<cm:contains>
|
||||
<cm:content view:childName="cm:report_rmr_destructionReport.html.ftl">
|
||||
<view:aspects>
|
||||
<cm:titled></cm:titled>
|
||||
<cm:author></cm:author>
|
||||
</view:aspects>
|
||||
<view:properties>
|
||||
<sys:store-protocol>workspace</sys:store-protocol>
|
||||
<sys:store-identifier>SpacesStore</sys:store-identifier>
|
||||
<sys:node-uuid>rmr_destructionReport</sys:node-uuid>
|
||||
<cm:description>Desruction report template.</cm:description>
|
||||
<cm:content>contentUrl=classpath:alfresco/module/org_alfresco_module_rm/bootstrap/report/report_rmr_destructionReport.html.ftl|mimetype=text/plain|encoding=UTF-8</cm:content>
|
||||
<cm:title>Destruction Report Template</cm:title>
|
||||
<cm:name>report_rmr_destructionReport.html.ftl</cm:name>
|
||||
</view:properties>
|
||||
</cm:content>
|
||||
</cm:contains>
|
||||
</view:associations>
|
||||
</cm:folder>
|
||||
</cm:contains>
|
||||
<cm:folder view:childName="cm:rm_report_templates">
|
||||
<view:properties>
|
||||
<sys:store-protocol>workspace</sys:store-protocol>
|
||||
<sys:store-identifier>SpacesStore</sys:store-identifier>
|
||||
<sys:node-uuid>rm_report_templates</sys:node-uuid>
|
||||
<cm:name>Records Management Report Templates</cm:name>
|
||||
<cm:title>Records Management Report Templates</cm:title>
|
||||
<cm:description>Records management report templates.</cm:description>
|
||||
</view:properties>
|
||||
<view:associations>
|
||||
<cm:contains>
|
||||
<cm:content view:childName="cm:report_rmr_destructionReport.html.ftl">
|
||||
<view:aspects>
|
||||
<cm:titled></cm:titled>
|
||||
<cm:author></cm:author>
|
||||
</view:aspects>
|
||||
<view:properties>
|
||||
<sys:store-protocol>workspace</sys:store-protocol>
|
||||
<sys:store-identifier>SpacesStore</sys:store-identifier>
|
||||
<sys:node-uuid>rmr_destructionReport</sys:node-uuid>
|
||||
<cm:description>Desruction report template.</cm:description>
|
||||
<cm:content>contentUrl=classpath:alfresco/module/org_alfresco_module_rm/bootstrap/report/report_rmr_destructionReport.html.ftl|mimetype=text/plain|encoding=UTF-8</cm:content>
|
||||
<cm:title>Destruction Report Template</cm:title>
|
||||
<cm:name>report_rmr_destructionReport.html.ftl</cm:name>
|
||||
</view:properties>
|
||||
</cm:content>
|
||||
</cm:contains>
|
||||
<cm:contains>
|
||||
<cm:content view:childName="cm:report_rmr_transferReport.html.ftl">
|
||||
<view:aspects>
|
||||
<cm:titled></cm:titled>
|
||||
<cm:author></cm:author>
|
||||
</view:aspects>
|
||||
<view:properties>
|
||||
<sys:store-protocol>workspace</sys:store-protocol>
|
||||
<sys:store-identifier>SpacesStore</sys:store-identifier>
|
||||
<sys:node-uuid>rmr_transferReport</sys:node-uuid>
|
||||
<cm:description>Transfer report template.</cm:description>
|
||||
<cm:content>contentUrl=classpath:alfresco/module/org_alfresco_module_rm/bootstrap/report/report_rmr_transferReport.html.ftl|mimetype=text/plain|encoding=UTF-8</cm:content>
|
||||
<cm:title>Transfer Report Template</cm:title>
|
||||
<cm:name>report_rmr_transfer.html.ftl</cm:name>
|
||||
</view:properties>
|
||||
</cm:content>
|
||||
</cm:contains>
|
||||
</view:associations>
|
||||
</cm:folder>
|
||||
</cm:contains>
|
||||
</view:associations>
|
||||
|
||||
</cm:folder>
|
||||
|
@@ -14,7 +14,6 @@
|
||||
}
|
||||
--></style>
|
||||
</head>
|
||||
|
||||
<body bgcolor="#dddddd">
|
||||
<table width="100%" cellpadding="20" cellspacing="0" border="0" bgcolor="#dddddd">
|
||||
<tr>
|
||||
@@ -35,6 +34,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<div style="font-size: 22px; padding-bottom: 4px;">
|
||||
<#-- FIXME!!! -->
|
||||
Destruction Report
|
||||
</div>
|
||||
</td>
|
||||
@@ -43,61 +43,54 @@
|
||||
<div style="font-size: 14px; margin: 12px 0px 24px 0px; padding-top: 10px; border-top: 1px solid #aaaaaa;">
|
||||
<table cellpadding="2" cellspacing="3" border="0">
|
||||
<tr>
|
||||
<#-- FIXME!!! -->
|
||||
<td><i>Destroyed <#if node.hasAspect("rma:record")>Record<#else>Record Folder</#if>:</i></td>
|
||||
<td>${node.properties["rma:identifier"]} <b>${node.properties.name}</b></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<#-- FIXME!!! -->
|
||||
<td><i>Disposition Authority:</i></td>
|
||||
<td>${node.properties["rma:recordSearchDispositionAuthority"]}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<#-- FIXME!!! -->
|
||||
<td><i>Disposition Instructions:</i></td>
|
||||
<td>${node.properties["rma:recordSearchDispositionInstructions"]}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<#if node.childAssociations["cm:contains"]??>
|
||||
|
||||
<div style="font-size: 14px; margin: 12px 0px 24px 0px; padding-top: 10px; border-top: 1px solid #aaaaaa;">
|
||||
|
||||
<table cellpadding="2" cellspacing="3" border="0">
|
||||
<tr>
|
||||
<#-- FIXME!!! -->
|
||||
<td><i>Destroyed Records:</i></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</table>
|
||||
<table cellpadding="0" callspacing="0" border="0" bgcolor="#eeeeee" style="padding:10px; border: 1px solid #aaaaaa;">
|
||||
<tr>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
|
||||
<#list node.childAssociations["cm:contains"] as child>
|
||||
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<img src="${url}/${child.icon32}" alt="" width="32" height="32" border="0" style="padding-right: 10px;" />
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>${child.properties["rma:identifier"]} <b>${child.properties.name}</b></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<#list node.childAssociations["cm:contains"] as child>
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<img src="${url}/${child.icon32}" alt="" width="32" height="32" border="0" style="padding-right: 10px;" />
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>${child.properties["rma:identifier"]} <b>${child.properties.name}</b></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</#list>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</#if>
|
||||
|
||||
<div style="font-size: 14px; margin: 12px 0px 24px 0px; padding-top: 10px; border-top: 1px solid #aaaaaa;">
|
||||
|
||||
</#if>
|
||||
<div style="font-size: 14px; margin: 12px 0px 24px 0px; padding-top: 10px; border-top: 1px solid #aaaaaa;">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
@@ -0,0 +1,72 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<#assign isAccession=node.property["rma:transferAccessionIndicator"]>
|
||||
<head>
|
||||
<#if isAccession>
|
||||
<#-- FIXME: Label -->
|
||||
<title>Transfer Report</title>
|
||||
<#else>
|
||||
<#-- FIXME: Label -->
|
||||
<title>Transfer Report</title>
|
||||
</#if>
|
||||
<style>
|
||||
body { font-family: arial,verdana; font-size: 81%; color: #333; }
|
||||
.records { margin-left: 20px; margin-top: 10px; }
|
||||
.record { padding: 5px; }
|
||||
.label { color: #111; }
|
||||
.nodeName { font-weight: bold; }
|
||||
.transferred-item { background-color: #eee; padding: 10px; margin-bottom: 15px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<#if isAccession>
|
||||
<#-- FIXME: Label -->
|
||||
<h1>Accession Report</h1>
|
||||
<#else>
|
||||
<#-- FIXME: Label -->
|
||||
<h1>Transfer Report</h1>
|
||||
</#if>
|
||||
<table cellpadding="3" cellspacing="3">
|
||||
<tr>
|
||||
<#-- FIXME: Label -->
|
||||
<td class="label">Transfer Date:</td>
|
||||
<#-- FIXME: Escape, toString -->
|
||||
<td>${node.property["cm:created"]}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<#-- FIXME: Label -->
|
||||
<td class="label">Transfer Location:</td>
|
||||
<td>
|
||||
<#if isAccession>
|
||||
<#-- FIXME: Label -->
|
||||
NARA
|
||||
<#else>
|
||||
<#-- FIXME: String, Escape -->
|
||||
${node.property["rma:transferLocation"]}
|
||||
</#if>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<#-- FIXME: Label -->
|
||||
<td class="label">Performed By:</td>
|
||||
<#-- FIXME: String, Escape -->
|
||||
<td> ${node.property["cm:creator"]}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<#-- FIXME: Label -->
|
||||
<td class="label">Disposition Authority:</td>
|
||||
<#-- FIXME: Disposition Authority - Check, escape -->
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<#-- FIXME: Label -->
|
||||
<h2>Transferred Items</h2>
|
||||
<div class="transferred-item">
|
||||
<#--
|
||||
<span class="nodeName">folder</span> (Unique Folder Identifier: 2013-1385393610833)
|
||||
<div class="records">
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -1,2 +1,2 @@
|
||||
report.rmr_destructionReport.name=Destruction Report (${node.rma:identifier} ${node.cm:name}).html
|
||||
|
||||
report.rmr_transferReport.name=Transfer Report (${node.rma:identifier} ${node.cm:name}).html
|
@@ -5,42 +5,43 @@
|
||||
<!-- Note: the rma: namespace is defined further on in the document -->
|
||||
<model name="rmr:recordsmanagementreport" xmlns="http://www.alfresco.org/model/dictionary/1.0">
|
||||
|
||||
<!-- Meta-data about the model -->
|
||||
<description>Records Management Report Model</description>
|
||||
<author>Roy Wetherall</author>
|
||||
<version>1.0</version>
|
||||
<!-- Meta-data about the model -->
|
||||
<description>Records Management Report Model</description>
|
||||
<author>Roy Wetherall</author>
|
||||
<version>1.0</version>
|
||||
|
||||
<!-- Imports are required to allow references to definitions in other models -->
|
||||
<imports>
|
||||
<!-- Import Alfresco Dictionary Definitions -->
|
||||
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
|
||||
<!-- Import Alfresco Content Domain Model Definitions -->
|
||||
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
|
||||
<!-- Import Alfresco Content Domain Model Definitions -->
|
||||
<import uri="http://www.alfresco.org/model/system/1.0" prefix="sys" />
|
||||
<!-- Import Alfresco Site Model Definitions -->
|
||||
<import uri="http://www.alfresco.org/model/site/1.0" prefix="st"/>
|
||||
<!-- Import Alfresco RM Model Definitions -->
|
||||
<import uri="http://www.alfresco.org/model/recordsmanagement/1.0" prefix="rma"/>
|
||||
</imports>
|
||||
<!-- Imports are required to allow references to definitions in other models -->
|
||||
<imports>
|
||||
<!-- Import Alfresco Dictionary Definitions -->
|
||||
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
|
||||
<!-- Import Alfresco Content Domain Model Definitions -->
|
||||
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
|
||||
<!-- Import Alfresco Content Domain Model Definitions -->
|
||||
<import uri="http://www.alfresco.org/model/system/1.0" prefix="sys" />
|
||||
<!-- Import Alfresco Site Model Definitions -->
|
||||
<import uri="http://www.alfresco.org/model/site/1.0" prefix="st"/>
|
||||
<!-- Import Alfresco RM Model Definitions -->
|
||||
<import uri="http://www.alfresco.org/model/recordsmanagement/1.0" prefix="rma"/>
|
||||
</imports>
|
||||
|
||||
<!-- Report Namespace -->
|
||||
<namespaces>
|
||||
<namespace uri="http://www.alfresco.org/model/recordsmanagementreport/1.0" prefix="rmr"/>
|
||||
</namespaces>
|
||||
<!-- Report Namespace -->
|
||||
<namespaces>
|
||||
<namespace uri="http://www.alfresco.org/model/recordsmanagementreport/1.0" prefix="rmr"/>
|
||||
</namespaces>
|
||||
|
||||
<types>
|
||||
|
||||
<type name="rmr:report">
|
||||
<title>Report</title>
|
||||
<parent>cm:content</parent>
|
||||
</type>
|
||||
|
||||
<type name="rmr:destructionReport">
|
||||
<title>Report</title>
|
||||
<parent>rmr:report</parent>
|
||||
</type>
|
||||
|
||||
</types>
|
||||
<types>
|
||||
<type name="rmr:report">
|
||||
<title>Report</title>
|
||||
<parent>cm:content</parent>
|
||||
</type>
|
||||
<type name="rmr:destructionReport">
|
||||
<title>Report</title>
|
||||
<parent>rmr:report</parent>
|
||||
</type>
|
||||
<type name="rmr:transferReport">
|
||||
<title>Transfer</title>
|
||||
<parent>rmr:report</parent>
|
||||
</type>
|
||||
</types>
|
||||
|
||||
</model>
|
@@ -3,9 +3,9 @@
|
||||
|
||||
<beans>
|
||||
|
||||
<!-- Report Content Model -->
|
||||
<!-- Report Content Model -->
|
||||
|
||||
<bean id="org_alfresco_module_rm_report_dictionaryBootstrap" parent="dictionaryModelBootstrap">
|
||||
<bean id="org_alfresco_module_rm_report_dictionaryBootstrap" parent="dictionaryModelBootstrap">
|
||||
<property name="models">
|
||||
<list>
|
||||
<value>alfresco/module/org_alfresco_module_rm/model/reportModel.xml</value>
|
||||
@@ -16,78 +16,82 @@
|
||||
<value>alfresco/module/org_alfresco_module_rm/messages/report-model</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Report Service Message Bundle -->
|
||||
|
||||
<bean id="org_alfresco_module_rm_report_resourceBundles" class="org.alfresco.i18n.ResourceBundleBootstrapComponent">
|
||||
<property name="resourceBundles">
|
||||
<list>
|
||||
<value>alfresco.module.org_alfresco_module_rm.messages.report-service</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Report Service -->
|
||||
<!-- Report Service Message Bundle -->
|
||||
|
||||
<bean id="reportService" parent="baseService" class="org.alfresco.module.org_alfresco_module_rm.report.ReportServiceImpl">
|
||||
<property name="fileFolderService" ref="FileFolderService" />
|
||||
<property name="filePlanService" ref="FilePlanService" />
|
||||
<property name="contentService" ref="ContentService" />
|
||||
<property name="recordService" ref="RecordService" />
|
||||
</bean>
|
||||
<bean id="org_alfresco_module_rm_report_resourceBundles" class="org.alfresco.i18n.ResourceBundleBootstrapComponent">
|
||||
<property name="resourceBundles">
|
||||
<list>
|
||||
<value>alfresco.module.org_alfresco_module_rm.messages.report-service</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="ReportService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||
<property name="proxyInterfaces" value="org.alfresco.module.org_alfresco_module_rm.report.ReportService" />
|
||||
<property name="target" ref="reportService"/>
|
||||
<property name="interceptorNames">
|
||||
<list>
|
||||
<idref local="ReportService_transaction"/>
|
||||
<idref bean="exceptionTranslator"/>
|
||||
<idref local="ReportService_security"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
<!-- Report Service -->
|
||||
|
||||
<bean id="ReportService_transaction" parent="baseTransaction"/>
|
||||
<bean id="reportService" parent="baseService" class="org.alfresco.module.org_alfresco_module_rm.report.ReportServiceImpl">
|
||||
<property name="fileFolderService" ref="FileFolderService" />
|
||||
<property name="filePlanService" ref="FilePlanService" />
|
||||
<property name="contentService" ref="ContentService" />
|
||||
<property name="recordService" ref="RecordService" />
|
||||
</bean>
|
||||
|
||||
<bean id="ReportService_security" parent="baseSecurity">
|
||||
<property name="objectDefinitionSource">
|
||||
<value>
|
||||
<![CDATA[
|
||||
org.alfresco.module.org_alfresco_module_rm.report.ReportService.getReportTypes=RM_ALLOW
|
||||
org.alfresco.module.org_alfresco_module_rm.report.ReportService.registerReportGenerator=RM_ALLOW
|
||||
org.alfresco.module.org_alfresco_module_rm.report.ReportService.generateReport=RM_ALLOW
|
||||
org.alfresco.module.org_alfresco_module_rm.report.ReportService.fileReport=RM_ALLOW
|
||||
org.alfresco.module.org_alfresco_module_rm.report.ReportService.*=RM_DENY
|
||||
]]>
|
||||
</value>
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="ReportService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||
<property name="proxyInterfaces" value="org.alfresco.module.org_alfresco_module_rm.report.ReportService" />
|
||||
<property name="target" ref="reportService"/>
|
||||
<property name="interceptorNames">
|
||||
<list>
|
||||
<idref local="ReportService_transaction"/>
|
||||
<idref bean="exceptionTranslator"/>
|
||||
<idref local="ReportService_security"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Report Generators -->
|
||||
<bean id="ReportService_transaction" parent="baseTransaction"/>
|
||||
|
||||
<bean id="baseReportGenerator" abstract="true" init-method="init">
|
||||
<property name="reportService" ref="reportService" />
|
||||
<property name="namespaceService" ref="namespaceService"/>
|
||||
</bean>
|
||||
<bean id="ReportService_security" parent="baseSecurity">
|
||||
<property name="objectDefinitionSource">
|
||||
<value>
|
||||
<![CDATA[
|
||||
org.alfresco.module.org_alfresco_module_rm.report.ReportService.getReportTypes=RM_ALLOW
|
||||
org.alfresco.module.org_alfresco_module_rm.report.ReportService.registerReportGenerator=RM_ALLOW
|
||||
org.alfresco.module.org_alfresco_module_rm.report.ReportService.generateReport=RM_ALLOW
|
||||
org.alfresco.module.org_alfresco_module_rm.report.ReportService.fileReport=RM_ALLOW
|
||||
org.alfresco.module.org_alfresco_module_rm.report.ReportService.*=RM_DENY
|
||||
]]>
|
||||
</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="declarativeReportGenerator" abstract="true" parent="baseReportGenerator" class="org.alfresco.module.org_alfresco_module_rm.report.generator.DeclarativeReportGenerator">
|
||||
<property name="contentService" ref="ContentService"/>
|
||||
<property name="mimetypeService" ref="MimetypeService"/>
|
||||
<property name="fileFolderService" ref="FileFolderService"/>
|
||||
<property name="templateService" ref="TemplateService"/>
|
||||
<property name="nodeService" ref="NodeService" />
|
||||
<property name="parameterProcessorComponent" ref="parameterProcessorComponent"/>
|
||||
<property name="repository" ref="repositoryHelper" />
|
||||
<property name="sysAdminParams" ref="sysAdminParams" />
|
||||
</bean>
|
||||
<!-- Report Generators -->
|
||||
|
||||
<bean id="destructionReportGenerator" parent="declarativeReportGenerator">
|
||||
<property name="reportTypeName" value="rmr:destructionReport" />
|
||||
</bean>
|
||||
<bean id="baseReportGenerator" abstract="true" init-method="init">
|
||||
<property name="reportService" ref="reportService" />
|
||||
<property name="namespaceService" ref="namespaceService"/>
|
||||
</bean>
|
||||
|
||||
<!-- Report Actions -->
|
||||
<bean id="declarativeReportGenerator" abstract="true" parent="baseReportGenerator" class="org.alfresco.module.org_alfresco_module_rm.report.generator.DeclarativeReportGenerator">
|
||||
<property name="contentService" ref="ContentService"/>
|
||||
<property name="mimetypeService" ref="MimetypeService"/>
|
||||
<property name="fileFolderService" ref="FileFolderService"/>
|
||||
<property name="templateService" ref="TemplateService"/>
|
||||
<property name="nodeService" ref="NodeService" />
|
||||
<property name="parameterProcessorComponent" ref="parameterProcessorComponent"/>
|
||||
<property name="repository" ref="repositoryHelper" />
|
||||
<property name="sysAdminParams" ref="sysAdminParams" />
|
||||
</bean>
|
||||
|
||||
<bean id="destructionReportGenerator" parent="declarativeReportGenerator">
|
||||
<property name="reportTypeName" value="rmr:destructionReport" />
|
||||
</bean>
|
||||
|
||||
<bean id="transferReportGenerator" parent="declarativeReportGenerator">
|
||||
<property name="reportTypeName" value="rmr:transferReport" />
|
||||
</bean>
|
||||
|
||||
<!-- Report Actions -->
|
||||
|
||||
<bean id="fileDestructionReport_proxy" parent="rmProxyAction" >
|
||||
<property name="target">
|
||||
@@ -118,4 +122,35 @@
|
||||
<property name="reportType" value="rmr:destructionReport" />
|
||||
</bean>
|
||||
|
||||
<bean id="fileTransferReport_proxy" parent="rmProxyAction" >
|
||||
<property name="target">
|
||||
<ref bean="fileTransferReport"/>
|
||||
</property>
|
||||
<property name="interceptorNames">
|
||||
<list>
|
||||
<idref bean="fileTransferReport_security"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="fileTransferReport_security" class="org.alfresco.repo.security.permissions.impl.acegi.MethodSecurityInterceptor" parent="actionSecurity">
|
||||
<property name="objectDefinitionSource">
|
||||
<value>
|
||||
<!-- FIXME -->
|
||||
<!-- org.alfresco.module.org_alfresco_module_rm.action.RecordsManagementAction.execute=RM_CAP.0.rma:filePlanComponent.FileDestructionReport -->
|
||||
org.alfresco.module.org_alfresco_module_rm.action.RecordsManagementAction.execute=RM_ALLOW
|
||||
org.alfresco.module.org_alfresco_module_rm.action.RecordsManagementAction.*=RM_ALLOW
|
||||
org.alfresco.repo.action.executer.ActionExecuter.*=RM_ALLOW
|
||||
</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="fileTransferReport"
|
||||
class="org.alfresco.module.org_alfresco_module_rm.report.action.FileTransferAction"
|
||||
parent="rmAction">
|
||||
<property name="reportService" ref="ReportService" />
|
||||
<property name="filePlanService" ref="FilePlanService" />
|
||||
<property name="reportType" value="rmr:transferReport" />
|
||||
</bean>
|
||||
|
||||
</beans>
|
@@ -27,10 +27,11 @@ import org.alfresco.service.namespace.QName;
|
||||
*/
|
||||
public interface ReportModel
|
||||
{
|
||||
// Namespace details
|
||||
public static final String RMR_URI = "http://www.alfresco.org/model/recordsmanagementreport/1.0";
|
||||
public static final String RMR_PREFIX = "rmr";
|
||||
// Namespace details
|
||||
public static final String RMR_URI = "http://www.alfresco.org/model/recordsmanagementreport/1.0";
|
||||
public static final String RMR_PREFIX = "rmr";
|
||||
|
||||
public static final QName TYPE_REPORT = QName.createQName(RMR_URI, "report");
|
||||
public static final QName TYPE_DESTRUCTION_REPORT = QName.createQName(RMR_URI, "destructionReport");
|
||||
public static final QName TYPE_REPORT = QName.createQName(RMR_URI, "report");
|
||||
public static final QName TYPE_DESTRUCTION_REPORT = QName.createQName(RMR_URI, "destructionReport");
|
||||
public static final QName TYPE_TRANSFER_REPORT = QName.createQName(RMR_URI, "transferReport");
|
||||
}
|
||||
|
@@ -0,0 +1,102 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2013 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.alfresco.module.org_alfresco_module_rm.report.action;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
|
||||
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.report.Report;
|
||||
import org.alfresco.module.org_alfresco_module_rm.report.ReportModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.report.ReportService;
|
||||
import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.util.ParameterCheck;
|
||||
|
||||
/**
|
||||
* FIXME!!!
|
||||
*
|
||||
* @author Tuna Aksoy
|
||||
* @since 2.2
|
||||
*/
|
||||
public class FileTransferAction extends RMActionExecuterAbstractBase implements ReportModel
|
||||
{
|
||||
/** report service */
|
||||
protected ReportService reportService;
|
||||
|
||||
/** file plan service */
|
||||
protected FilePlanService filePlanService;
|
||||
|
||||
/** report type string value */
|
||||
private String reportType;
|
||||
|
||||
/**
|
||||
* @param reportService report service
|
||||
*/
|
||||
public void setReportService(ReportService reportService)
|
||||
{
|
||||
this.reportService = reportService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param filePlanService file plan service
|
||||
*/
|
||||
public void setFilePlanService(FilePlanService filePlanService)
|
||||
{
|
||||
this.filePlanService = filePlanService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param reportType report type string value
|
||||
*/
|
||||
public void setReportType(String reportType)
|
||||
{
|
||||
this.reportType = reportType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return QName report type
|
||||
*/
|
||||
protected QName getReportType()
|
||||
{
|
||||
ParameterCheck.mandatory("this.reportType", reportType);
|
||||
return QName.createQName(reportType, namespaceService);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
// TODO check that the actionedUponNodeRef is in a state to generate a destruction report
|
||||
// ie: is it eligable for destruction .. use fileDestructionReport capability!
|
||||
|
||||
// TODO allow the mimetype of the report to be specified as a parameter
|
||||
|
||||
NodeRef filePlan = filePlanService.getFilePlan(actionedUponNodeRef);
|
||||
if (filePlan == null)
|
||||
{
|
||||
throw new AlfrescoRuntimeException("Unable to file destruction report, because file plan could not be resolved.");
|
||||
}
|
||||
|
||||
Report report = reportService.generateReport(getReportType(), actionedUponNodeRef);
|
||||
reportService.fileReport(filePlan, report);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user