mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-01 14:41:46 +00:00
[MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]
This commit is contained in:
@@ -256,8 +256,11 @@ public class NodeFolderSizeRelation implements CalculateSize<Map<String, Object>
|
||||
if(folderSizeAction!=null)
|
||||
{
|
||||
String errorInAction = (String) folderSizeAction.getParameterValue(NodeSizeActionExecuter.ERROR);
|
||||
if(errorInAction.length()>1)
|
||||
{
|
||||
throw new InvalidNodeTypeException(errorInAction);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -33,7 +33,5 @@ public class FolderSizeModel
|
||||
{
|
||||
/** Folder Model URI */
|
||||
private static final String SIZE_MODEL_1_0_URI = "http://www.alfresco.org/model/size/1.0";
|
||||
public static final QName PROP_STATUS = QName.createQName(SIZE_MODEL_1_0_URI, "status");
|
||||
public static final QName PROP_OUTPUT = QName.createQName(SIZE_MODEL_1_0_URI, "result");
|
||||
public static final QName PROP_ERROR = QName.createQName(SIZE_MODEL_1_0_URI, "error");
|
||||
}
|
||||
|
@@ -104,7 +104,8 @@ public class NodeSizeActionExecuterTest extends BaseSpringTest
|
||||
ActionImpl action = new ActionImpl(null, ID, NodeSizeActionExecuter.NAME, null);
|
||||
action.setParameterValue(NodeSizeActionExecuter.PAGE_SIZE, maxItems);
|
||||
this.executer.executeImpl(action, this.nodeRef);
|
||||
Map<String, Object> mapResult = (Map<String, Object>)this.nodeService.getProperty(this.nodeRef, FolderSizeModel.PROP_OUTPUT);
|
||||
Object resultAction = action.getParameterValue(NodeSizeActionExecuter.RESULT);
|
||||
Map<String, Object> mapResult = (Map<String, Object>)resultAction;
|
||||
assertTrue(mapResult != null);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user