mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
fixing IDE whitespaces
This commit is contained in:
@@ -149,8 +149,8 @@ public class RecordsAPI extends RMModelRequest
|
||||
* <li>Invalid parameter: {@code recordId} is not a record</li>
|
||||
* <li>authentication fails</li>
|
||||
* <li>current user does not have permission to complete {@code recordId}</li>
|
||||
* <li>{@code recordId} does not exist</li>
|
||||
* <li>model integrity exception: the record is already complete</li>
|
||||
* <li>{@code recordId} does not exist or is frozen</li>
|
||||
* <li>model integrity exception: the record is already completed</li>
|
||||
* <li>model integrity exception: the record has missing meta-data</li>
|
||||
* </ul>
|
||||
*/
|
||||
@@ -242,7 +242,7 @@ public class RecordsAPI extends RMModelRequest
|
||||
* @param recordModel The record model which holds the information
|
||||
* @param recordId The identifier of a record
|
||||
* @param parameters The URL parameters to add
|
||||
* @param returns The updated {@link Record}
|
||||
* @return The updated {@link Record}
|
||||
* @throws Exception for the following cases:
|
||||
* <ul>
|
||||
* <li>the update request is invalid or {@code recordId} is not a valid format or {@code recordModel} is invalid</li>
|
||||
|
@@ -207,8 +207,7 @@ public class CompleteRecordTests extends BaseRMRestTest
|
||||
description = "Cannot complete a document that is not a record"
|
||||
)
|
||||
@AlfrescoTest (jira = "RM-4431")
|
||||
public void completeNonRecord(String nonRecordId)
|
||||
throws Exception
|
||||
public void completeNonRecord(String nonRecordId) throws Exception
|
||||
{
|
||||
// Get the recordsAPI
|
||||
RecordsAPI recordsAPI = getRestAPIFactory().getRecordsAPI();
|
||||
@@ -254,7 +253,7 @@ public class CompleteRecordTests extends BaseRMRestTest
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to create an electronic record and and assert successfully creation
|
||||
* Helper method to create an electronic record and and assert successful creation
|
||||
*/
|
||||
private Record createAndVerifyElectronicRecord(String recordFolderId) throws Exception
|
||||
{
|
||||
@@ -268,7 +267,7 @@ public class CompleteRecordTests extends BaseRMRestTest
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to create a non-electronic record and and assert successfully creation
|
||||
* Helper method to create a non-electronic record and and assert successful creation
|
||||
*/
|
||||
private Record createAndVerifyNonElectronicRecord(String recordFolderId) throws Exception
|
||||
{
|
||||
|
@@ -16,8 +16,7 @@
|
||||
|
||||
<!-- Helper beans -->
|
||||
|
||||
<bean id="baseTransaction" abstract="true"
|
||||
class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||
<bean id="baseTransaction" abstract="true" class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||
<property name="transactionManager">
|
||||
<ref bean="transactionManager"/>
|
||||
</property>
|
||||
@@ -28,8 +27,7 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="baseSecurity" abstract="true"
|
||||
class="org.alfresco.module.org_alfresco_module_rm.security.RMMethodSecurityInterceptor">
|
||||
<bean id="baseSecurity" abstract="true" class="org.alfresco.module.org_alfresco_module_rm.security.RMMethodSecurityInterceptor">
|
||||
<property name="authenticationManager">
|
||||
<ref bean="authenticationManager"/>
|
||||
</property>
|
||||
@@ -51,13 +49,11 @@
|
||||
|
||||
<!-- Records Management Service Registry -->
|
||||
|
||||
<bean id="RecordsManagementServiceRegistry"
|
||||
class="org.alfresco.module.org_alfresco_module_rm.RecordsManagementServiceRegistryImpl" />
|
||||
<bean id="RecordsManagementServiceRegistry" class="org.alfresco.module.org_alfresco_module_rm.RecordsManagementServiceRegistryImpl" />
|
||||
|
||||
<!-- Vital Record Service -->
|
||||
|
||||
<bean id="vitalRecordService" parent="baseService"
|
||||
class="org.alfresco.module.org_alfresco_module_rm.vital.VitalRecordServiceImpl">
|
||||
<bean id="vitalRecordService" parent="baseService" class="org.alfresco.module.org_alfresco_module_rm.vital.VitalRecordServiceImpl">
|
||||
<property name="filePlanService" ref="FilePlanService" />
|
||||
</bean>
|
||||
|
||||
@@ -99,8 +95,7 @@
|
||||
</bean>
|
||||
|
||||
<!-- Disposition Service -->
|
||||
<bean id="dispositionService" parent="baseService"
|
||||
class="org.alfresco.module.org_alfresco_module_rm.disposition.DispositionServiceImpl">
|
||||
<bean id="dispositionService" parent="baseService" class="org.alfresco.module.org_alfresco_module_rm.disposition.DispositionServiceImpl">
|
||||
<property name="recordsManagementServiceRegistry" ref="RecordsManagementServiceRegistry"/>
|
||||
<property name="behaviourFilter" ref="policyBehaviourFilter" />
|
||||
<property name="filePlanService" ref="FilePlanService" />
|
||||
@@ -172,8 +167,7 @@
|
||||
</bean>
|
||||
|
||||
<!-- Transfer Service -->
|
||||
<bean id="rmTransferService" class="org.alfresco.module.org_alfresco_module_rm.transfer.TransferServiceImpl"
|
||||
parent="baseService">
|
||||
<bean id="rmTransferService" class="org.alfresco.module.org_alfresco_module_rm.transfer.TransferServiceImpl" parent="baseService">
|
||||
<property name="filePlanService" ref="FilePlanService" />
|
||||
<property name="dispositionService" ref="dispositionService" />
|
||||
<property name="recordService" ref="RecordService" />
|
||||
@@ -268,8 +262,7 @@
|
||||
|
||||
<!-- Records Management Search Service -->
|
||||
|
||||
<bean id="recordsManagementSearchService"
|
||||
class="org.alfresco.module.org_alfresco_module_rm.search.RecordsManagementSearchServiceImpl">
|
||||
<bean id="recordsManagementSearchService" class="org.alfresco.module.org_alfresco_module_rm.search.RecordsManagementSearchServiceImpl">
|
||||
<property name="fileFolderService" ref="FileFolderService"/>
|
||||
<property name="siteService" ref="SiteService"/>
|
||||
<property name="namespaceService" ref="NamespaceService" />
|
||||
@@ -366,8 +359,7 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="RecordsManagementSearchService_transaction"
|
||||
class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||
<bean id="RecordsManagementSearchService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||
<property name="transactionManager">
|
||||
<ref bean="transactionManager"/>
|
||||
</property>
|
||||
@@ -489,8 +481,7 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="FilePlanPermissionService_transaction"
|
||||
class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||
<bean id="FilePlanPermissionService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||
<property name="transactionManager">
|
||||
<ref bean="transactionManager"/>
|
||||
</property>
|
||||
@@ -546,8 +537,7 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="FilePlanRoleService_transaction"
|
||||
class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||
<bean id="FilePlanRoleService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||
<property name="transactionManager">
|
||||
<ref bean="transactionManager"/>
|
||||
</property>
|
||||
@@ -652,8 +642,7 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="ModelSecurityService_transaction"
|
||||
class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||
<bean id="ModelSecurityService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||
<property name="transactionManager">
|
||||
<ref bean="transactionManager"/>
|
||||
</property>
|
||||
@@ -676,9 +665,7 @@
|
||||
|
||||
<!-- Records Management Action Service -->
|
||||
|
||||
<bean id="recordsManagementActionService"
|
||||
class="org.alfresco.module.org_alfresco_module_rm.action.RecordsManagementActionServiceImpl"
|
||||
init-method="init">
|
||||
<bean id="recordsManagementActionService" class="org.alfresco.module.org_alfresco_module_rm.action.RecordsManagementActionServiceImpl" init-method="init">
|
||||
<property name="policyComponent" ref="policyComponent"/>
|
||||
<property name="nodeService" ref="nodeService"/>
|
||||
</bean>
|
||||
@@ -699,8 +686,7 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="RecordsManagementActionService_transaction"
|
||||
class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||
<bean id="RecordsManagementActionService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||
<property name="transactionManager">
|
||||
<ref bean="transactionManager"/>
|
||||
</property>
|
||||
@@ -736,8 +722,7 @@
|
||||
|
||||
<!-- Records Management Event Service -->
|
||||
|
||||
<bean id="recordsManagementEventService"
|
||||
class="org.alfresco.module.org_alfresco_module_rm.event.RecordsManagementEventServiceImpl">
|
||||
<bean id="recordsManagementEventService" class="org.alfresco.module.org_alfresco_module_rm.event.RecordsManagementEventServiceImpl">
|
||||
<property name="nodeService" ref="NodeService"/>
|
||||
<property name="contentService" ref="ContentService"/>
|
||||
</bean>
|
||||
@@ -758,8 +743,7 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="RecordsManagementEventService_transaction"
|
||||
class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||
<bean id="RecordsManagementEventService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||
<property name="transactionManager">
|
||||
<ref bean="transactionManager"/>
|
||||
</property>
|
||||
@@ -791,8 +775,7 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="recordsManagementAdminBase"
|
||||
class="org.alfresco.module.org_alfresco_module_rm.admin.RecordsManagementAdminBase" abstract="true">
|
||||
<bean id="recordsManagementAdminBase" class="org.alfresco.module.org_alfresco_module_rm.admin.RecordsManagementAdminBase" abstract="true">
|
||||
<property name="dictionaryService" ref="DictionaryService"/>
|
||||
<property name="nodeService" ref="NodeService"/>
|
||||
<property name="contentService" ref="contentService"/>
|
||||
@@ -802,9 +785,7 @@
|
||||
|
||||
<!-- Records Management Admin Service -->
|
||||
|
||||
<bean id="recordsManagementAdminService"
|
||||
class="org.alfresco.module.org_alfresco_module_rm.admin.RecordsManagementAdminServiceImpl"
|
||||
parent="recordsManagementAdminBase">
|
||||
<bean id="recordsManagementAdminService" class="org.alfresco.module.org_alfresco_module_rm.admin.RecordsManagementAdminServiceImpl" parent="recordsManagementAdminBase">
|
||||
<property name="relationshipService" ref="RelationshipService" />
|
||||
<property name="transactionService" ref="transactionService"/>
|
||||
<property name="customisableTypes">
|
||||
@@ -833,8 +814,7 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="RecordsManagementAdminService_transaction"
|
||||
class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||
<bean id="RecordsManagementAdminService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||
<property name="transactionManager">
|
||||
<ref bean="transactionManager"/>
|
||||
</property>
|
||||
@@ -946,8 +926,7 @@
|
||||
|
||||
<!-- Records Management Audit Service -->
|
||||
|
||||
<bean id="recordsManagementAuditService"
|
||||
class="org.alfresco.module.org_alfresco_module_rm.audit.RecordsManagementAuditServiceImpl" init-method="init">
|
||||
<bean id="recordsManagementAuditService" class="org.alfresco.module.org_alfresco_module_rm.audit.RecordsManagementAuditServiceImpl" init-method="init">
|
||||
<property name="policyComponent" ref="policyComponent" />
|
||||
<property name="dictionaryService" ref="dictionaryService" />
|
||||
<property name="transactionService" ref="transactionService" />
|
||||
@@ -985,8 +964,7 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="RecordsManagementAuditService_transaction"
|
||||
class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||
<bean id="RecordsManagementAuditService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||
<property name="transactionManager">
|
||||
<ref bean="transactionManager"/>
|
||||
</property>
|
||||
@@ -1022,8 +1000,7 @@
|
||||
|
||||
<!-- Record Folder Service -->
|
||||
|
||||
<bean id="recordFolderService"
|
||||
class="org.alfresco.module.org_alfresco_module_rm.recordfolder.RecordFolderServiceImpl">
|
||||
<bean id="recordFolderService" class="org.alfresco.module.org_alfresco_module_rm.recordfolder.RecordFolderServiceImpl">
|
||||
<property name="nodeService" ref="NodeService"/>
|
||||
<property name="dispositionService" ref="DispositionService" />
|
||||
<property name="dictionaryService" ref="DictionaryService" />
|
||||
@@ -1047,8 +1024,7 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="RecordFolderService_transaction"
|
||||
class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||
<bean id="RecordFolderService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||
<property name="transactionManager">
|
||||
<ref bean="transactionManager"/>
|
||||
</property>
|
||||
@@ -1078,8 +1054,7 @@
|
||||
|
||||
<!-- Record Service -->
|
||||
|
||||
<bean id="recordService" parent="rm.baseBehaviour"
|
||||
class="org.alfresco.module.org_alfresco_module_rm.record.RecordServiceImpl" init-method="init">
|
||||
<bean id="recordService" parent="rm.baseBehaviour" class="org.alfresco.module.org_alfresco_module_rm.record.RecordServiceImpl" init-method="init">
|
||||
<property name="identifierService" ref="recordsManagementIdentifierService"/>
|
||||
<property name="extendedPermissionService" ref="ExtendedPermissionService"/>
|
||||
<property name="extendedSecurityService" ref="ExtendedSecurityService" />
|
||||
@@ -1118,9 +1093,7 @@
|
||||
<value>http://www.alfresco.org/model/rendition/1.0</value>
|
||||
</util:list>
|
||||
|
||||
<bean id="recordMetadataAspectBootstrap"
|
||||
class="org.alfresco.module.org_alfresco_module_rm.record.RecordMetadataBootstrap" init-method="init"
|
||||
abstract="true">
|
||||
<bean id="recordMetadataAspectBootstrap" class="org.alfresco.module.org_alfresco_module_rm.record.RecordMetadataBootstrap" init-method="init" abstract="true">
|
||||
<property name="recordService" ref="recordService"/>
|
||||
<property name="namespaceService" ref="namespaceService"/>
|
||||
</bean>
|
||||
@@ -1191,8 +1164,7 @@
|
||||
|
||||
<!-- Inplace Record Service -->
|
||||
|
||||
<bean id="inplaceRecordService" parent="baseService"
|
||||
class="org.alfresco.module.org_alfresco_module_rm.record.InplaceRecordServiceImpl">
|
||||
<bean id="inplaceRecordService" parent="baseService" class="org.alfresco.module.org_alfresco_module_rm.record.InplaceRecordServiceImpl">
|
||||
<property name="siteService" ref="SiteService" />
|
||||
<property name="extendedSecurityService" ref="ExtendedSecurityService" />
|
||||
<property name="fileFolderService" ref="FileFolderService" />
|
||||
@@ -1218,8 +1190,7 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="InplaceRecordService_transaction"
|
||||
class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||
<bean id="InplaceRecordService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||
<property name="transactionManager">
|
||||
<ref bean="transactionManager"/>
|
||||
</property>
|
||||
@@ -1283,9 +1254,7 @@
|
||||
<property name="namespacePrefixResolver">
|
||||
<ref bean="namespaceService"></ref>
|
||||
</property>
|
||||
<property name="transactionService">
|
||||
<ref bean="transactionService" />
|
||||
</property>
|
||||
<property name="transactionService"><ref bean="transactionService" /></property>
|
||||
<property name="emailMappingKeys">
|
||||
<list>
|
||||
<value>Thread-Index</value>
|
||||
@@ -1298,8 +1267,7 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="CustomEmailMappingService_transaction"
|
||||
class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||
<bean id="CustomEmailMappingService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||
<property name="transactionManager">
|
||||
<ref bean="transactionManager"/>
|
||||
</property>
|
||||
@@ -1344,8 +1312,7 @@
|
||||
</bean>
|
||||
|
||||
<!-- RM Notification Helper -->
|
||||
<bean id="recordsManagementNotificationHelper"
|
||||
class="org.alfresco.module.org_alfresco_module_rm.notification.RecordsManagementNotificationHelper">
|
||||
<bean id="recordsManagementNotificationHelper" class="org.alfresco.module.org_alfresco_module_rm.notification.RecordsManagementNotificationHelper" >
|
||||
<property name="filePlanRoleService" ref="FilePlanRoleService"/>
|
||||
<property name="notificationService" ref="NotificationService"/>
|
||||
<property name="filePlanService" ref="FilePlanService"/>
|
||||
@@ -1419,8 +1386,7 @@
|
||||
</constructor-arg>
|
||||
</bean>
|
||||
|
||||
<bean id="rmListOfValuesContraintInit"
|
||||
class="org.alfresco.module.org_alfresco_module_rm.caveat.RMListOfValuesConstraint">
|
||||
<bean id="rmListOfValuesContraintInit" class="org.alfresco.module.org_alfresco_module_rm.caveat.RMListOfValuesConstraint">
|
||||
<property name="caveatConfigService" ref="caveatConfigService"/>
|
||||
</bean>
|
||||
|
||||
@@ -1449,8 +1415,7 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="CaveatConfigService_transaction"
|
||||
class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||
<bean id="CaveatConfigService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||
<property name="transactionManager">
|
||||
<ref bean="transactionManager"/>
|
||||
</property>
|
||||
@@ -1480,8 +1445,7 @@
|
||||
</bean>
|
||||
|
||||
<!-- Site service work around (see https://issues.alfresco.com/jira/browse/RM-387) -->
|
||||
<bean name="siteGetChildrenCannedQueryFactory"
|
||||
class="org.alfresco.module.org_alfresco_module_rm.site.GetChildrenCannedQueryFactory">
|
||||
<bean name="siteGetChildrenCannedQueryFactory" class="org.alfresco.module.org_alfresco_module_rm.site.GetChildrenCannedQueryFactory">
|
||||
<property name="registry" ref="siteCannedQueryRegistry"/>
|
||||
<property name="dictionaryService" ref="dictionaryService"/>
|
||||
<property name="tenantService" ref="tenantService"/>
|
||||
@@ -1548,8 +1512,7 @@
|
||||
|
||||
<!-- Data Set Implementations -->
|
||||
|
||||
<bean id="dataSetBase" abstract="true" init-method="register"
|
||||
class="org.alfresco.module.org_alfresco_module_rm.dataset.DataSetBase">
|
||||
<bean id="dataSetBase" abstract="true" init-method="register" class="org.alfresco.module.org_alfresco_module_rm.dataset.DataSetBase">
|
||||
<property name="dataSetService" ref="dataSetService"/>
|
||||
</bean>
|
||||
|
||||
@@ -1616,9 +1579,7 @@
|
||||
|
||||
<!-- Relationship Service -->
|
||||
|
||||
<bean id="relationshipService"
|
||||
class="org.alfresco.module.org_alfresco_module_rm.relationship.RelationshipServiceImpl" init-method="init"
|
||||
parent="recordsManagementAdminBase">
|
||||
<bean id="relationshipService" class="org.alfresco.module.org_alfresco_module_rm.relationship.RelationshipServiceImpl" init-method="init" parent="recordsManagementAdminBase">
|
||||
<property name="policyComponent" ref="policyComponent"/>
|
||||
</bean>
|
||||
|
||||
@@ -1638,8 +1599,7 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="RelationshipService_transaction"
|
||||
class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||
<bean id="RelationshipService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||
<property name="transactionManager">
|
||||
<ref bean="transactionManager"/>
|
||||
</property>
|
||||
@@ -1672,8 +1632,7 @@
|
||||
|
||||
<!-- Recordable Verison Config Service -->
|
||||
|
||||
<bean id="recordableVersionConfigService"
|
||||
class="org.alfresco.module.org_alfresco_module_rm.recordableversion.RecordableVersionConfigServiceImpl">
|
||||
<bean id="recordableVersionConfigService" class="org.alfresco.module.org_alfresco_module_rm.recordableversion.RecordableVersionConfigServiceImpl">
|
||||
<property name="nodeService" ref="NodeService"/>
|
||||
</bean>
|
||||
|
||||
@@ -1693,8 +1652,7 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="RecordableVersionConfigService_transaction"
|
||||
class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||
<bean id="RecordableVersionConfigService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||
<property name="transactionManager">
|
||||
<ref bean="transactionManager"/>
|
||||
</property>
|
||||
|
@@ -42,14 +42,10 @@ import org.alfresco.util.ParameterCheck;
|
||||
*/
|
||||
public class DeclareRecordAction extends RMActionExecuterAbstractBase
|
||||
{
|
||||
/**
|
||||
* action name
|
||||
*/
|
||||
/** action name */
|
||||
public static final String NAME = "declareRecord";
|
||||
|
||||
/**
|
||||
* Record service
|
||||
*/
|
||||
/** Record service */
|
||||
private RecordService recordService;
|
||||
|
||||
/**
|
||||
|
@@ -57,6 +57,7 @@ public interface RecordService
|
||||
*
|
||||
* @param recordMetadataAspect record metadata aspect qualified name
|
||||
* @param filePlanType file plan type
|
||||
*
|
||||
* @since 2.2
|
||||
*/
|
||||
void registerRecordMetadataAspect(QName recordMetadataAspect, QName filePlanType);
|
||||
@@ -72,6 +73,7 @@ public interface RecordService
|
||||
* Disables the property editable check for a given node in this transaction only.
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
*
|
||||
* @since 2.2
|
||||
*/
|
||||
void disablePropertyEditableCheck(NodeRef nodeRef);
|
||||
@@ -85,6 +87,7 @@ public interface RecordService
|
||||
* Gets a list of all the record meta-data aspects
|
||||
*
|
||||
* @return {@link Set}<{@link QName}> list of record meta-data aspects
|
||||
*
|
||||
* @deprecated since 2.2, file plan component required to provide context
|
||||
*/
|
||||
@Deprecated
|
||||
@@ -96,6 +99,7 @@ public interface RecordService
|
||||
*
|
||||
* @param aspect aspect {@link QName}
|
||||
* @return boolean true if the aspect is a registered record meta-data aspect, false otherwise
|
||||
*
|
||||
* @since 2.3
|
||||
*/
|
||||
boolean isRecordMetadataAspect(QName aspect);
|
||||
@@ -107,6 +111,7 @@ public interface RecordService
|
||||
* @param property property {@link QName}
|
||||
* @return boolean true if the property is declared on a registered record meta-data aspect,
|
||||
* false otherwise
|
||||
*
|
||||
* @since 2.3
|
||||
*/
|
||||
boolean isRecordMetadataProperty(QName property);
|
||||
@@ -120,6 +125,7 @@ public interface RecordService
|
||||
*
|
||||
* @param nodeRef node reference to file plan component providing context
|
||||
* @return {@link Set}<{@link QName}> list of record meta-data aspects
|
||||
*
|
||||
* @since 2.2
|
||||
*/
|
||||
Set<QName> getRecordMetadataAspects(NodeRef nodeRef);
|
||||
@@ -132,6 +138,7 @@ public interface RecordService
|
||||
*
|
||||
* @param filePlanType file plan type
|
||||
* @return{@link Set}<{@link QName}> list of record meta-data aspects
|
||||
*
|
||||
* @since 2.2
|
||||
*/
|
||||
Set<QName> getRecordMetadataAspects(QName filePlanType);
|
||||
@@ -194,7 +201,7 @@ public interface RecordService
|
||||
/**
|
||||
* Indicates whether the record is filed or not
|
||||
*
|
||||
* @param record Record node reference
|
||||
* @param record nodeRef of record
|
||||
* @return boolean true if filed, false otherwise
|
||||
*/
|
||||
boolean isFiled(NodeRef record);
|
||||
@@ -202,7 +209,7 @@ public interface RecordService
|
||||
/**
|
||||
* 'File' a new document that arrived in the file plan structure.
|
||||
*
|
||||
* @param record Record node reference
|
||||
* @param record noderef of record
|
||||
*/
|
||||
void file(NodeRef record);
|
||||
|
||||
@@ -267,6 +274,7 @@ public interface RecordService
|
||||
*
|
||||
* @param record the record to unlink
|
||||
* @param recordFolder the record folder to unlink it from
|
||||
*
|
||||
* @since 2.3
|
||||
*/
|
||||
void unlink(NodeRef record, NodeRef recordFolder);
|
||||
|
@@ -145,47 +145,33 @@ public class RecordServiceImpl extends BaseBehaviourBean
|
||||
NodeServicePolicies.OnUpdatePropertiesPolicy,
|
||||
ContentServicePolicies.OnContentUpdatePolicy
|
||||
{
|
||||
/**
|
||||
* Logger
|
||||
*/
|
||||
/** Logger */
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(RecordServiceImpl.class);
|
||||
|
||||
/**
|
||||
* Sync Model URI
|
||||
*/
|
||||
/** Sync Model URI */
|
||||
private static final String SYNC_MODEL_1_0_URI = "http://www.alfresco.org/model/sync/1.0";
|
||||
|
||||
/**
|
||||
* Synced aspect
|
||||
*/
|
||||
/** Synced aspect */
|
||||
private static final QName ASPECT_SYNCED = QName.createQName(SYNC_MODEL_1_0_URI, "synced");
|
||||
|
||||
/**
|
||||
* transation data key
|
||||
*/
|
||||
/** transation data key */
|
||||
private static final String KEY_IGNORE_ON_UPDATE = "ignoreOnUpdate";
|
||||
public static final String KEY_NEW_RECORDS = "newRecords";
|
||||
|
||||
/**
|
||||
* I18N
|
||||
*/
|
||||
/** I18N */
|
||||
private static final String MSG_NODE_HAS_ASPECT = "rm.service.node-has-aspect";
|
||||
private static final String FINAL_VERSION = "rm.service.final-version";
|
||||
private static final String FINAL_DESCRIPTION = "rm.service.final-version-description";
|
||||
private static final String MSG_UNDECLARED_ONLY_RECORDS = "rm.action.undeclared-only-records";
|
||||
private static final String MSG_NO_DECLARE_MAND_PROP = "rm.action.no-declare-mand-prop";
|
||||
|
||||
/**
|
||||
* Always edit property array
|
||||
*/
|
||||
/** Always edit property array */
|
||||
private static final QName[] ALWAYS_EDIT_PROPERTIES = new QName[]
|
||||
{
|
||||
ContentModel.PROP_LAST_THUMBNAIL_MODIFICATION_DATA
|
||||
};
|
||||
|
||||
/**
|
||||
* always edit model URI's
|
||||
*/
|
||||
/** always edit model URI's */
|
||||
private List<String> alwaysEditURIs;
|
||||
|
||||
/**
|
||||
@@ -209,9 +195,7 @@ public class RecordServiceImpl extends BaseBehaviourBean
|
||||
return this.alwaysEditURIs;
|
||||
}
|
||||
|
||||
/**
|
||||
* record model URI's
|
||||
*/
|
||||
/** record model URI's */
|
||||
public static final List<String> RECORD_MODEL_URIS = Collections.unmodifiableList(
|
||||
Arrays.asList(
|
||||
RM_URI,
|
||||
@@ -221,9 +205,7 @@ public class RecordServiceImpl extends BaseBehaviourBean
|
||||
DOD5015Model.DOD_URI
|
||||
));
|
||||
|
||||
/**
|
||||
* non-record model URI's
|
||||
*/
|
||||
/** non-record model URI's */
|
||||
private static final String[] NON_RECORD_MODEL_URIS = new String[]
|
||||
{
|
||||
NamespaceService.AUDIO_MODEL_1_0_URI,
|
||||
@@ -235,114 +217,70 @@ public class RecordServiceImpl extends BaseBehaviourBean
|
||||
NamespaceService.REPOSITORY_VIEW_1_0_URI
|
||||
};
|
||||
|
||||
/**
|
||||
* Indentity service
|
||||
*/
|
||||
/** Indentity service */
|
||||
private IdentifierService identifierService;
|
||||
|
||||
/**
|
||||
* Extended permission service
|
||||
*/
|
||||
/** Extended permission service */
|
||||
private ExtendedPermissionService extendedPermissionService;
|
||||
|
||||
/**
|
||||
* Extended security service
|
||||
*/
|
||||
/** Extended security service */
|
||||
private ExtendedSecurityService extendedSecurityService;
|
||||
|
||||
/**
|
||||
* File plan service
|
||||
*/
|
||||
/** File plan service */
|
||||
private FilePlanService filePlanService;
|
||||
|
||||
/**
|
||||
* Records management notification helper
|
||||
*/
|
||||
/** Records management notification helper */
|
||||
private RecordsManagementNotificationHelper notificationHelper;
|
||||
|
||||
/**
|
||||
* Policy component
|
||||
*/
|
||||
/** Policy component */
|
||||
private PolicyComponent policyComponent;
|
||||
|
||||
/**
|
||||
* Ownable service
|
||||
*/
|
||||
/** Ownable service */
|
||||
private OwnableService ownableService;
|
||||
|
||||
/**
|
||||
* Capability service
|
||||
*/
|
||||
/** Capability service */
|
||||
private CapabilityService capabilityService;
|
||||
|
||||
/**
|
||||
* Rule service
|
||||
*/
|
||||
/** Rule service */
|
||||
private RuleService ruleService;
|
||||
|
||||
/**
|
||||
* File folder service
|
||||
*/
|
||||
/** File folder service */
|
||||
private FileFolderService fileFolderService;
|
||||
|
||||
/**
|
||||
* Record folder service
|
||||
*/
|
||||
/** Record folder service */
|
||||
private RecordFolderService recordFolderService;
|
||||
|
||||
/**
|
||||
* File plan role service
|
||||
*/
|
||||
/** File plan role service */
|
||||
private FilePlanRoleService filePlanRoleService;
|
||||
|
||||
/**
|
||||
* Permission service
|
||||
*/
|
||||
/** Permission service */
|
||||
private PermissionService permissionService;
|
||||
|
||||
/**
|
||||
* Version service
|
||||
*/
|
||||
/** Version service */
|
||||
private VersionService versionService;
|
||||
|
||||
/**
|
||||
* Relationship service
|
||||
*/
|
||||
/** Relationship service */
|
||||
private RelationshipService relationshipService;
|
||||
|
||||
/**
|
||||
* Disposition service
|
||||
*/
|
||||
/** Disposition service */
|
||||
private DispositionService dispositionService;
|
||||
|
||||
/**
|
||||
* records management container type
|
||||
*/
|
||||
/** records management container type */
|
||||
private RecordsManagementContainerType recordsManagementContainerType;
|
||||
|
||||
/**
|
||||
* recordable version service
|
||||
*/
|
||||
/** recordable version service */
|
||||
private RecordableVersionService recordableVersionService;
|
||||
|
||||
/**
|
||||
* list of available record meta-data aspects and the file plan types the are applicable to
|
||||
*/
|
||||
/** list of available record meta-data aspects and the file plan types the are applicable to */
|
||||
private Map<QName, Set<QName>> recordMetaDataAspects;
|
||||
|
||||
/**
|
||||
* Freeze service
|
||||
*/
|
||||
/** Freeze service */
|
||||
private FreezeService freezeService;
|
||||
|
||||
/**
|
||||
* Namespace service
|
||||
*/
|
||||
/** Namespace service */
|
||||
private NamespaceService namespaceService;
|
||||
|
||||
/**
|
||||
* policies
|
||||
*/
|
||||
/** policies */
|
||||
private ClassPolicyDelegate<BeforeFileRecord> beforeFileRecord;
|
||||
private ClassPolicyDelegate<OnFileRecord> onFileRecord;
|
||||
private ClassPolicyDelegate<BeforeRecordDeclaration> beforeRecordDeclarationDelegate;
|
||||
@@ -622,7 +560,8 @@ public class RecordServiceImpl extends BaseBehaviourBean
|
||||
{
|
||||
Set<NodeRef> newRecords = transactionalResourceHelper.getSet(KEY_NEW_RECORDS);
|
||||
newRecords.add(nodeRef);
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
// if we are linking a record
|
||||
NodeRef parentNodeRef = childAssocRef.getParentRef();
|
||||
@@ -638,11 +577,13 @@ public class RecordServiceImpl extends BaseBehaviourBean
|
||||
// recalculate disposition schedule for the record when linking it
|
||||
dispositionService.recalculateNextDispositionStep(nodeRef);
|
||||
}
|
||||
} catch (RecordLinkRuntimeException e)
|
||||
}
|
||||
catch (RecordLinkRuntimeException e)
|
||||
{
|
||||
// rethrow exception
|
||||
throw e;
|
||||
} catch (AlfrescoRuntimeException e)
|
||||
}
|
||||
catch (AlfrescoRuntimeException e)
|
||||
{
|
||||
// do nothing but log error
|
||||
LOGGER.warn("Unable to file pending record.", e);
|
||||
@@ -732,10 +673,12 @@ public class RecordServiceImpl extends BaseBehaviourBean
|
||||
afterCal.set(Calendar.SECOND, 0);
|
||||
afterCal.set(Calendar.MILLISECOND, 0);
|
||||
propertyUnchanged = (beforeCal.compareTo(afterCal) == 0);
|
||||
} else if ((afterValue instanceof Boolean) && (beforeValue == null) && (afterValue.equals(Boolean.FALSE)))
|
||||
}
|
||||
else if ((afterValue instanceof Boolean) && (beforeValue == null) && (afterValue.equals(Boolean.FALSE)))
|
||||
{
|
||||
propertyUnchanged = true;
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
// otherwise
|
||||
propertyUnchanged = EqualsHelper.nullSafeEquals(beforeValue, afterValue);
|
||||
@@ -759,6 +702,7 @@ public class RecordServiceImpl extends BaseBehaviourBean
|
||||
* Get map containing record metadata aspects.
|
||||
*
|
||||
* @return {@link Map}<{@link QName}, {@link Set}<{@link QName}>> map containing record metadata aspects
|
||||
*
|
||||
* @since 2.2
|
||||
*/
|
||||
protected Map<QName, Set<QName>> getRecordMetadataAspectsMap()
|
||||
@@ -816,7 +760,8 @@ public class RecordServiceImpl extends BaseBehaviourBean
|
||||
{
|
||||
// get the current set of file plan types for this aspect
|
||||
filePlanTypes = getRecordMetadataAspectsMap().get(recordMetadataAspect);
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
// create a new set for the file plan type
|
||||
filePlanTypes = new HashSet<QName>(1);
|
||||
@@ -961,7 +906,8 @@ public class RecordServiceImpl extends BaseBehaviourBean
|
||||
{
|
||||
// move the document into the file plan
|
||||
nodeService.moveNode(nodeRef, newRecordContainer, ContentModel.ASSOC_CONTAINS, parentAssoc.getQName());
|
||||
} finally
|
||||
}
|
||||
finally
|
||||
{
|
||||
behaviourFilter.enableBehaviour();
|
||||
}
|
||||
@@ -1000,12 +946,14 @@ public class RecordServiceImpl extends BaseBehaviourBean
|
||||
|
||||
// set the extended security
|
||||
extendedSecurityService.set(nodeRef, readersAndWriters);
|
||||
} finally
|
||||
}
|
||||
finally
|
||||
{
|
||||
ruleService.enableRules();
|
||||
}
|
||||
}
|
||||
} finally
|
||||
}
|
||||
finally
|
||||
{
|
||||
ruleService.enableRuleType("outbound");
|
||||
}
|
||||
@@ -1046,7 +994,8 @@ public class RecordServiceImpl extends BaseBehaviourBean
|
||||
LOGGER.debug(msg);
|
||||
throw new RecordCreationException(msg);
|
||||
}
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
// verify that the provided file plan is actually a file plan
|
||||
if (!filePlanService.isFilePlan(filePlan))
|
||||
@@ -1162,7 +1111,8 @@ public class RecordServiceImpl extends BaseBehaviourBean
|
||||
// create a copy of the original state and add it to the unfiled record container
|
||||
FileInfo recordInfo = fileFolderService.copy(nodeRef, unfiledRecordFolder, null);
|
||||
record = recordInfo.getNodeRef();
|
||||
} finally
|
||||
}
|
||||
finally
|
||||
{
|
||||
recordsManagementContainerType.enable();
|
||||
}
|
||||
@@ -1173,7 +1123,8 @@ public class RecordServiceImpl extends BaseBehaviourBean
|
||||
try
|
||||
{
|
||||
nodeService.removeAspect(record, ContentModel.ASPECT_VERSIONABLE);
|
||||
} finally
|
||||
}
|
||||
finally
|
||||
{
|
||||
behaviourFilter.enableBehaviour(ContentModel.ASPECT_VERSIONABLE);
|
||||
}
|
||||
@@ -1196,14 +1147,16 @@ public class RecordServiceImpl extends BaseBehaviourBean
|
||||
if (originalAssocs == null)
|
||||
{
|
||||
nodeService.removeAspect(record, ContentModel.ASPECT_COPIEDFROM);
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
for (AssociationRef originalAssoc : originalAssocs)
|
||||
{
|
||||
nodeService.createAssociation(record, originalAssoc.getTargetRef(), ContentModel.ASSOC_ORIGINAL);
|
||||
}
|
||||
}
|
||||
} catch (FileNotFoundException e)
|
||||
}
|
||||
catch (FileNotFoundException e)
|
||||
{
|
||||
throw new AlfrescoRuntimeException("Can't create recorded version, because copy fails.", e);
|
||||
}
|
||||
@@ -1274,7 +1227,8 @@ public class RecordServiceImpl extends BaseBehaviourBean
|
||||
if (type == null)
|
||||
{
|
||||
type = ContentModel.TYPE_CONTENT;
|
||||
} else if (!dictionaryService.isSubClass(type, ContentModel.TYPE_CONTENT))
|
||||
}
|
||||
else if (!dictionaryService.isSubClass(type, ContentModel.TYPE_CONTENT))
|
||||
{
|
||||
throw new AlfrescoRuntimeException("Record can only be created from a sub-type of cm:content.");
|
||||
}
|
||||
@@ -1319,7 +1273,8 @@ public class RecordServiceImpl extends BaseBehaviourBean
|
||||
}
|
||||
|
||||
});
|
||||
} finally
|
||||
}
|
||||
finally
|
||||
{
|
||||
enablePropertyEditableCheck();
|
||||
}
|
||||
@@ -1357,7 +1312,8 @@ public class RecordServiceImpl extends BaseBehaviourBean
|
||||
return null;
|
||||
}
|
||||
});
|
||||
} finally
|
||||
}
|
||||
finally
|
||||
{
|
||||
ruleService.enableRules();
|
||||
enablePropertyEditableCheck();
|
||||
@@ -1391,7 +1347,7 @@ public class RecordServiceImpl extends BaseBehaviourBean
|
||||
|
||||
/**
|
||||
* Helper method to 'file' a new document that arrived in the file plan structure.
|
||||
* <p>
|
||||
*
|
||||
* TODO atm we only 'file' content as a record .. may need to consider other types if we
|
||||
* are to support the notion of composite records.
|
||||
*
|
||||
@@ -1523,7 +1479,8 @@ public class RecordServiceImpl extends BaseBehaviourBean
|
||||
// send an email to the record creator
|
||||
notificationHelper.recordRejectedEmailNotification(nodeRef, recordId, documentOwner);
|
||||
}
|
||||
} finally
|
||||
}
|
||||
finally
|
||||
{
|
||||
ruleService.enableRules();
|
||||
}
|
||||
@@ -1624,7 +1581,8 @@ public class RecordServiceImpl extends BaseBehaviourBean
|
||||
if (result)
|
||||
{
|
||||
LOGGER.debug(" ... property marked as always editable.");
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
boolean allowRecordEdit = false;
|
||||
boolean allowNonRecordEdit = false;
|
||||
@@ -1650,25 +1608,29 @@ public class RecordServiceImpl extends BaseBehaviourBean
|
||||
{
|
||||
LOGGER.debug(" ... so all properties can be edited.");
|
||||
result = true;
|
||||
} else if (allowNonRecordEdit && !allowRecordEdit)
|
||||
}
|
||||
else if (allowNonRecordEdit && !allowRecordEdit)
|
||||
{
|
||||
// can only edit non record properties
|
||||
if (!isRecordMetadata(filePlan, property))
|
||||
{
|
||||
LOGGER.debug(" ... property is not considered record metadata so editable.");
|
||||
result = true;
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
LOGGER.debug(" ... property is considered record metadata so not editable.");
|
||||
}
|
||||
} else if (!allowNonRecordEdit && allowRecordEdit)
|
||||
}
|
||||
else if (!allowNonRecordEdit && allowRecordEdit)
|
||||
{
|
||||
// can only edit record properties
|
||||
if (isRecordMetadata(filePlan, property))
|
||||
{
|
||||
LOGGER.debug(" ... property is considered record metadata so editable.");
|
||||
result = true;
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
LOGGER.debug(" ... property is not considered record metadata so not editable.");
|
||||
}
|
||||
@@ -1701,7 +1663,8 @@ public class RecordServiceImpl extends BaseBehaviourBean
|
||||
if (parent != null && TYPE_NON_ELECTRONIC_DOCUMENT.equals(parent.getName()))
|
||||
{
|
||||
result = false;
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
// check the URI's
|
||||
result = RECORD_MODEL_URIS.contains(property.getNamespaceURI());
|
||||
@@ -1796,7 +1759,8 @@ public class RecordServiceImpl extends BaseBehaviourBean
|
||||
if (!nodeService.hasAspect(nodeRef, typeQName))
|
||||
{
|
||||
nodeService.addAspect(nodeRef, typeQName, null);
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
LOGGER.info(I18NUtil.getMessage(MSG_NODE_HAS_ASPECT, nodeRef.toString(), typeQName.toString()));
|
||||
}
|
||||
@@ -1840,7 +1804,8 @@ public class RecordServiceImpl extends BaseBehaviourBean
|
||||
|
||||
// recalculate disposition schedule for the record when linking it
|
||||
dispositionService.recalculateNextDispositionStep(record);
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
// can only link a record to a record folder
|
||||
throw new RecordLinkRuntimeException("Can only link a record to a record folder.");
|
||||
@@ -1848,6 +1813,7 @@ public class RecordServiceImpl extends BaseBehaviourBean
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param record
|
||||
* @param recordFolder
|
||||
*/
|
||||
@@ -1897,7 +1863,8 @@ public class RecordServiceImpl extends BaseBehaviourBean
|
||||
|
||||
// recalculate disposition schedule for record after unlinking it
|
||||
dispositionService.recalculateNextDispositionStep(record);
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
// can only unlink a record from a record folder
|
||||
throw new RecordLinkRuntimeException("Can only unlink a record from a record folder.");
|
||||
|
@@ -76,6 +76,7 @@ public class FilePlanRuleInheritanceTest extends BaseRMTestCase
|
||||
doBehaviourDrivenTest(new BehaviourDrivenTest()
|
||||
{
|
||||
private NodeRef filePlan = null;
|
||||
private Rule rule = null;
|
||||
private List<Rule> rules = null;
|
||||
|
||||
public void given()
|
||||
@@ -84,23 +85,23 @@ public class FilePlanRuleInheritanceTest extends BaseRMTestCase
|
||||
|
||||
// create a rule that applies to childre
|
||||
Action completeRecordAction = actionService.createAction(DeclareRecordAction.NAME);
|
||||
Rule rule = new Rule();
|
||||
rule = new Rule();
|
||||
rule.setRuleType("inbound");
|
||||
rule.setAction(completeRecordAction);
|
||||
rule.applyToChildren(true);
|
||||
|
||||
// save rule on file plan root parent folder
|
||||
ruleService.saveRule(folder, rule);
|
||||
}
|
||||
|
||||
public void when()
|
||||
{
|
||||
// get rules, including those inherited
|
||||
rules = ruleService.getRules(filePlan, true);
|
||||
// save rule on file plan root parent folder
|
||||
ruleService.saveRule(folder, rule);
|
||||
}
|
||||
|
||||
public void then()
|
||||
{
|
||||
// get rules, including those inherited
|
||||
rules = ruleService.getRules(filePlan, true);
|
||||
|
||||
// rules aren't inhreited from file plan root parent folder
|
||||
assertEquals(0, rules.size());
|
||||
}
|
||||
@@ -121,6 +122,7 @@ public class FilePlanRuleInheritanceTest extends BaseRMTestCase
|
||||
{
|
||||
private NodeRef filePlan = null;
|
||||
private List<Rule> rules = null;
|
||||
private Rule rule = null;
|
||||
|
||||
public void given()
|
||||
{
|
||||
@@ -128,24 +130,24 @@ public class FilePlanRuleInheritanceTest extends BaseRMTestCase
|
||||
|
||||
// create a rule that applies to childre
|
||||
Action completeRecordAction = actionService.createAction(DeclareRecordAction.NAME);
|
||||
Rule rule = new Rule();
|
||||
rule = new Rule();
|
||||
rule.setRuleType("inbound");
|
||||
rule.setAction(completeRecordAction);
|
||||
rule.applyToChildren(true);
|
||||
|
||||
// save rule on file plan root
|
||||
ruleService.saveRule(filePlan, rule);
|
||||
}
|
||||
|
||||
public void when()
|
||||
{
|
||||
// get rules, including those inherited
|
||||
NodeRef unfiledRecordContainer = filePlanService.getUnfiledContainer(filePlan);
|
||||
rules = ruleService.getRules(unfiledRecordContainer, true);
|
||||
// save rule on file plan root
|
||||
ruleService.saveRule(filePlan, rule);
|
||||
}
|
||||
|
||||
public void then()
|
||||
{
|
||||
// get rules, including those inherited
|
||||
NodeRef unfiledRecordContainer = filePlanService.getUnfiledContainer(filePlan);
|
||||
rules = ruleService.getRules(unfiledRecordContainer, true);
|
||||
|
||||
// rules aren't inhreited from file plan root
|
||||
assertEquals(0, rules.size());
|
||||
}
|
||||
@@ -164,6 +166,7 @@ public class FilePlanRuleInheritanceTest extends BaseRMTestCase
|
||||
{
|
||||
private NodeRef filePlan = null;
|
||||
private List<Rule> rules = null;
|
||||
private Rule rule = null;
|
||||
|
||||
public void given()
|
||||
{
|
||||
@@ -171,24 +174,24 @@ public class FilePlanRuleInheritanceTest extends BaseRMTestCase
|
||||
|
||||
// create a rule that applies to childre
|
||||
Action completeRecordAction = actionService.createAction(DeclareRecordAction.NAME);
|
||||
Rule rule = new Rule();
|
||||
rule = new Rule();
|
||||
rule.setRuleType("inbound");
|
||||
rule.setAction(completeRecordAction);
|
||||
rule.applyToChildren(true);
|
||||
|
||||
// save rule on file plan root
|
||||
ruleService.saveRule(filePlan, rule);
|
||||
}
|
||||
|
||||
public void when()
|
||||
{
|
||||
// get rules, including those inherited
|
||||
NodeRef container = filePlanService.getHoldContainer(filePlan);
|
||||
rules = ruleService.getRules(container, true);
|
||||
// save rule on file plan root
|
||||
ruleService.saveRule(filePlan, rule);
|
||||
}
|
||||
|
||||
public void then()
|
||||
{
|
||||
// get rules, including those inherited
|
||||
NodeRef container = filePlanService.getHoldContainer(filePlan);
|
||||
rules = ruleService.getRules(container, true);
|
||||
|
||||
// rules aren't inhreited from file plan root
|
||||
assertEquals(0, rules.size());
|
||||
}
|
||||
@@ -207,6 +210,7 @@ public class FilePlanRuleInheritanceTest extends BaseRMTestCase
|
||||
{
|
||||
private NodeRef filePlan = null;
|
||||
private List<Rule> rules = null;
|
||||
private Rule rule = null;
|
||||
|
||||
public void given()
|
||||
{
|
||||
@@ -214,24 +218,24 @@ public class FilePlanRuleInheritanceTest extends BaseRMTestCase
|
||||
|
||||
// create a rule that applies to childre
|
||||
Action completeRecordAction = actionService.createAction(DeclareRecordAction.NAME);
|
||||
Rule rule = new Rule();
|
||||
rule = new Rule();
|
||||
rule.setRuleType("inbound");
|
||||
rule.setAction(completeRecordAction);
|
||||
rule.applyToChildren(true);
|
||||
|
||||
// save rule on file plan root
|
||||
ruleService.saveRule(filePlan, rule);
|
||||
}
|
||||
|
||||
public void when()
|
||||
{
|
||||
// get rules, including those inherited
|
||||
NodeRef container = filePlanService.getTransferContainer(filePlan);
|
||||
rules = ruleService.getRules(container, true);
|
||||
// save rule on file plan root
|
||||
ruleService.saveRule(filePlan, rule);
|
||||
}
|
||||
|
||||
public void then()
|
||||
{
|
||||
// get rules, including those inherited
|
||||
NodeRef container = filePlanService.getTransferContainer(filePlan);
|
||||
rules = ruleService.getRules(container, true);
|
||||
|
||||
// rules aren't inhreited from file plan root
|
||||
assertEquals(0, rules.size());
|
||||
}
|
||||
@@ -251,6 +255,7 @@ public class FilePlanRuleInheritanceTest extends BaseRMTestCase
|
||||
private NodeRef filePlan = null;
|
||||
private NodeRef recordCategory = null;
|
||||
private List<Rule> rules = null;
|
||||
private Rule rule = null;
|
||||
|
||||
public void given()
|
||||
{
|
||||
@@ -259,23 +264,23 @@ public class FilePlanRuleInheritanceTest extends BaseRMTestCase
|
||||
|
||||
// create a rule that applies to childre
|
||||
Action completeRecordAction = actionService.createAction(DeclareRecordAction.NAME);
|
||||
Rule rule = new Rule();
|
||||
rule = new Rule();
|
||||
rule.setRuleType("inbound");
|
||||
rule.setAction(completeRecordAction);
|
||||
rule.applyToChildren(true);
|
||||
|
||||
// save rule on file plan root
|
||||
ruleService.saveRule(filePlan, rule);
|
||||
}
|
||||
|
||||
public void when()
|
||||
{
|
||||
// get rules, including those inherited
|
||||
rules = ruleService.getRules(recordCategory, true);
|
||||
// save rule on file plan root
|
||||
ruleService.saveRule(filePlan, rule);
|
||||
}
|
||||
|
||||
public void then()
|
||||
{
|
||||
// get rules, including those inherited
|
||||
rules = ruleService.getRules(recordCategory, true);
|
||||
|
||||
// rules aren't inhreited from file plan root
|
||||
assertEquals(1, rules.size());
|
||||
}
|
||||
|
Reference in New Issue
Block a user