RM-1211: Generate hold report

* FileHoldReport capability added (and patched)
 * hold report type added to report model
 * hold template added, bootstraped (and patched)
 * UI action to file hold report added and sensitive to capability
 * report actions refactored into a single, general purpose, file report action (can be exposed as rule in future)
 * refactoring and extending of report generators (including declarative report generator)
 * unit test for file report action
 * integration test for hold report generation
 * added Sprin custom property editor registrar and registered QName property editor, this allows short name string forms of
   QNames to be specified and converted to QName from bean definitions (perhaps something useful for core)



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@68235 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Roy Wetherall
2014-04-29 07:21:54 +00:00
parent 706dc33384
commit fde0de1010
53 changed files with 1575 additions and 428 deletions

View File

@@ -227,6 +227,23 @@
</view:properties>
</cm:content>
</cm:contains>
<cm:contains>
<cm:content view:childName="cm:report_rmr_holdReport.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_holdReport</sys:node-uuid>
<cm:description>Hold report template.</cm:description>
<cm:content>contentUrl=classpath:alfresco/module/org_alfresco_module_rm/bootstrap/report/report_rmr_holdReport.html.ftl|mimetype=text/plain|encoding=UTF-8</cm:content>
<cm:title>Hold Report Template</cm:title>
<cm:name>report_rmr_holdReport.html.ftl</cm:name>
</view:properties>
</cm:content>
</cm:contains>
</view:associations>
</cm:folder>
</cm:contains>

View File

@@ -0,0 +1,112 @@
<html>
<head>
<style type="text/css"><!--
body
{
font-family: Arial, sans-serif;
font-size: 14px;
color: #4c4c4c;
}
a, a:visited
{
color: #0072cf;
}
--></style>
</head>
<body bgcolor="#dddddd">
<table width="100%" cellpadding="20" cellspacing="0" border="0" bgcolor="#dddddd">
<tr>
<td width="100%" align="center">
<table width="70%" cellpadding="0" cellspacing="0" bgcolor="white" style="background-color: white; border: 1px solid #aaaaaa;">
<tr>
<td width="100%">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td style="padding: 10px 30px 0px;">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<img src="${shareUrl}/res/components/images/task-64.png" alt="" width="64" height="64" border="0" style="padding-right: 20px;" />
</td>
<td>
<div style="font-size: 22px; padding-bottom: 4px;">
${message("file.report.hold.report")}
</div>
</td>
</tr>
</table>
<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>
<td><i>${message("file.report.hold.name")}:</i></td>
<td>${node.properties["cm:name"]}</td>
</tr>
<tr>
<td><i>${message("file.report.hold.description")}:</i></td>
<td>
<#if node.properties["cm:description"]??>
${node.properties["cm:description"]}
</#if>
</td>
</tr>
<tr>
<td><i>${message("file.report.hold.reason")}:</i></td>
<td>${node.properties["rma:holdReason"]}</td>
</tr>
</table>
<#if node.childAssociations["rma:frozenRecords"]??>
<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>
<td><i>${message("file.report.hold.held")}:</i></td>
<td></td>
</tr>
</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["rma:frozenRecords"] 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>
</tr>
</table>
</#if>
<div style="font-size: 14px; margin: 12px 0px 24px 0px; padding-top: 10px; border-top: 1px solid #aaaaaa;">
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="padding: 10px 30px;">
<img src="${shareUrl}/themes/default/images/app-logo.png" alt="" width="117" height="48" border="0" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

View File

@@ -58,6 +58,7 @@
</div>
</body>
</html>
<#macro generateTransferFolderHTML transferNode>
<span class="nodeName">
${transferNode.properties["name"]?html}
@@ -69,6 +70,7 @@
</#list>
</div>
</#macro>
<#macro generateTransferRecordHTML transferNode>
<div class="record">
<span class="nodeName">

View File

@@ -113,4 +113,23 @@
<property name="group"><ref bean="holdControlsGroup"/></property>
<property name="index" value="60" />
</bean>
<!-- file hold report capability -->
<bean id="rmFileHoldReportCapability"
parent="declarativeCapability">
<property name="name" value="FileHoldReport" />
<property name="permission" value="FileHoldReport" /> <!-- Associated permission -->
<property name="kinds">
<list>
<value>HOLD</value> <!-- Only applies to holds -->
</list>
</property>
<property name="conditions">
<map>
<entry key="capabilityCondition.filling" value="true"/> <!-- Must have read and file permissions -->
</map>
</property>
<property name="group"><ref bean="holdControlsGroup"/></property> <!-- Part of the hold group of capabilities -->
<property name="index" value="80" />
</bean>
</beans>

View File

