RM-783: File destruction report action (part one)

* ReportService added ... will be used to consolidate the various reports withing RM (specifically those needed for DOD complicance)
  * Base and declarative implementations of report generators added
  * Destruction report configured with place holder implementation (still need to do name generation, meta-data and final template)
  * Report model added, with destructionReport type defined
  * FileDestructionReport capability added (and capability patch bean updated)
  * Repository action added to file destruction report
  * UI configured to show 'file destruction report' action .. (creates a report and files it as an unfiled record as the destruction report type)
  * fixed up destruction capabilities and actions (capability to destroy record regardless of its current dispostion state did not work)
  * added "AtLeastOne" composite capability condition
  * TODO destruction report template, name and meta-data generation
  * TODO patch to add report template structure to rm data dictionary area
  * TODO start refactor of existing reports including transfer, accession, userRights, filePlan and audit!!



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@52562 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Roy Wetherall
2013-07-14 09:54:27 +00:00
parent 1e6d49dbab
commit b4d1194ae2
45 changed files with 1602 additions and 108 deletions

View File

@@ -185,7 +185,39 @@
</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>
<app:inlineeditable></app:inlineeditable>
<cm:versionable></cm:versionable>
</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>
</view:associations>
</cm:folder>

View File

@@ -0,0 +1,10 @@
<html>
<head>
</head>
<body>
<h1>Destruction Report</h1>
</body>
</html>

View File

@@ -84,6 +84,17 @@
<property name="dispositionService" ref="DispositionService"/>
<property name="dispositionAction" value="destroy"/>
</bean>
<bean id="capabilityCondition.destroyIsScheduledOrComplete"
parent="capabilityCondition.base"
class="org.alfresco.module.org_alfresco_module_rm.capability.declarative.condition.AtLeastOneCondition">
<property name="conditions">
<list>
<ref bean="capabilityCondition.destroyed" />
<ref bean="capabilityCondition.destroyIsScheduled" />
</list>
</property>
</bean>
<bean id="capabilityCondition.hasEvents"
parent="capabilityCondition.base"

View File

@@ -232,5 +232,23 @@
</map>
</property>
</bean>
<bean id="rmDestroyCapability"
parent="compositeCapability">
<property name="name" value="Destroy"/>
<property name="private" value="true"/>
<property name="kinds">
<list>
<value>RECORD_FOLDER</value>
<value>RECORD</value>
</list>
</property>
<property name="capabilities">
<list>
<ref bean="rmDestroyRecordsScheduledForDestructionCapability"/>
<ref bean="rmDestroyRecordsCapability"/>
</list>
</property>
</bean>
</beans>

View File

@@ -283,6 +283,7 @@
</bean>
<!-- Request record information capability -->
<!-- @since 2.1 -->
<bean id="rmRequestRecordInformationCapability"
parent="declarativeCapability">
<property name="name" value="RequestRecordInformation"/>
@@ -298,5 +299,27 @@
<property name="group"><ref bean="recordsGroup"/></property> <!-- Part of the records group of capabilities -->
<property name="index" value="100" />
</bean>
<!-- file destruction report capability -->
<bean id="rmFileDestructionReportCapability"
parent="declarativeCapability">
<property name="name" value="FileDestructionReport" />
<property name="permission" value="FileDestructionReport" /> <!-- Associated permission -->
<property name="kinds">
<list>
<value>RECORD</value> <!-- Only applies to records and record folders -->
<value>RECORD_FOLDER</value>
</list>
</property>
<property name="conditions">
<map>
<entry key="capabilityCondition.filling" value="true"/> <!-- Must have read and file permissions -->
<entry key="capabilityCondition.frozen" value="false"/> <!-- Not for frozen records -->
<entry key="capabilityCondition.destroyIsScheduledOrComplete" value="true"/> <!-- Only for records scheduled for destruction or destroyed -->
</map>
</property>
<property name="group"><ref bean="recordsGroup"/></property> <!-- Part of the records group of capabilities -->
<property name="index" value="110" />
</bean>
</beans>

View File

@@ -0,0 +1,7 @@
rmr_recordsmanagementreport.description=Records Management Report Content Model
rmr_recordsmanagementreport.type.rmr_report.title=Records Management 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.

View File

@@ -83,6 +83,7 @@
<includePermissionGroup type="rma:filePlanComponent" permissionGroup="CreateRecords"/>
<includePermissionGroup type="rma:filePlanComponent" permissionGroup="ManageRules"/>
<includePermissionGroup type="rma:filePlanComponent" permissionGroup="RequestRecordInformation"/>
<includePermissionGroup type="rma:filePlanComponent" permissionGroup="FileDestructionReport"/>
</permissionGroup>
<permissionGroup name="Filing" allowFullControl="false" expose="true">
@@ -158,6 +159,7 @@
<permissionGroup name="CreateRecords" expose="false" allowFullControl="false"/>
<permissionGroup name="ManageRules" expose="false" allowFullControl="false"/>
<permissionGroup name="RequestRecordInformation" expose="false" allowFullControl="false"/>
<permissionGroup name="FileDestructionReport" expose="false" allowFullControl="false"/>
<!-- End -->
@@ -415,6 +417,10 @@
<grantedToGroup permissionGroup="RequestRecordInformation"/>
</permission>
<permission name="_FileDestructionReport" expose="false">
<grantedToGroup permissionGroup="FileDestructionReport"/>
</permission>
</permissionSet>
</permissions>

