git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/vre-management/VREModeler@9982 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
11f82637ad
commit
f961abccfc
|
@ -131,6 +131,7 @@ public class IStoDBUtil {
|
|||
row= new ArrayList<String>(2);
|
||||
row.add(gen.getID());
|
||||
row.add(gen.getType());
|
||||
values.add(row);
|
||||
}
|
||||
|
||||
try{
|
||||
|
|
|
@ -306,6 +306,7 @@ public class DeployVRE extends Thread{
|
|||
resItem= new ResourceItem();
|
||||
resItem.setID(neededRes.getString(1));
|
||||
resItem.setType(neededRes.getString(2));
|
||||
logger.debug("Needed GenericResources:"+ resItem.getID());
|
||||
resItemList.add(resItem);
|
||||
}
|
||||
}catch(SQLException sqle){
|
||||
|
|
|
@ -67,6 +67,8 @@ public class LayoutCreation {
|
|||
|
||||
Element layoutCreationTitle= XMLUtil.createTextElement(doc, "title", "Layout Creator", new Couple<String, String>("lang", "en"));
|
||||
|
||||
Element layoutCreationTable= XMLUtil.createTextElement(doc, "table", null,new Couple<String, String>("can-modify", "false"), new Couple<String, String>("label", ""), new Couple<String, String>("required-role", "") ,new Couple<String, String>("style", ""),new Couple<String, String>("visible", "true"),new Couple<String, String>("width", "") );
|
||||
|
||||
Element layoutCreationRow =XMLUtil.createTextElement(doc, "row", null,new Couple<String, String>("can-modify", "false"), new Couple<String, String>("label", ""), new Couple<String, String>("required-role", "") ,new Couple<String, String>("style", ""),new Couple<String, String>("visible", "true"),new Couple<String, String>("width", "") );
|
||||
|
||||
Element layoutCreationColumn =XMLUtil.createTextElement(doc, "column", null,new Couple<String, String>("can-modify", "false"), new Couple<String, String>("label", ""), new Couple<String, String>("required-role", "") ,new Couple<String, String>("style", ""),new Couple<String, String>("visible", "true"),new Couple<String, String>("width", "") );
|
||||
|
@ -78,13 +80,16 @@ public class LayoutCreation {
|
|||
layoutCreationframe.appendChild(layoutCreationPortlet);
|
||||
layoutCreationColumn.appendChild(layoutCreationframe);
|
||||
layoutCreationRow.appendChild(layoutCreationColumn);
|
||||
layoutCreationTitle.appendChild(layoutCreationRow);
|
||||
layoutCreationTab.appendChild(layoutCreationTitle);
|
||||
layoutCreationTable.appendChild(layoutCreationRow);
|
||||
layoutCreationTab.appendChild(layoutCreationTable);
|
||||
|
||||
//InformationSpaceEditorPortlet
|
||||
Element informationSpaceTab= XMLUtil.createTextElement(doc, "tab", null, new Couple<String,String>("align", "left"), new Couple<String,String>("can-modify", "false"), new Couple<String,String>("label", ""), new Couple<String,String>("order", "50"), new Couple<String,String>("outline", "true"), new Couple<String,String>("required-role", "VRE-Manager"), new Couple<String,String>("style", ""), new Couple<String,String>("visible", "true"), new Couple<String,String>("width", ""));
|
||||
|
||||
Element informationSpaceTitle= XMLUtil.createTextElement(doc, "title", "Layout Creator", new Couple<String, String>("lang", "en"));
|
||||
Element informationSpaceTitle= XMLUtil.createTextElement(doc, "title", "VRE InformationSpace", new Couple<String, String>("lang", "en"));
|
||||
|
||||
Element informationSpaceTable= XMLUtil.createTextElement(doc, "table", null,new Couple<String, String>("can-modify", "false"), new Couple<String, String>("label", ""), new Couple<String, String>("required-role", "") ,new Couple<String, String>("style", ""),new Couple<String, String>("visible", "true"),new Couple<String, String>("width", "") );
|
||||
|
||||
Element informationSpaceRow =XMLUtil.createTextElement(doc, "row", null,new Couple<String, String>("can-modify", "false"), new Couple<String, String>("label", ""), new Couple<String, String>("required-role", "") ,new Couple<String, String>("style", ""),new Couple<String, String>("visible", "true"),new Couple<String, String>("width", "") );
|
||||
|
||||
|
@ -97,16 +102,16 @@ public class LayoutCreation {
|
|||
informationSpaceFrame.appendChild(informationSpacePortlet);
|
||||
informationSpaceColumn.appendChild(informationSpaceFrame);
|
||||
informationSpaceRow.appendChild(informationSpaceColumn);
|
||||
informationSpaceTitle.appendChild(informationSpaceRow);
|
||||
informationSpaceTab.appendChild(informationSpaceTitle);
|
||||
|
||||
informationSpaceTable.appendChild(informationSpaceRow);
|
||||
informationSpaceTab.appendChild(informationSpaceTable);
|
||||
|
||||
subRoot.appendChild(layoutCreationTab);
|
||||
subRoot.appendChild(informationSpaceTab);
|
||||
|
||||
title.appendChild(subRoot);
|
||||
|
||||
tab.appendChild(title);
|
||||
tab.appendChild(subRoot);
|
||||
root.appendChild(tab);
|
||||
return root;
|
||||
} catch (Exception e) {
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
package org.gcube.vremanagement.vremodeler.portallayout.util;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
public abstract class AbstractTree {
|
||||
|
||||
protected List<AbstractTree> childs;
|
||||
|
||||
protected String nodeName;
|
||||
|
||||
protected String portletClass;
|
||||
|
||||
public abstract boolean isLeaf();
|
||||
|
||||
public abstract void addPathNode(AbstractTree node);
|
||||
|
||||
public abstract String getPortletClass();
|
||||
|
||||
public boolean equals(Object o){
|
||||
AbstractTree n= (AbstractTree) o;
|
||||
return (this.nodeName.compareTo(n.getNodeName())==0);
|
||||
}
|
||||
|
||||
public String getNodeName() {
|
||||
return this.nodeName;
|
||||
}
|
||||
|
||||
public abstract Element createElement(Document doc);
|
||||
|
||||
}
|
|
@ -1,64 +0,0 @@
|
|||
package org.gcube.vremanagement.vremodeler.portallayout.util;
|
||||
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
public class TreeLeaf extends AbstractTree{
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private String nodeName;
|
||||
private String portletClass;
|
||||
public TreeLeaf(String name, String portletClass){
|
||||
this.nodeName= name;
|
||||
this.portletClass= portletClass;
|
||||
}
|
||||
|
||||
|
||||
public String getPortletClass(){
|
||||
return this.portletClass;
|
||||
}
|
||||
|
||||
public boolean isLeaf(){
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addPathNode(AbstractTree node) {}
|
||||
|
||||
|
||||
public Element createElement(Document doc){
|
||||
Element row =doc.createElement("row");
|
||||
row.setAttribute("can-modify", "false");
|
||||
row.setAttribute("label", "");
|
||||
row.setAttribute("required-role", "");
|
||||
row.setAttribute("style", "");
|
||||
row.setAttribute("visible", "true");
|
||||
row.setAttribute("width", "");
|
||||
|
||||
Element column =doc.createElement("column");
|
||||
column.setAttribute("can-modify", "false");
|
||||
column.setAttribute("label", "");
|
||||
column.setAttribute("required-role", "");
|
||||
column.setAttribute("style", "");
|
||||
column.setAttribute("visible", "true");
|
||||
column.setAttribute("width", "");
|
||||
|
||||
Element frame = doc.createElement("frame");
|
||||
frame.setAttribute("can-modify", "false");
|
||||
frame.setAttribute("inner-padding", "");
|
||||
frame.setAttribute("label", "");
|
||||
frame.setAttribute("outer-padding", "");
|
||||
frame.setAttribute("required-role", "");
|
||||
frame.setAttribute("style", "");
|
||||
frame.setAttribute("transparent", "true");
|
||||
frame.setAttribute("visible", "true");
|
||||
frame.setAttribute("width", "");
|
||||
Element portlet= doc.createElement("portlet-class");
|
||||
portlet.setTextContent(this.getPortletClass());
|
||||
frame.appendChild(portlet);
|
||||
column.appendChild(frame);
|
||||
row.appendChild(column);
|
||||
return row;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,103 +0,0 @@
|
|||
package org.gcube.vremanagement.vremodeler.portallayout.util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
public class TreeNode extends AbstractTree{
|
||||
|
||||
|
||||
public TreeNode(String name){
|
||||
this.nodeName= name;
|
||||
this.childs= new ArrayList<AbstractTree>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addPathNode(AbstractTree node){
|
||||
if (node.isLeaf()){
|
||||
this.childs.add(node);
|
||||
} else {
|
||||
if (!this.childs.contains(node)) this.childs.add(node);
|
||||
else this.childs.get((this.childs.indexOf(node))).addPathNode(node.childs.get(0));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPortletClass() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeaf() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Element createElement(Document doc) {
|
||||
if (this.getNodeName().compareTo("Root")!=0){
|
||||
Element tab= doc.createElement("tab");
|
||||
tab.setAttribute("align", "left");
|
||||
tab.setAttribute("can-modify", "false");
|
||||
tab.setAttribute("label", "");
|
||||
tab.setAttribute("order", "50");
|
||||
tab.setAttribute("outline", "true");
|
||||
tab.setAttribute("required-role", "");
|
||||
tab.setAttribute("style", "");
|
||||
tab.setAttribute("visible", "true");
|
||||
tab.setAttribute("width", "");
|
||||
|
||||
Element title= doc.createElement("title");
|
||||
title.setAttribute("lang", "en");
|
||||
title.setTextContent(this.getNodeName());
|
||||
tab.appendChild(title);
|
||||
|
||||
|
||||
Element subRoot;
|
||||
if(this.childs.get(0).isLeaf()){
|
||||
subRoot= doc.createElement("table");
|
||||
subRoot.setAttribute("can-modify", "false");
|
||||
subRoot.setAttribute("label", "");
|
||||
subRoot.setAttribute("required-role", "");
|
||||
subRoot.setAttribute("style", "");
|
||||
subRoot.setAttribute("visible", "true");
|
||||
subRoot.setAttribute("width", "");
|
||||
for (AbstractTree t:this.childs){
|
||||
subRoot.appendChild(t.createElement(doc));
|
||||
}
|
||||
tab.appendChild(subRoot);
|
||||
}else{
|
||||
subRoot= doc.createElement("tabbed-pane");
|
||||
subRoot.setAttribute("can-modify", "false");
|
||||
subRoot.setAttribute("label", "");
|
||||
subRoot.setAttribute("required-role", "");
|
||||
subRoot.setAttribute("style", "sub-menu");
|
||||
subRoot.setAttribute("visible", "true");
|
||||
subRoot.setAttribute("width", "");
|
||||
|
||||
for (AbstractTree t:this.childs){
|
||||
subRoot.appendChild(t.createElement(doc));
|
||||
}
|
||||
tab.appendChild(subRoot);}
|
||||
return tab;
|
||||
}else{
|
||||
Element root;
|
||||
root= doc.createElement("tabbed-pane");
|
||||
root.setAttribute("can-modify", "false");
|
||||
root.setAttribute("label", "");
|
||||
root.setAttribute("required-role", "");
|
||||
root.setAttribute("style", "menu");
|
||||
root.setAttribute("visible", "true");
|
||||
root.setAttribute("width", "");
|
||||
|
||||
for (AbstractTree t:this.childs){
|
||||
root.appendChild(t.createElement(doc));}
|
||||
|
||||
return root;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue