mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-01 14:41:46 +00:00
[feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details
This commit is contained in:
@@ -147,7 +147,7 @@ public class SizeDetailImpl implements SizeDetail
|
|||||||
}
|
}
|
||||||
else if(result.containsKey(NodeSizeDetailActionExecutor.EXCEPTION))
|
else if(result.containsKey(NodeSizeDetailActionExecutor.EXCEPTION))
|
||||||
{
|
{
|
||||||
return new NodeSizeDetail((String) result.get(NodeSizeDetailActionExecutor.EXCEPTION));
|
return new NodeSizeDetail((String) result.get("nodeId"), 0L, 0, COMPLETED.name());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for the presence of "size" key.
|
// Check for the presence of "size" key.
|
||||||
|
@@ -28,19 +28,24 @@ package org.alfresco.rest.api.model;
|
|||||||
public class NodeSizeDetail
|
public class NodeSizeDetail
|
||||||
{
|
{
|
||||||
private String nodeId;
|
private String nodeId;
|
||||||
private long size;
|
private Long size;
|
||||||
private String calculatedAt;
|
private String calculatedAt;
|
||||||
private int numberOfFiles;
|
private Integer numberOfFiles;
|
||||||
private String status;
|
private String status;
|
||||||
public NodeSizeDetail()
|
|
||||||
{
|
|
||||||
super();
|
|
||||||
}
|
|
||||||
|
|
||||||
public NodeSizeDetail(String status)
|
public NodeSizeDetail(String status)
|
||||||
{
|
{
|
||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public NodeSizeDetail(String nodeId, Long size, Integer numberOfFiles, String status)
|
||||||
|
{
|
||||||
|
this.nodeId = nodeId;
|
||||||
|
this.size = size;
|
||||||
|
this.numberOfFiles = numberOfFiles;
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
public NodeSizeDetail(String nodeId, long size, String calculatedAt, int numberOfFiles, String status)
|
public NodeSizeDetail(String nodeId, long size, String calculatedAt, int numberOfFiles, String status)
|
||||||
{
|
{
|
||||||
this.nodeId = nodeId;
|
this.nodeId = nodeId;
|
||||||
@@ -60,12 +65,12 @@ public class NodeSizeDetail
|
|||||||
this.nodeId = nodeId;
|
this.nodeId = nodeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getSize()
|
public Long getSize()
|
||||||
{
|
{
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSize(long size)
|
public void setSize(Long size)
|
||||||
{
|
{
|
||||||
this.size = size;
|
this.size = size;
|
||||||
}
|
}
|
||||||
@@ -80,12 +85,12 @@ public class NodeSizeDetail
|
|||||||
this.calculatedAt = calculatedAt;
|
this.calculatedAt = calculatedAt;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getNumberOfFiles()
|
public Integer getNumberOfFiles()
|
||||||
{
|
{
|
||||||
return numberOfFiles;
|
return numberOfFiles;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setNumberOfFiles(int numberOfFiles)
|
public void setNumberOfFiles(Integer numberOfFiles)
|
||||||
{
|
{
|
||||||
this.numberOfFiles = numberOfFiles;
|
this.numberOfFiles = numberOfFiles;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user