|
|
|
@ -38,13 +38,18 @@ public class StorageHubServiceUtil {
|
|
|
|
|
SecurityTokenProvider.instance.set(authUser.getSecurityToken());
|
|
|
|
|
ItemManagerClient client = AbstractPlugin.item().build();
|
|
|
|
|
List<? extends Item> theChildren = null;
|
|
|
|
|
if (offset >= 0) {
|
|
|
|
|
int limit = offset;
|
|
|
|
|
theChildren = client.getChildren(itemId, from, limit, false, "hl:accounting");
|
|
|
|
|
}
|
|
|
|
|
else { //all the items
|
|
|
|
|
theChildren = client.getChildren(itemId, false, "hl:accounting");
|
|
|
|
|
try {
|
|
|
|
|
if (offset >= 0) {
|
|
|
|
|
int limit = offset;
|
|
|
|
|
theChildren = client.getChildren(itemId, from, limit, false, "hl:accounting");
|
|
|
|
|
}
|
|
|
|
|
else { //all the items
|
|
|
|
|
theChildren = client.getChildren(itemId, false, "hl:accounting");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
if (theChildren == null || theChildren.isEmpty()) {
|
|
|
|
|
toReturn.setChildren(children);
|
|
|
|
|
_log.debug("*** Returning empty ");
|
|
|
|
@ -68,7 +73,14 @@ public class StorageHubServiceUtil {
|
|
|
|
|
String authorizationToken = Utils.getCurrentUserToken(scope, userName);
|
|
|
|
|
SecurityTokenProvider.instance.set(authorizationToken);
|
|
|
|
|
ItemManagerClient client = AbstractPlugin.item().build();
|
|
|
|
|
return client.childrenCount(itemId, false);
|
|
|
|
|
int toReturn = -1;
|
|
|
|
|
try {
|
|
|
|
|
client.childrenCount(itemId, false);
|
|
|
|
|
}
|
|
|
|
|
catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
return toReturn;
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
@ -103,8 +115,8 @@ public class StorageHubServiceUtil {
|
|
|
|
|
SecurityTokenProvider.instance.set(authUser.getSecurityToken());
|
|
|
|
|
WorkspaceManagerClient wsclient = AbstractPlugin.workspace().build();
|
|
|
|
|
List<? extends Item> theChildren = wsclient.getRecentModifiedFilePerVre();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (theChildren == null || theChildren.isEmpty()) {
|
|
|
|
|
toReturn.setChildren(children);
|
|
|
|
|
_log.debug("*** Returning empty ");
|
|
|
|
@ -130,7 +142,7 @@ public class StorageHubServiceUtil {
|
|
|
|
|
SecurityTokenProvider.instance.set(authorizationToken);
|
|
|
|
|
String siteLandingPagePath = PortalContext.getConfiguration().getSiteLandingPagePath(request);
|
|
|
|
|
String toReturn = siteLandingPagePath;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
WorkspaceManagerClient wsclient = AbstractPlugin.workspace().build();
|
|
|
|
|
String itemId = wsclient.getVreFolder("hl:accounting").getId();
|
|
|
|
@ -168,9 +180,9 @@ public class StorageHubServiceUtil {
|
|
|
|
|
}
|
|
|
|
|
return toReturn;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|