@@ -175,12 +175,9 @@ retain.description=Retain
# Add Record Types
addRecordTypes.title=Add record types
addRecordTypes.description=Adds the selected type(s) to the record
# Destruction report
destructionReport.title=Destruction report
destructionReport.description=Destruction report
# Transfer Report
transferReport.title=Transfer Report
transferReport.description=Transfer Report
# File report
fileReport.title=File report
fileReport.description=File report
# Action parameter constraints
rm-ac-is-kind-kinds.record_category=Record Category

View File

@@ -65,6 +65,7 @@ capability.ViewUpdateReasonsForFreeze.title=View Update Reasons for Freeze
capability.CreateHold.title=Create Hold
capability.AddToHold.title=Add to Hold
capability.RemoveFromHold.title=Remove from Hold
capability.FileHoldReport=File Hold Report
# Audit
capability.group.audit.title=Audit

View File

@@ -1,7 +1,13 @@
rmr_recordsmanagementreport.description=Records Management Report Content Model
rmr_recordsmanagementreport.type.rmr_report.title=Records Management Report
rmr_recordsmanagementreport.type.rmr_report.title=Report
rmr_recordsmanagementreport.type.rmr_report.description=Records management report.
rmr_recordsmanagementreport.type.rmr_destructionReport.title=Records Management Report
rmr_recordsmanagementreport.type.rmr_destructionReport.description=Records management destruction report.
rmr_recordsmanagementreport.type.rmr_destructionReport.title=Transfer Report
rmr_recordsmanagementreport.type.rmr_destructionReport.description=Records management transfer report.
rmr_recordsmanagementreport.type.rmr_destructionReport.title=Destruction Report
rmr_recordsmanagementreport.type.rmr_destructionReport.description=Records management destruction report.
rmr_recordsmanagementreport.type.rmr_holdReport.title=Hold Report
rmr_recordsmanagementreport.type.rmr_holdReport.description=Records management hold report.

View File

@@ -1,2 +1 @@
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
report.default=Report

View File

@@ -1,2 +1,2 @@
report.rmr_destructionReport.name=Bericht \u00fcber vernichtete Datens\u00e4tze (${node.rma:identifier} ${node.cm:name}).html
report.rmr_destructionReport.name=Bericht \u00fcber vernichtete Datens\u00e4tze (${node.rma:identifier} ${node.cm:name})

View File

@@ -1,2 +1,2 @@
report.rmr_destructionReport.name=Informe de destrucci\u00f3n (${node.rma:identifier} ${node.cm:name}).html
report.rmr_destructionReport.name=Informe de destrucci\u00f3n (${node.rma:identifier} ${node.cm:name})

View File

@@ -1,2 +1,2 @@
report.rmr_destructionReport.name=Rapport de destruction (${node.rma:identifier} ${node.cm:name}).html
report.rmr_destructionReport.name=Rapport de destruction (${node.rma:identifier} ${node.cm:name})

View File

@@ -1,2 +1,2 @@
report.rmr_destructionReport.name=Report di eliminazione permanente (${node.rma:identifier} ${node.cm:name}).html
report.rmr_destructionReport.name=Report di eliminazione permanente (${node.rma:identifier} ${node.cm:name})

View File

@@ -1,2 +1,2 @@
report.rmr_destructionReport.name=\u5ec3\u68c4\u30ec\u30dd\u30fc\u30c8(${node.rma:identifier} ${node.cm:name}).html
report.rmr_destructionReport.name=\u5ec3\u68c4\u30ec\u30dd\u30fc\u30c8(${node.rma:identifier} ${node.cm:name})

View File

@@ -1,2 +1,2 @@
report.rmr_destructionReport.name=Vernietingsrapport (${node.rma:identifier} ${node.cm:name}).html
report.rmr_destructionReport.name=Vernietingsrapport (${node.rma:identifier} ${node.cm:name})

View File

@@ -1,2 +1,2 @@
report.rmr_destructionReport.name=\u9500\u6bc1\u62a5\u544a (${node.rma:identifier} ${node.cm:name}).html
report.rmr_destructionReport.name=\u9500\u6bc1\u62a5\u544a (${node.rma:identifier} ${node.cm:name})

View File

@@ -17,4 +17,9 @@ file.report.performed.by=Performed By
file.report.record=Record
file.report.record.folder=Record Folder
file.report.unique.folder.identifier=Unique Folder Identifier
file.report.unique.record.identifier=Unique Record Identifier
file.report.unique.record.identifier=Unique Record Identifier
file.report.hold.report=Hold Report
file.report.hold.name=Hold Name
file.report.hold.description=Hold Description
file.report.hold.reason=Hold Reason
file.report.hold.held=Held

View File

