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:
@@ -203,26 +203,12 @@ public class NodeFolderSizeApiTest extends AbstractBaseApiTest
|
|||||||
parentNodes.setNodeId("folder1"+RUNID);
|
parentNodes.setNodeId("folder1"+RUNID);
|
||||||
parentNodes.setNodeRef(new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE,parentNodes.getNodeId()));
|
parentNodes.setNodeRef(new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE,parentNodes.getNodeId()));
|
||||||
parentNodes.setNodeType(TYPE_CM_FOLDER);
|
parentNodes.setNodeType(TYPE_CM_FOLDER);
|
||||||
QName assocChildQName = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, QName.createValidLocalName(parentNodes.getName()));
|
|
||||||
|
|
||||||
if(i%7==0)
|
|
||||||
{
|
|
||||||
for(int j =0 ; j<=5; j++)
|
|
||||||
{
|
|
||||||
Node childNodes = new Node();
|
|
||||||
childNodes.setName("c2" + RUNID);
|
|
||||||
childNodes.setNodeId("doc"+RUNID);
|
|
||||||
childNodes.setNodeType(TYPE_CM_CONTENT);
|
|
||||||
childNodes.setNodeRef(new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, childNodes.getNodeId()));
|
|
||||||
ContentData contentData = new ContentData(null, MimetypeMap.MIMETYPE_TEXT_PLAIN, 10L, null);
|
ContentData contentData = new ContentData(null, MimetypeMap.MIMETYPE_TEXT_PLAIN, 10L, null);
|
||||||
String mimeType = contentData.getMimetype();
|
String mimeType = contentData.getMimetype();
|
||||||
String mimeTypeName = mimeTypeService.getDisplaysByMimetype().get(mimeType);
|
String mimeTypeName = mimeTypeService.getDisplaysByMimetype().get(mimeType);
|
||||||
ContentInfo contentInfo = new ContentInfo(mimeType, mimeTypeName, contentData.getSize(),contentData.getEncoding());
|
ContentInfo contentInfo = new ContentInfo(mimeType, mimeTypeName, contentData.getSize(),contentData.getEncoding());
|
||||||
childNodes.setContent(contentInfo);
|
parentNodes.setContent(contentInfo);
|
||||||
QName assocChildQNameInternal = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, QName.createValidLocalName(childNodes.getName()));
|
QName assocChildQName = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, QName.createValidLocalName(parentNodes.getName()));
|
||||||
nodeService.addChild(parentNodes.getNodeRef(), childNodes.getNodeRef(), qName, assocChildQNameInternal);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
nodeService.addChild(nodeRef, parentNodes.getNodeRef(), qName, assocChildQName);
|
nodeService.addChild(nodeRef, parentNodes.getNodeRef(), qName, assocChildQName);
|
||||||
}
|
}
|
||||||
Map<String, String> params = new HashMap<>();
|
Map<String, String> params = new HashMap<>();
|
||||||
|
Reference in New Issue
Block a user