mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged V2.1 to HEAD
6349: Build fix after ReadPermissions was added to the permission model 6350: CIFS file rename fixes 6352: Management of avmsubmittedaspect, particularly as applies to newly created directories 6353: Added assemble to ignore property pattern 6354: Deployment project build stuff 6355: Fix for AR-1245 (Do not authenticate in a read only TX as it could create a person object) 6356: Office 2003 Add-Ins - Fixes to installers to support Vista 6357: Office Add-In web scripts - Updated to support the new Office 2007 extensions (.docx, .xlsx, .pptx) 6358: Fix for AR-1392 - Audit string lengths 6359: Remove unwanted rule model from repo Fix issue with update rules on spaces causing documents to be deleted in CIFS 6360: Office 2003 Add-In Installers, Vista fixes git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6723 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -27,9 +27,11 @@ package org.alfresco.repo.rule;
|
||||
import java.util.List;
|
||||
|
||||
import org.alfresco.i18n.I18NUtil;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.action.CommonResourceAbstractBase;
|
||||
import org.alfresco.repo.rule.ruletrigger.RuleTrigger;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.rule.Rule;
|
||||
import org.alfresco.service.cmr.rule.RuleService;
|
||||
import org.alfresco.service.cmr.rule.RuleType;
|
||||
@@ -52,6 +54,11 @@ public class RuleTypeImpl extends CommonResourceAbstractBase implements RuleType
|
||||
* The rule service
|
||||
*/
|
||||
private RuleService ruleService;
|
||||
|
||||
/**
|
||||
* The node service
|
||||
*/
|
||||
private NodeService nodeService;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@@ -78,6 +85,16 @@ public class RuleTypeImpl extends CommonResourceAbstractBase implements RuleType
|
||||
{
|
||||
this.ruleService = ruleService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the node service
|
||||
*
|
||||
* @param nodeService the node service
|
||||
*/
|
||||
public void setNodeService(NodeService nodeService)
|
||||
{
|
||||
this.nodeService = nodeService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Rule type initialise method
|
||||
@@ -108,7 +125,9 @@ public class RuleTypeImpl extends CommonResourceAbstractBase implements RuleType
|
||||
*/
|
||||
public void triggerRuleType(NodeRef nodeRef, NodeRef actionedUponNodeRef, boolean executeRuleImmediately)
|
||||
{
|
||||
if (this.ruleService.isEnabled() == true)
|
||||
if (this.ruleService.isEnabled() == true &&
|
||||
this.nodeService.exists(actionedUponNodeRef) == true &&
|
||||
this.nodeService.hasAspect(actionedUponNodeRef, ContentModel.ASPECT_TEMPORARY) == false)
|
||||
{
|
||||
if (this.ruleService.hasRules(nodeRef) == true)
|
||||
{
|
||||
|
Reference in New Issue
Block a user