@@ -92,6 +92,7 @@
<includePermissionGroup type="rma:filePlanComponent" permissionGroup="CreateHold"/>
<includePermissionGroup type="rma:filePlanComponent" permissionGroup="AddToHold"/>
<includePermissionGroup type="rma:filePlanComponent" permissionGroup="RemoveFromHold"/>
<includePermissionGroup type="rma:filePlanComponent" permissionGroup="FileHoldReport"/>
</permissionGroup>
<permissionGroup name="Filing" allowFullControl="false" expose="true">
@@ -177,6 +178,7 @@
<permissionGroup name="CreateHold" expose="false" allowFullControl="false"/>
<permissionGroup name="AddToHold" expose="false" allowFullControl="false"/>
<permissionGroup name="RemoveFromHold" expose="false" allowFullControl="false"/>
<permissionGroup name="FileHoldReport" expose="false" allowFullControl="false"/>
<!-- End -->
@@ -454,7 +456,7 @@
<grantedToGroup permissionGroup="LinkToRecords"/>
</permission>
<!-- Added since V2.1 -->
<!-- Added since V2.2 -->
<permission name="_CreateHold" expose="false">
<grantedToGroup permissionGroup="CreateHold"/>
@@ -467,6 +469,11 @@
<permission name="_RemoveFromHold" expose="false">
<grantedToGroup permissionGroup="RemoveFromHold"/>
</permission>
<permission name="_FileHoldReport" expose="false">
<grantedToGroup permissionGroup="FileHoldReport"/>
</permission>
</permissionSet>
</permissions>

View File

@@ -35,11 +35,15 @@
<parent>cm:content</parent>
</type>
<type name="rmr:destructionReport">
<title>Report</title>
<title>Destruction Report</title>
<parent>rmr:report</parent>
</type>
<type name="rmr:transferReport">
<title>Transfer</title>
<title>Transfer Report</title>
<parent>rmr:report</parent>
</type>
<type name="rmr:holdReport">
<title>Hold Report</title>
<parent>rmr:report</parent>
</type>
</types>

View File

@@ -3,6 +3,23 @@
<beans>
<!-- Custom property editors -->
<bean class="org.springframework.beans.factory.config.CustomEditorConfigurer">
<property name="propertyEditorRegistrars">
<list>
<ref bean="customPropertyEditorRegistrar"/>
</list>
</property>
</bean>
<bean id="customPropertyEditorRegistrar"
class="org.alfresco.module.org_alfresco_module_rm.util.CustomPropertyEditorRegistrar">
<property name="namespaceService" ref="NamespaceService"/>
</bean>
<!-- Import extended repository context -->
<import resource="classpath:alfresco/module/org_alfresco_module_rm/extended-repository-context.xml"/>
<!-- Bootstrap records management data -->

View File

@@ -9,7 +9,7 @@
<property name="description" value="RM patch executer"/>
<property name="sinceVersion" value="2.2"/>
<property name="executeOnceOnly" value="false"/>
<property name="moduleSchema" value="1005"/>
<property name="moduleSchema" value="1007"/>
<property name="attributeService" ref="AttributeService" />
<property name="dependsOn">
<list>

View File

@@ -59,5 +59,26 @@
<value>${rm.ghosting.enabled}</value>
</property>
</bean>
<bean id="rm.holdReportPatch"
parent="rm.parentModulePatch"
class="org.alfresco.module.org_alfresco_module_rm.patch.v22.RMv22HoldReportPatch">
<property name="description" value="Patches the hold report template."/>
<property name="fixesToSchema" value="1005"/>
<property name="targetSchema" value="1006"/>
<property name="nodeService" ref="NodeService"/>
<property name="contentService" ref="ContentService"/>
</bean>
<bean id="rm.fileHoldReportCapabilityPatch"
parent="rm.parentModulePatch"
class="org.alfresco.module.org_alfresco_module_rm.patch.v22.RMv22FileHoldReportCapabilityPatch">
<property name="description" value="Add FileHoldReport capability."/>
<property name="fixesToSchema" value="1006"/>
<property name="targetSchema" value="1007"/>
<property name="filePlanService" ref="FilePlanService"/>
<property name="filePlanRoleService" ref="FilePlanRoleService"/>
<property name="capabilityService" ref="CapabilityService"/>
</bean>
</beans>

View File

