updated getBreadcrumbToParentLimit
This commit is contained in:
parent
b476e2af6a
commit
a39e4724ac
|
@ -241,7 +241,8 @@ public class WorkspaceExplorerServiceImpl extends RemoteServiceServlet implement
|
|||
public ArrayList<org.gcube.portlets.widgets.wsexplorer.shared.Item> getBreadcrumbsByItemIdentifier(
|
||||
String itemIdentifier, String itemName, boolean includeItemAsParent)
|
||||
throws Exception {
|
||||
System.out.println("ListParents By Item id "+ itemIdentifier + " name="+itemName);
|
||||
_log.debug("called getBreadcrumbsByItemIdentifier id="+ itemIdentifier + ", name="+itemName);
|
||||
|
||||
try {
|
||||
List<? extends Item> parents = StorageHubServiceUtil.getParents(getThreadLocalRequest(), itemIdentifier);
|
||||
ArrayList<org.gcube.portlets.widgets.wsexplorer.shared.Item> toReturn = new ArrayList<>(parents.size());
|
||||
|
@ -262,6 +263,7 @@ public class WorkspaceExplorerServiceImpl extends RemoteServiceServlet implement
|
|||
String theClickedFolderName = itemName == null || itemName.equals("") ? "current folder" : itemName;
|
||||
|
||||
toReturn.add(new org.gcube.portlets.widgets.wsexplorer.shared.Item(itemIdentifier, theClickedFolderName, true)); //this is the last non clickable item on the BC
|
||||
_log.debug("returning breadcrumbs: "+ toReturn);
|
||||
return toReturn;
|
||||
} catch (Exception e) {
|
||||
_log.error("Error in get List Parents By Item Identifier ", e);
|
||||
|
@ -280,8 +282,13 @@ public class WorkspaceExplorerServiceImpl extends RemoteServiceServlet implement
|
|||
*/
|
||||
@Override
|
||||
public List<org.gcube.portlets.widgets.wsexplorer.shared.Item> getBreadcrumbsByItemIdentifierToParentLimit(String itemIdentifier, String parentLimit, boolean includeItemAsParent) throws Exception {
|
||||
_log.trace("getBreadcrumbsByItemIdentifierToParentLimit by Item Identifier " + itemIdentifier +" and limit: "+parentLimit);
|
||||
_log.debug("getBreadcrumbsByItemIdentifierToParentLimit by Item Identifier: " + itemIdentifier +" and limit: "+parentLimit);
|
||||
|
||||
if(parentLimit==null) {
|
||||
_log.debug("parentLimit is null, so calling default getBreadcrumbsByItemIdentifier");
|
||||
return getBreadcrumbsByItemIdentifier(itemIdentifier, null, includeItemAsParent);
|
||||
}
|
||||
|
||||
parentLimit = parentLimit!=null?parentLimit:"";
|
||||
try {
|
||||
List<? extends Item> parents = StorageHubServiceUtil.getParents(getThreadLocalRequest(), itemIdentifier);
|
||||
|
@ -314,6 +321,7 @@ public class WorkspaceExplorerServiceImpl extends RemoteServiceServlet implement
|
|||
if (found)
|
||||
toReturn.add(item);
|
||||
}
|
||||
_log.debug("returning breadcrumb untit to folder: "+ toReturn);
|
||||
return toReturn;
|
||||
} catch (Exception e) {
|
||||
_log.error("Error in get List Parents By Item Identifier ", e);
|
||||
|
|
Loading…
Reference in New Issue