Unit tests for CMIS no-op policy implementation

- Factored out base class for Alfresco CMIS REST tests
- Corrected getAppliedPolicies implementation

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19437 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2010-03-21 16:10:47 +00:00
parent cdb58a0d36
commit 634bddf529
6 changed files with 261 additions and 93 deletions

View File

@@ -1219,18 +1219,19 @@ public class CMISScript extends BaseScopableProcessorExtension
/**
* Gets the list of policy objects currently applied to a target object.
*
* @param objectId
* the object id
* @param source
* source node
* @param filter
* property filter
* @throws WebScriptException on error
*/
public PagedResults getAppliedPolicies(String objectId, String filter, Page page)
public PagedResults getAppliedPolicies(ScriptNode source, String filter, Page page)
{
List<CMISTypeDefinition> policies;
try
{
policies = cmisService.getAppliedPolicies(objectId, filter);
policies = cmisService.getAppliedPolicies((String) cmisService.getProperty(source.getNodeRef(),
CMISDictionaryModel.PROP_OBJECT_ID), filter);
}
catch (CMISServiceException e)
{