- Added update and inboundAndUpdate as example rule types that can be commented in.

- Added parameter to content update policy to indicate whether it is new content being updated
- Added triigers to support update rule type

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2275 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Roy Wetherall
2006-02-01 14:26:17 +00:00
parent b8bad79ca5
commit 2bdace676d
12 changed files with 322 additions and 25 deletions

View File

@@ -257,6 +257,7 @@ public class RoutingContentServiceTest extends BaseSpringTest
}
private boolean policyFired = false;
private boolean newContent = true;
/**
* Tests that the content update policy firs correctly
@@ -273,6 +274,8 @@ public class RoutingContentServiceTest extends BaseSpringTest
ContentWriter contentWriter = this.contentService.getWriter(contentNodeRef, ContentModel.PROP_CONTENT, true);
contentWriter.putContent("content update one");
assertFalse(this.policyFired);
this.newContent = false;
// Now check that the policy is fired when the versionable aspect is present
this.nodeService.addAspect(this.contentNodeRef, ContentModel.ASPECT_VERSIONABLE, null);
@@ -287,9 +290,10 @@ public class RoutingContentServiceTest extends BaseSpringTest
assertFalse(this.policyFired);
}
public void onContentUpdateBehaviourTest(NodeRef nodeRef)
public void onContentUpdateBehaviourTest(NodeRef nodeRef, boolean newContent)
{
assertEquals(this.contentNodeRef, nodeRef);
assertEquals(this.newContent, newContent);
assertTrue(this.nodeService.hasAspect(nodeRef, ContentModel.ASPECT_VERSIONABLE));
this.policyFired = true;
}