Skip to content

Commit

Permalink
[MNT-24127] Added rest endpoint implementation to calculating folder …
Browse files Browse the repository at this point in the history
…size
  • Loading branch information
mohit-singh4 committed Mar 12, 2024
1 parent b0d64de commit 68153fb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3559,7 +3559,7 @@ public void validateProperties(Map<String, Object> properties, List<String> excl

/**
*
* @param nodeId nodeId value.
* @param nodeId value.
*/
@Override
public Map<String, Object> getFolderSize(String nodeId)
Expand All @@ -3585,7 +3585,8 @@ private long getNodeSize(NodeRef nodeRef)
try
{
size = contentData.getSize();
} catch (Exception e)
}
catch (Exception e)
{
size = 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,10 @@
import java.util.Map;

/**
* Node
* Node Size
*
* - folder size
* - get folder size
*
* @author Mohit Singh
*/
@RelationshipResource(name = "size", entityResource = NodesEntityResource.class, title = "Folder size")
public class NodeFolderSizeRelation implements
Expand All @@ -59,7 +58,7 @@ public void afterPropertiesSet()
}

/**
* Folder Size - returns a size of folder.
* Folder Size - returns size of a folder.
*
* @param nodeId String id of folder - will also accept well-known alias, eg. -root- or -my- or -shared-
* Please refer to OpenAPI spec for more details !
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ else if (RelationshipResourceAction.FolderSize.class.isAssignableFrom(resource.g
{
if (resource.getMetaData().isDeleted(RelationshipResourceAction.FolderSize.class))
{
throw new DeletedResourceException("(GET by id) "+resource.getMetaData().getUniqueId());
throw new DeletedResourceException("(GET by id) " + resource.getMetaData().getUniqueId());
}
RelationshipResourceAction.FolderSize<?> relationGetter = (RelationshipResourceAction.FolderSize<?>) resource.getResource();
Object result = relationGetter.readById(params.getEntityId());
Expand Down

0 comments on commit 68153fb

Please sign in to comment.