@@ -1054,5 +1054,35 @@
<bean id="addRecordTypes" class="org.alfresco.module.org_alfresco_module_rm.action.impl.AddRecordTypeAction" parent="rmAction">
<property name="publicAction" value="true"/>
</bean>
<!-- file report action -->
<bean id="fileReport"
class="org.alfresco.module.org_alfresco_module_rm.action.impl.FileReportAction"
parent="rmAction">
<property name="reportService" ref="ReportService" />
<property name="publicAction" value="false"/>
</bean>
<bean id="fileReport_proxy" parent="rmProxyAction" >
<property name="target">
<ref bean="fileReport"/>
</property>
<property name="interceptorNames">
<list>
<idref bean="fileReport_security"/>
</list>
</property>
</bean>
<bean id="fileReport_security" class="org.alfresco.repo.security.permissions.impl.acegi.MethodSecurityInterceptor" parent="actionSecurity">
<property name="objectDefinitionSource">
<value>
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>
</beans>

View File

@@ -74,72 +74,32 @@
<property name="mimetypeService" ref="MimetypeService"/>
<property name="fileFolderService" ref="FileFolderService"/>
<property name="templateService" ref="TemplateService"/>
<property name="parameterProcessorComponent" ref="parameterProcessorComponent"/>
<property name="nodeService" ref="NodeService"/>
<property name="dictionaryService" ref="DictionaryService"/>
<property name="repository" ref="repositoryHelper" />
<property name="sysAdminParams" ref="sysAdminParams" />
</bean>
<bean id="destructionReportGenerator" parent="declarativeReportGenerator">
<property name="reportTypeName" value="rmr:destructionReport" />
<property name="reportType" value="rmr:destructionReport" />
</bean>
<bean id="transferReportGenerator" parent="declarativeReportGenerator">
<property name="reportTypeName" value="rmr:transferReport" />
</bean>
<!-- Report Actions -->
<bean id="baseReportAction" abstract="true" parent="rmAction">
<property name="reportService" ref="reportService" />
</bean>
<bean id="transferReport"
class="org.alfresco.module.org_alfresco_module_rm.report.action.TransferReportAction"
parent="baseReportAction" />
<bean id="transferReport_proxy" parent="rmProxyAction" >
<property name="target">
<ref bean="transferReport"/>
</property>
<property name="interceptorNames">
<list>
<idref bean="transferReport_security"/>
</list>
<bean id="transferReportGenerator" parent="declarativeReportGenerator" class="org.alfresco.module.org_alfresco_module_rm.report.generator.transfer.TransferReportGenerator">
<property name="dispositionService" ref="DispositionService"/>
<property name="reportType" value="rmr:transferReport" />
<property name="applicableTypes">
<set>
<value>rma:transfer</value>
</set>
</property>
</bean>
<bean id="transferReport_security" class="org.alfresco.repo.security.permissions.impl.acegi.MethodSecurityInterceptor" parent="actionSecurity">
<property name="objectDefinitionSource">
<value>
org.alfresco.module.org_alfresco_module_rm.action.RecordsManagementAction.execute=RM_CAP.0.rma:filePlanComponent.FileTransferReport
org.alfresco.module.org_alfresco_module_rm.action.RecordsManagementAction.*=RM_ALLOW
org.alfresco.repo.action.executer.ActionExecuter.*=RM_ALLOW
</value>
</property>
</bean>
<bean id="destructionReport"
class="org.alfresco.module.org_alfresco_module_rm.report.action.DestructionReportAction"
parent="baseReportAction" />
<bean id="destructionReport_proxy" parent="rmProxyAction" >
<property name="target">
<ref bean="destructionReport"/>
</property>
<property name="interceptorNames">
<list>
<idref bean="destructionReport_security"/>
</list>
</property>
</bean>
<bean id="destructionReport_security" class="org.alfresco.repo.security.permissions.impl.acegi.MethodSecurityInterceptor" parent="actionSecurity">
<property name="objectDefinitionSource">
<value>
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.*=RM_ALLOW
org.alfresco.repo.action.executer.ActionExecuter.*=RM_ALLOW
</value>
<bean id="holdReportGenerator" parent="declarativeReportGenerator">
<property name="reportType" value="rmr:holdReport" />
<property name="applicableTypes">
<set>
<value>rma:hold</value>
</set>
</property>
</bean>

View File

@@ -868,4 +868,15 @@
</property>
<property name="capability" value ="RemoveFromHold"/>
</bean>
<bean id="jsonConversionComponent.fileHoldReport"
parent="jsonConversionComponent.baseAction">
<property name="name" value="fileHoldReport"/>
<property name="kinds">
<set>
<value>HOLD</value>
</set>
</property>
<property name="capability" value ="FileHoldReport"/>
</bean>
</beans>

View File

@@ -141,7 +141,8 @@
"FileTransferReport",
"CreateHold",
"AddToHold",
"RemoveFromHold"
"RemoveFromHold",
"FileHoldReport"
]
},
{
@@ -211,7 +212,8 @@
"FileTransferReport",
"CreateHold",
"AddToHold",
"RemoveFromHold"
"RemoveFromHold",
"FileHoldReport"
]
}
]