- Auditable aspect now modifies properties in batch using setProperties

- Inbound rule type now only fires on content creation (not on content update)
- Update rule type added, but commented out sue to issues with over enthusiastic policies.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2541 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Roy Wetherall
2006-03-13 14:42:00 +00:00
parent 1858509d3a
commit 731733d59f
6 changed files with 130 additions and 46 deletions

View File

@@ -22,6 +22,8 @@ import org.alfresco.repo.content.ContentServicePolicies;
import org.alfresco.repo.policy.JavaBehaviour;
import org.alfresco.service.cmr.repository.ChildAssociationRef;
import org.alfresco.service.cmr.repository.NodeRef;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
* @author Roy Wetherall
@@ -29,6 +31,11 @@ import org.alfresco.service.cmr.repository.NodeRef;
public class OnContentUpdateRuleTrigger extends RuleTriggerAbstractBase
implements ContentServicePolicies.OnContentUpdatePolicy
{
/**
* The logger
*/
private static Log logger = LogFactory.getLog(OnContentUpdateRuleTrigger.class);
/** True trigger on new content, false otherwise */
private boolean onNewContent = false;
@@ -76,6 +83,11 @@ public class OnContentUpdateRuleTrigger extends RuleTriggerAbstractBase
{
if (triggerParentRules == true)
{
if (logger.isDebugEnabled() == true)
{
logger.debug("OnContentUpdate rule triggered fired for content; nodeId=" + nodeRef.getId() + "; newContent=" + newContent);
}
List<ChildAssociationRef> parentsAssocRefs = this.nodeService.getParentAssocs(nodeRef);
for (ChildAssociationRef parentAssocRef : parentsAssocRefs)
{