- Added the notion of actions only being applicable for certain node types

- 'Run Action' is now available on folder details page

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2837 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Roy Wetherall
2006-05-11 10:38:42 +00:00
parent 011df54dc1
commit c05de860b6
7 changed files with 154 additions and 1 deletions

View File

@@ -55,6 +55,7 @@ public class ActionServiceImplTest extends BaseAlfrescoSpringTest
private static final String BAD_NAME = "badName";
private NodeRef nodeRef;
private NodeRef folder;
@Override
protected void onSetUpInTransaction() throws Exception
@@ -71,6 +72,12 @@ public class ActionServiceImplTest extends BaseAlfrescoSpringTest
this.nodeRef,
ContentModel.PROP_CONTENT,
new ContentData(null, MimetypeMap.MIMETYPE_TEXT_PLAIN, 0L, null));
this.folder = this.nodeService.createNode(
this.rootNodeRef,
ContentModel.ASSOC_CHILDREN,
QName.createQName("{test}testFolder"),
ContentModel.TYPE_FOLDER).getChildRef();
}
/**
@@ -94,11 +101,17 @@ public class ActionServiceImplTest extends BaseAlfrescoSpringTest
List<ActionDefinition> defintions = this.actionService.getActionDefinitions();
assertNotNull(defintions);
assertFalse(defintions.isEmpty());
int totalCount = defintions.size();
for (ActionDefinition definition : defintions)
{
System.out.println(definition.getTitle());
}
// Get the action defintions for a folder type (there should be less than the total available)
List<ActionDefinition> definitions = this.actionService.getActionDefinitions(this.folder);
assertNotNull(definitions);
assertTrue(totalCount > definitions.size());
}
/**