View File

@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Definition of Records Management Report Model -->
<!-- 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>
<!-- 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>
<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>
</model>

View File

@@ -113,6 +113,9 @@
<!-- Import workflows -->
<import resource="classpath:alfresco/module/org_alfresco_module_rm/rm-workflow-context.xml"/>
<!-- Import record service -->
<import resource="classpath:alfresco/module/org_alfresco_module_rm/rm-report-context.xml"/>
<!-- RM Script API -->

View File

@@ -244,7 +244,7 @@
<bean id="destroy_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.DestroyRecordsScheduledForDestruction
org.alfresco.module.org_alfresco_module_rm.action.RecordsManagementAction.execute=RM_CAP.0.rma:filePlanComponent.Destroy
org.alfresco.module.org_alfresco_module_rm.action.RecordsManagementAction.*=RM_ALLOW
org.alfresco.repo.action.executer.ActionExecuter.*=RM_ALLOW
</value>
@@ -253,9 +253,8 @@
<bean id="destroy" class="org.alfresco.module.org_alfresco_module_rm.action.impl.DestroyAction" parent="rmAction"
depends-on="rmDestroyRecordsScheduledForDestructionCapability">
<property name="policyComponent">
<ref bean="policyComponent"/>
</property>
<property name="policyComponent" ref="policyComponent"/>
<property name="capabilityService" ref="CapabilityService" />
<property name="eagerContentStoreCleaner" ref="eagerContentStoreCleaner"/>
<property name="ghostingEnabled">
<value>${rm.ghosting.enabled}</value>

View File

@@ -0,0 +1,106 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!-- Report Content Model -->
<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>
</list>
</property>
<property name="labels">
<list>
<value>alfresco/module/org_alfresco_module_rm/messages/report-model</value>
</list>
</property>
</bean>
<!-- Report Service -->
<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" 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>
<bean id="ReportService_transaction" parent="baseTransaction"/>
<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>
<!-- Report Generators -->
<bean id="baseReportGenerator" abstract="true" init-method="init">
<property name="reportService" ref="reportService" />
<property name="namespaceService" ref="namespaceService"/>
</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"/>
</bean>
<bean id="destructionReportGenerator" parent="declarativeReportGenerator" >
<property name="reportTypeName" value="rmr:destructionReport" />
</bean>
<!-- Report Actions -->
<bean id="fileDestructionReport_proxy" parent="rmProxyAction" >
<property name="target">
<ref bean="fileDestructionReport"/>
</property>
<property name="interceptorNames">
<list>
<idref bean="fileDestructionReport_security"/>
</list>
</property>
</bean>
<bean id="fileDestructionReport_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>
</property>
</bean>
<bean id="fileDestructionReport"
class="org.alfresco.module.org_alfresco_module_rm.report.action.FileDestructionReport"
parent="rmAction">
<property name="reportService" ref="ReportService" />
<property name="filePlanService" ref="FilePlanService" />
</bean>
</beans>

View File

@@ -1127,6 +1127,7 @@
<property name="notificationHelper" ref="recordsManagementNotificationHelper"/>
<property name="capabilityService" ref="CapabilityService" />
<property name="ruleService" ref="RuleService" />
<property name="fileFolderService" ref="FileFolderService" />
</bean>
<bean id="RecordService" class="org.springframework.aop.framework.ProxyFactoryBean">

View File

@@ -411,7 +411,19 @@
<value>RECORD</value>
</set>
</property>
<property name="capability" value ="DestroyRecordsScheduledForDestruction"/>
<property name="capability" value ="Destroy"/>
</bean>
<bean id="jsonConversionComponent.fileDestructionReportAction"
parent="jsonConversionComponent.baseAction">
<property name="name" value="fileDestructionReport"/>
<property name="kinds">
<set>
<value>RECORD_FOLDER</value>
<value>RECORD</value>
</set>
</property>
<property name="capability" value ="FileDestructionReport"/>
</bean>
<bean id="jsonConversionComponent.transferAction"

View File

@@ -128,7 +128,8 @@
"AccessAudit",
"ExportAudit",
"CreateModifyDestroyReferenceTypes",
"RequestRecordInformation"
"RequestRecordInformation",
"FileDestructionReport"
]
},
{
@@ -191,7 +192,8 @@
"CreateModifyDestroyReferenceTypes",
"ManageAccessControls",
"ManageRules",
"RequestRecordInformation"
"RequestRecordInformation",
"FileDestructionReport"
]
}
]