This commit is contained in:
Fabio Sinibaldi 2018-07-09 12:54:53 +00:00
parent a0b4265079
commit bc89cfa1de
1 changed files with 18 additions and 2 deletions

View File

@ -51,10 +51,12 @@ public class PortalContextTreeProvider implements ContextTreeProvider {
// PARSE TREE // PARSE TREE
LinkedHashMap<VRECategory,ArrayList<VRE>> gatewayTree=getPortalSitesMappedToVRE(request); LinkedHashMap<VRECategory,ArrayList<VRE>> gatewayTree=getPortalSitesMappedToVRE(request);
log.debug("Parsing tree from gateway. Size {} ",gatewayTree.size());
LinkedList<ScopeDescriptor> rootChildren=new LinkedList<>(); LinkedList<ScopeDescriptor> rootChildren=new LinkedList<>();
for(Entry<VRECategory,ArrayList<VRE>> entry:gatewayTree.entrySet()) { for(Entry<VRECategory,ArrayList<VRE>> entry:gatewayTree.entrySet()) {
ScopeDescriptor rootChild=new ScopeDescriptor(entry.getKey().name, entry.getKey().categoryID+""); ScopeDescriptor rootChild=new ScopeDescriptor(entry.getKey().name, entry.getKey().categoryID+"");
for(VRE vre:entry.getValue()) for(VRE vre:entry.getValue())
rootChild.getChildren().add(new ScopeDescriptor(vre.name, vre.scope)); rootChild.getChildren().add(new ScopeDescriptor(vre.name, vre.scope));
} }
@ -212,6 +214,12 @@ public class PortalContextTreeProvider implements ContextTreeProvider {
public String getName() { public String getName() {
return name; return name;
} }
@Override
public String toString() {
return "VRECategory [categoryID=" + categoryID + ", name=" + name + ", description=" + description + "]";
}
} }
@ -249,6 +257,14 @@ public class PortalContextTreeProvider implements ContextTreeProvider {
return url; return url;
} }
@Override
public String toString() {
return "VRE [name=" + name + ", description=" + description + ", id=" + id + ", url=" + url + ", scope="
+ scope + "]";
}
@Override @Override
public int compareTo(VRE vre) { public int compareTo(VRE vre) {
return this.getName().compareTo(vre.getName()); return this.getName().compareTo(vre.getName());