perfsonar-dev - perfsonar: r5432 - in branches/new-structure-with-base2/ps-mdm-web-admin: ant src/main/java/org/perfsonar/webadmin/base2/config src/main/java/org/perfsonar/webadmin/base2/waschema/v20090201/impl tomcat/classes/perfsonar/conf tomcat/html tomcat/html/parts
Subject: perfsonar development work
List archive
perfsonar: r5432 - in branches/new-structure-with-base2/ps-mdm-web-admin: ant src/main/java/org/perfsonar/webadmin/base2/config src/main/java/org/perfsonar/webadmin/base2/waschema/v20090201/impl tomcat/classes/perfsonar/conf tomcat/html tomcat/html/parts
Chronological Thread
- From:
- To:
- Subject: perfsonar: r5432 - in branches/new-structure-with-base2/ps-mdm-web-admin: ant src/main/java/org/perfsonar/webadmin/base2/config src/main/java/org/perfsonar/webadmin/base2/waschema/v20090201/impl tomcat/classes/perfsonar/conf tomcat/html tomcat/html/parts
- Date: Tue, 29 Dec 2009 04:45:57 -0500
Author: trzaszcz
Date: 2009-12-29 04:45:57 -0500 (Tue, 29 Dec 2009)
New Revision: 5432
Modified:
branches/new-structure-with-base2/ps-mdm-web-admin/ant/build.xml
branches/new-structure-with-base2/ps-mdm-web-admin/src/main/java/org/perfsonar/webadmin/base2/config/HTMLGenerator.java
branches/new-structure-with-base2/ps-mdm-web-admin/src/main/java/org/perfsonar/webadmin/base2/waschema/v20090201/impl/WebAdminInterfaceHandler.java
branches/new-structure-with-base2/ps-mdm-web-admin/tomcat/classes/perfsonar/conf/wa.xml
branches/new-structure-with-base2/ps-mdm-web-admin/tomcat/html/index.jsp
branches/new-structure-with-base2/ps-mdm-web-admin/tomcat/html/parts/sideBar.jsp
branches/new-structure-with-base2/ps-mdm-web-admin/tomcat/html/parts/welcome.jsp
Log:
refactoring, based/advanced configuration link improvement
Modified: branches/new-structure-with-base2/ps-mdm-web-admin/ant/build.xml
===================================================================
--- branches/new-structure-with-base2/ps-mdm-web-admin/ant/build.xml
2009-12-23 13:16:12 UTC (rev 5431)
+++ branches/new-structure-with-base2/ps-mdm-web-admin/ant/build.xml
2009-12-29 09:45:57 UTC (rev 5432)
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<project name="WebAdmin" basedir="..">
+<project name="WebAdmin" basedir=".." default="war-deploy">
<property file="${basedir}/ant/const.properties" />
Modified:
branches/new-structure-with-base2/ps-mdm-web-admin/src/main/java/org/perfsonar/webadmin/base2/config/HTMLGenerator.java
===================================================================
---
branches/new-structure-with-base2/ps-mdm-web-admin/src/main/java/org/perfsonar/webadmin/base2/config/HTMLGenerator.java
2009-12-23 13:16:12 UTC (rev 5431)
+++
branches/new-structure-with-base2/ps-mdm-web-admin/src/main/java/org/perfsonar/webadmin/base2/config/HTMLGenerator.java
2009-12-29 09:45:57 UTC (rev 5432)
@@ -1,6 +1,7 @@
package org.perfsonar.webadmin.base2.config;
import java.io.PrintStream;
+import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -54,7 +55,6 @@
};
private PrintStream out = null;
- private String url = "";
private boolean plainContext = true;
private ObjectMap omap = null;
private HTMLUtil html = null;
@@ -64,22 +64,12 @@
out.println(s);
}
- public HTMLGenerator() {
- }
-
- public void translate(WebAdminInterface wai) {
- if (wai == null)
- return;
- List page = wai.getPage();
- if (page != null)
- for (int i = 0, sz = page.size(); i < sz; i++)
- translate((PageType) page.get(i));
- }
-
- private static String makeLinkList(List blist, boolean big, boolean
advanced) {
+ private String[] getLinksList(List<LinkType> blist,boolean big,
boolean advanced) {
String basic = "";
- String cls = advanced ? "configheadinglavender" :
"configheading";
- if (big)
+ List<String> result = new ArrayList<String>();
+
+ if(big){
+ String cls = advanced ? "configheadinglavender" :
"configheading";
for (Object o : blist) {
LinkType l = (LinkType) o;
basic = HTMLUtil.tag("tr", HTMLUtil.tag("td",
HTMLUtil.att(
@@ -92,31 +82,43 @@
+ HTMLUtil.tag("p", " ")
+ HTMLUtil.tag("p", " ")))
+ "\n";
+ result.add(basic);
}
- else {
+ }else{
for (Object o : blist) {
LinkType l = (LinkType) o;
basic = HTMLUtil.tag("a",
HTMLUtil.att("href", "config?page="
+ l.getUrl())
+ HTMLUtil.att("target",
"_self"), l.getTitle())
+ "<br/>";
+ if (!basic.equals("")) {
+ result.add("<p><span
class=\"navtex\">" + basic + "</span> </p>");
+ }
}
- if (basic.equals(""))
- return "";
- return "<p><span class=\"navtex\">" + basic +
"</span> </p>";
}
- return basic;
+
+ return result.toArray(new String[result.size()]);
}
- public static String[] makeLinks(ObjectMap o, boolean b) {
+ @SuppressWarnings("unchecked")
+ public String[] getBasicLinks(ObjectMap o,boolean big) {
WebAdminInterface wai;
if (o == null)
throw new RuntimeException("Null object map");
else if ((wai = o.getWA()) == null)
throw new RuntimeException("Null web admin
interface");
- return new String[] { makeLinkList(wai.getBasiclink(), b,
false),
- makeLinkList(wai.getAdvancedlink(), b, true)
};
+ return getLinksList(wai.getBasiclink(),big,false);
}
+
+ @SuppressWarnings("unchecked")
+ public String[] getAdvancedLinks(ObjectMap o,boolean big) {
+ WebAdminInterface wai;
+ if (o == null)
+ throw new RuntimeException("Null object map");
+ else if ((wai = o.getWA()) == null)
+ throw new RuntimeException("Null web admin
interface");
+ return getLinksList(wai.getAdvancedlink(),big,true);
+ }
public boolean translate(String url, ObjectMap o, PrintStream o1) {
omap = o;
Modified:
branches/new-structure-with-base2/ps-mdm-web-admin/src/main/java/org/perfsonar/webadmin/base2/waschema/v20090201/impl/WebAdminInterfaceHandler.java
===================================================================
---
branches/new-structure-with-base2/ps-mdm-web-admin/src/main/java/org/perfsonar/webadmin/base2/waschema/v20090201/impl/WebAdminInterfaceHandler.java
2009-12-23 13:16:12 UTC (rev 5431)
+++
branches/new-structure-with-base2/ps-mdm-web-admin/src/main/java/org/perfsonar/webadmin/base2/waschema/v20090201/impl/WebAdminInterfaceHandler.java
2009-12-29 09:45:57 UTC (rev 5432)
@@ -1,179 +1,329 @@
package org.perfsonar.webadmin.base2.waschema.v20090201.impl;
-public class WebAdminInterfaceHandler extends
org.apache.ws.jaxme.impl.JMSAXElementParser {
- /** The current state. The following values are valid states:
- * 0 = Before parsing the element
- * 1 = While or after parsing the child element
{http://webadmin.perfsonar.org/base2/waschema/v20090201}basiclink
- * 2 = While or after parsing the child element
{http://webadmin.perfsonar.org/base2/waschema/v20090201}advancedlink
- * 3 = While or after parsing the child element
{http://webadmin.perfsonar.org/base2/waschema/v20090201}map
- * 4 = While or after parsing the child element
{http://webadmin.perfsonar.org/base2/waschema/v20090201}page
- *
- */
- private int __state;
+public class WebAdminInterfaceHandler extends
+ org.apache.ws.jaxme.impl.JMSAXElementParser {
+ /**
+ * The current state. The following values are valid states: 0 =
Before
+ * parsing the element 1 = While or after parsing the child element
+ * {http://webadmin.perfsonar.org/base2/waschema/v20090201}basiclink
2 =
+ * While or after parsing the child element
+ *
{http://webadmin.perfsonar.org/base2/waschema/v20090201}advancedlink 3 =
+ * While or after parsing the child element
+ * {http://webadmin.perfsonar.org/base2/waschema/v20090201}map 4 =
While or
+ * after parsing the child element
+ * {http://webadmin.perfsonar.org/base2/waschema/v20090201}page
+ *
+ */
+ private int __state;
+ public boolean startElement(java.lang.String pNamespaceURI,
+ java.lang.String pLocalName, java.lang.String pQName,
+ org.xml.sax.Attributes pAttr) throws
org.xml.sax.SAXException {
+ org.apache.ws.jaxme.impl.JMUnmarshallerHandlerImpl _1 =
getHandler();
+ switch (__state) {
+ case 0:
+ if
("http://webadmin.perfsonar.org/base2/waschema/v20090201"
+ .equals(pNamespaceURI)
+ && "basiclink".equals(pLocalName)) {
+ __state = 1;
+ org.apache.ws.jaxme.JMManager _2 =
getHandler()
+ .getJMUnmarshaller()
+ .getJAXBContextImpl()
+ .getManagerS(
+
org.perfsonar.webadmin.base2.waschema.v20090201.LinkType.class);
+ java.lang.Object _3 = _2.getElementS();
+ org.apache.ws.jaxme.impl.JMSAXElementParser
_4 = _2
+ .getHandler();
+ _4
+ .init(
+ _1,
+ _3,
+
"http://webadmin.perfsonar.org/base2/waschema/v20090201",
+ "basiclink",
_1.getLevel());
+ _4.setAttributes(pAttr);
+ _1.addElementParser(_4);
+ return true;
+ }
+ break;
+ case 1:
+ if
("http://webadmin.perfsonar.org/base2/waschema/v20090201"
+ .equals(pNamespaceURI)
+ && "basiclink".equals(pLocalName)) {
+ __state = 1;
+ org.apache.ws.jaxme.JMManager _5 =
getHandler()
+ .getJMUnmarshaller()
+ .getJAXBContextImpl()
+ .getManagerS(
+
org.perfsonar.webadmin.base2.waschema.v20090201.LinkType.class);
+ java.lang.Object _6 = _5.getElementS();
+ org.apache.ws.jaxme.impl.JMSAXElementParser
_7 = _5
+ .getHandler();
+ _7
+ .init(
+ _1,
+ _6,
+
"http://webadmin.perfsonar.org/base2/waschema/v20090201",
+ "basiclink",
_1.getLevel());
+ _7.setAttributes(pAttr);
+ _1.addElementParser(_7);
+ return true;
+ } else if
("http://webadmin.perfsonar.org/base2/waschema/v20090201"
+ .equals(pNamespaceURI)
+ && "advancedlink".equals(pLocalName))
{
+ __state = 2;
+ org.apache.ws.jaxme.JMManager _8 =
getHandler()
+ .getJMUnmarshaller()
+ .getJAXBContextImpl()
+ .getManagerS(
+
org.perfsonar.webadmin.base2.waschema.v20090201.LinkType.class);
+ java.lang.Object _9 = _8.getElementS();
+ org.apache.ws.jaxme.impl.JMSAXElementParser
_10 = _8
+ .getHandler();
+ _10
+ .init(
+ _1,
+ _9,
+
"http://webadmin.perfsonar.org/base2/waschema/v20090201",
+
"advancedlink", _1.getLevel());
+ _10.setAttributes(pAttr);
+ _1.addElementParser(_10);
+ return true;
+ } else if
("http://webadmin.perfsonar.org/base2/waschema/v20090201"
+ .equals(pNamespaceURI)
+ && "map".equals(pLocalName)) {
+ __state = 3;
+ org.apache.ws.jaxme.JMManager _11 =
getHandler()
+ .getJMUnmarshaller()
+ .getJAXBContextImpl()
+ .getManagerS(
+
org.perfsonar.webadmin.base2.waschema.v20090201.NsMap.class);
+ java.lang.Object _12 = _11.getElementS();
+ org.apache.ws.jaxme.impl.JMSAXElementParser
_13 = _11
+ .getHandler();
+ _13
+ .init(
+ _1,
+ _12,
+
"http://webadmin.perfsonar.org/base2/waschema/v20090201",
+ "map",
_1.getLevel());
+ _13.setAttributes(pAttr);
+ _1.addElementParser(_13);
+ return true;
+ } else if
("http://webadmin.perfsonar.org/base2/waschema/v20090201"
+ .equals(pNamespaceURI)
+ && "page".equals(pLocalName)) {
+ __state = 4;
+ org.apache.ws.jaxme.JMManager _14 =
getHandler()
+ .getJMUnmarshaller()
+ .getJAXBContextImpl()
+ .getManagerS(
+
org.perfsonar.webadmin.base2.waschema.v20090201.PageType.class);
+ java.lang.Object _15 = _14.getElementS();
+ org.apache.ws.jaxme.impl.JMSAXElementParser
_16 = _14
+ .getHandler();
+ _16
+ .init(
+ _1,
+ _15,
+
"http://webadmin.perfsonar.org/base2/waschema/v20090201",
+ "page",
_1.getLevel());
+ _16.setAttributes(pAttr);
+ _1.addElementParser(_16);
+ return true;
+ }
+ break;
+ case 2:
+ if
("http://webadmin.perfsonar.org/base2/waschema/v20090201"
+ .equals(pNamespaceURI)
+ && "advancedlink".equals(pLocalName))
{
+ __state = 2;
+ org.apache.ws.jaxme.JMManager _17 =
getHandler()
+ .getJMUnmarshaller()
+ .getJAXBContextImpl()
+ .getManagerS(
+
org.perfsonar.webadmin.base2.waschema.v20090201.LinkType.class);
+ java.lang.Object _18 = _17.getElementS();
+ org.apache.ws.jaxme.impl.JMSAXElementParser
_19 = _17
+ .getHandler();
+ _19
+ .init(
+ _1,
+ _18,
+
"http://webadmin.perfsonar.org/base2/waschema/v20090201",
+
"advancedlink", _1.getLevel());
+ _19.setAttributes(pAttr);
+ _1.addElementParser(_19);
+ return true;
+ } else if
("http://webadmin.perfsonar.org/base2/waschema/v20090201"
+ .equals(pNamespaceURI)
+ && "map".equals(pLocalName)) {
+ __state = 3;
+ org.apache.ws.jaxme.JMManager _20 =
getHandler()
+ .getJMUnmarshaller()
+ .getJAXBContextImpl()
+ .getManagerS(
+
org.perfsonar.webadmin.base2.waschema.v20090201.NsMap.class);
+ java.lang.Object _21 = _20.getElementS();
+ org.apache.ws.jaxme.impl.JMSAXElementParser
_22 = _20
+ .getHandler();
+ _22
+ .init(
+ _1,
+ _21,
+
"http://webadmin.perfsonar.org/base2/waschema/v20090201",
+ "map",
_1.getLevel());
+ _22.setAttributes(pAttr);
+ _1.addElementParser(_22);
+ return true;
+ } else if
("http://webadmin.perfsonar.org/base2/waschema/v20090201"
+ .equals(pNamespaceURI)
+ && "page".equals(pLocalName)) {
+ __state = 4;
+ org.apache.ws.jaxme.JMManager _23 =
getHandler()
+ .getJMUnmarshaller()
+ .getJAXBContextImpl()
+ .getManagerS(
+
org.perfsonar.webadmin.base2.waschema.v20090201.PageType.class);
+ java.lang.Object _24 = _23.getElementS();
+ org.apache.ws.jaxme.impl.JMSAXElementParser
_25 = _23
+ .getHandler();
+ _25
+ .init(
+ _1,
+ _24,
+
"http://webadmin.perfsonar.org/base2/waschema/v20090201",
+ "page",
_1.getLevel());
+ _25.setAttributes(pAttr);
+ _1.addElementParser(_25);
+ return true;
+ }
+ break;
+ case 3:
+ if
("http://webadmin.perfsonar.org/base2/waschema/v20090201"
+ .equals(pNamespaceURI)
+ && "map".equals(pLocalName)) {
+ __state = 3;
+ org.apache.ws.jaxme.JMManager _26 =
getHandler()
+ .getJMUnmarshaller()
+ .getJAXBContextImpl()
+ .getManagerS(
+
org.perfsonar.webadmin.base2.waschema.v20090201.NsMap.class);
+ java.lang.Object _27 = _26.getElementS();
+ org.apache.ws.jaxme.impl.JMSAXElementParser
_28 = _26
+ .getHandler();
+ _28
+ .init(
+ _1,
+ _27,
+
"http://webadmin.perfsonar.org/base2/waschema/v20090201",
+ "map",
_1.getLevel());
+ _28.setAttributes(pAttr);
+ _1.addElementParser(_28);
+ return true;
+ } else if
("http://webadmin.perfsonar.org/base2/waschema/v20090201"
+ .equals(pNamespaceURI)
+ && "page".equals(pLocalName)) {
+ __state = 4;
+ org.apache.ws.jaxme.JMManager _29 =
getHandler()
+ .getJMUnmarshaller()
+ .getJAXBContextImpl()
+ .getManagerS(
+
org.perfsonar.webadmin.base2.waschema.v20090201.PageType.class);
+ java.lang.Object _30 = _29.getElementS();
+ org.apache.ws.jaxme.impl.JMSAXElementParser
_31 = _29
+ .getHandler();
+ _31
+ .init(
+ _1,
+ _30,
+
"http://webadmin.perfsonar.org/base2/waschema/v20090201",
+ "page",
_1.getLevel());
+ _31.setAttributes(pAttr);
+ _1.addElementParser(_31);
+ return true;
+ }
+ break;
+ case 4:
+ if
("http://webadmin.perfsonar.org/base2/waschema/v20090201"
+ .equals(pNamespaceURI)
+ && "page".equals(pLocalName)) {
+ __state = 4;
+ org.apache.ws.jaxme.JMManager _32 =
getHandler()
+ .getJMUnmarshaller()
+ .getJAXBContextImpl()
+ .getManagerS(
+
org.perfsonar.webadmin.base2.waschema.v20090201.PageType.class);
+ java.lang.Object _33 = _32.getElementS();
+ org.apache.ws.jaxme.impl.JMSAXElementParser
_34 = _32
+ .getHandler();
+ _34
+ .init(
+ _1,
+ _33,
+
"http://webadmin.perfsonar.org/base2/waschema/v20090201",
+ "page",
_1.getLevel());
+ _34.setAttributes(pAttr);
+ _1.addElementParser(_34);
+ return true;
+ }
+ break;
+ default:
+ throw new java.lang.IllegalStateException("Invalid
state: "
+ + __state);
+ }
+ return false;
+ }
- public boolean startElement(java.lang.String pNamespaceURI,
java.lang.String pLocalName, java.lang.String pQName, org.xml.sax.Attributes
pAttr) throws org.xml.sax.SAXException {
- org.apache.ws.jaxme.impl.JMUnmarshallerHandlerImpl _1 = getHandler();
- switch (__state) {
- case 0:
- if
("http://webadmin.perfsonar.org/base2/waschema/v20090201".equals(pNamespaceURI)
&& "basiclink".equals(pLocalName)) {
- __state = 1;
- org.apache.ws.jaxme.JMManager _2 =
getHandler().getJMUnmarshaller().getJAXBContextImpl().getManagerS(org.perfsonar.webadmin.base2.waschema.v20090201.LinkType.class);
- java.lang.Object _3 = _2.getElementS();
- org.apache.ws.jaxme.impl.JMSAXElementParser _4 = _2.getHandler();
- _4.init(_1, _3,
"http://webadmin.perfsonar.org/base2/waschema/v20090201", "basiclink",
_1.getLevel());
- _4.setAttributes(pAttr);
- _1.addElementParser(_4);
- return true;
- }
- break;
- case 1:
- if
("http://webadmin.perfsonar.org/base2/waschema/v20090201".equals(pNamespaceURI)
&& "basiclink".equals(pLocalName)) {
- __state = 1;
- org.apache.ws.jaxme.JMManager _5 =
getHandler().getJMUnmarshaller().getJAXBContextImpl().getManagerS(org.perfsonar.webadmin.base2.waschema.v20090201.LinkType.class);
- java.lang.Object _6 = _5.getElementS();
- org.apache.ws.jaxme.impl.JMSAXElementParser _7 = _5.getHandler();
- _7.init(_1, _6,
"http://webadmin.perfsonar.org/base2/waschema/v20090201", "basiclink",
_1.getLevel());
- _7.setAttributes(pAttr);
- _1.addElementParser(_7);
- return true;
- } else if
("http://webadmin.perfsonar.org/base2/waschema/v20090201".equals(pNamespaceURI)
&& "advancedlink".equals(pLocalName)) {
- __state = 2;
- org.apache.ws.jaxme.JMManager _8 =
getHandler().getJMUnmarshaller().getJAXBContextImpl().getManagerS(org.perfsonar.webadmin.base2.waschema.v20090201.LinkType.class);
- java.lang.Object _9 = _8.getElementS();
- org.apache.ws.jaxme.impl.JMSAXElementParser _10 = _8.getHandler();
- _10.init(_1, _9,
"http://webadmin.perfsonar.org/base2/waschema/v20090201", "advancedlink",
_1.getLevel());
- _10.setAttributes(pAttr);
- _1.addElementParser(_10);
- return true;
- } else if
("http://webadmin.perfsonar.org/base2/waschema/v20090201".equals(pNamespaceURI)
&& "map".equals(pLocalName)) {
- __state = 3;
- org.apache.ws.jaxme.JMManager _11 =
getHandler().getJMUnmarshaller().getJAXBContextImpl().getManagerS(org.perfsonar.webadmin.base2.waschema.v20090201.NsMap.class);
- java.lang.Object _12 = _11.getElementS();
- org.apache.ws.jaxme.impl.JMSAXElementParser _13 = _11.getHandler();
- _13.init(_1, _12,
"http://webadmin.perfsonar.org/base2/waschema/v20090201", "map",
_1.getLevel());
- _13.setAttributes(pAttr);
- _1.addElementParser(_13);
- return true;
- } else if
("http://webadmin.perfsonar.org/base2/waschema/v20090201".equals(pNamespaceURI)
&& "page".equals(pLocalName)) {
- __state = 4;
- org.apache.ws.jaxme.JMManager _14 =
getHandler().getJMUnmarshaller().getJAXBContextImpl().getManagerS(org.perfsonar.webadmin.base2.waschema.v20090201.PageType.class);
- java.lang.Object _15 = _14.getElementS();
- org.apache.ws.jaxme.impl.JMSAXElementParser _16 = _14.getHandler();
- _16.init(_1, _15,
"http://webadmin.perfsonar.org/base2/waschema/v20090201", "page",
_1.getLevel());
- _16.setAttributes(pAttr);
- _1.addElementParser(_16);
- return true;
- }
- break;
- case 2:
- if
("http://webadmin.perfsonar.org/base2/waschema/v20090201".equals(pNamespaceURI)
&& "advancedlink".equals(pLocalName)) {
- __state = 2;
- org.apache.ws.jaxme.JMManager _17 =
getHandler().getJMUnmarshaller().getJAXBContextImpl().getManagerS(org.perfsonar.webadmin.base2.waschema.v20090201.LinkType.class);
- java.lang.Object _18 = _17.getElementS();
- org.apache.ws.jaxme.impl.JMSAXElementParser _19 = _17.getHandler();
- _19.init(_1, _18,
"http://webadmin.perfsonar.org/base2/waschema/v20090201", "advancedlink",
_1.getLevel());
- _19.setAttributes(pAttr);
- _1.addElementParser(_19);
- return true;
- } else if
("http://webadmin.perfsonar.org/base2/waschema/v20090201".equals(pNamespaceURI)
&& "map".equals(pLocalName)) {
- __state = 3;
- org.apache.ws.jaxme.JMManager _20 =
getHandler().getJMUnmarshaller().getJAXBContextImpl().getManagerS(org.perfsonar.webadmin.base2.waschema.v20090201.NsMap.class);
- java.lang.Object _21 = _20.getElementS();
- org.apache.ws.jaxme.impl.JMSAXElementParser _22 = _20.getHandler();
- _22.init(_1, _21,
"http://webadmin.perfsonar.org/base2/waschema/v20090201", "map",
_1.getLevel());
- _22.setAttributes(pAttr);
- _1.addElementParser(_22);
- return true;
- } else if
("http://webadmin.perfsonar.org/base2/waschema/v20090201".equals(pNamespaceURI)
&& "page".equals(pLocalName)) {
- __state = 4;
- org.apache.ws.jaxme.JMManager _23 =
getHandler().getJMUnmarshaller().getJAXBContextImpl().getManagerS(org.perfsonar.webadmin.base2.waschema.v20090201.PageType.class);
- java.lang.Object _24 = _23.getElementS();
- org.apache.ws.jaxme.impl.JMSAXElementParser _25 = _23.getHandler();
- _25.init(_1, _24,
"http://webadmin.perfsonar.org/base2/waschema/v20090201", "page",
_1.getLevel());
- _25.setAttributes(pAttr);
- _1.addElementParser(_25);
- return true;
- }
- break;
- case 3:
- if
("http://webadmin.perfsonar.org/base2/waschema/v20090201".equals(pNamespaceURI)
&& "map".equals(pLocalName)) {
- __state = 3;
- org.apache.ws.jaxme.JMManager _26 =
getHandler().getJMUnmarshaller().getJAXBContextImpl().getManagerS(org.perfsonar.webadmin.base2.waschema.v20090201.NsMap.class);
- java.lang.Object _27 = _26.getElementS();
- org.apache.ws.jaxme.impl.JMSAXElementParser _28 = _26.getHandler();
- _28.init(_1, _27,
"http://webadmin.perfsonar.org/base2/waschema/v20090201", "map",
_1.getLevel());
- _28.setAttributes(pAttr);
- _1.addElementParser(_28);
- return true;
- } else if
("http://webadmin.perfsonar.org/base2/waschema/v20090201".equals(pNamespaceURI)
&& "page".equals(pLocalName)) {
- __state = 4;
- org.apache.ws.jaxme.JMManager _29 =
getHandler().getJMUnmarshaller().getJAXBContextImpl().getManagerS(org.perfsonar.webadmin.base2.waschema.v20090201.PageType.class);
- java.lang.Object _30 = _29.getElementS();
- org.apache.ws.jaxme.impl.JMSAXElementParser _31 = _29.getHandler();
- _31.init(_1, _30,
"http://webadmin.perfsonar.org/base2/waschema/v20090201", "page",
_1.getLevel());
- _31.setAttributes(pAttr);
- _1.addElementParser(_31);
- return true;
- }
- break;
- case 4:
- if
("http://webadmin.perfsonar.org/base2/waschema/v20090201".equals(pNamespaceURI)
&& "page".equals(pLocalName)) {
- __state = 4;
- org.apache.ws.jaxme.JMManager _32 =
getHandler().getJMUnmarshaller().getJAXBContextImpl().getManagerS(org.perfsonar.webadmin.base2.waschema.v20090201.PageType.class);
- java.lang.Object _33 = _32.getElementS();
- org.apache.ws.jaxme.impl.JMSAXElementParser _34 = _32.getHandler();
- _34.init(_1, _33,
"http://webadmin.perfsonar.org/base2/waschema/v20090201", "page",
_1.getLevel());
- _34.setAttributes(pAttr);
- _1.addElementParser(_34);
- return true;
- }
- break;
- default:
- throw new java.lang.IllegalStateException("Invalid state: " +
__state);
- }
- return false;
- }
+ public void endElement(java.lang.String pNamespaceURI,
+ java.lang.String pLocalName, java.lang.String pQName,
+ java.lang.Object pResult) throws
org.xml.sax.SAXException {
+
org.perfsonar.webadmin.base2.waschema.v20090201.WebAdminInterface _1 =
(org.perfsonar.webadmin.base2.waschema.v20090201.WebAdminInterface) result;
+ switch (__state) {
+ case 1:
+ if
("http://webadmin.perfsonar.org/base2/waschema/v20090201"
+ .equals(pNamespaceURI)
+ && "basiclink".equals(pLocalName)) {
+ _1.getBasiclink().add(pResult);
+ return;
+ }
+ break;
+ case 2:
+ if
("http://webadmin.perfsonar.org/base2/waschema/v20090201"
+ .equals(pNamespaceURI)
+ && "advancedlink".equals(pLocalName))
{
+ _1.getAdvancedlink().add(pResult);
+ return;
+ }
+ break;
+ case 3:
+ if
("http://webadmin.perfsonar.org/base2/waschema/v20090201"
+ .equals(pNamespaceURI)
+ && "map".equals(pLocalName)) {
+ _1.getMap().add(pResult);
+ return;
+ }
+ break;
+ case 4:
+ if
("http://webadmin.perfsonar.org/base2/waschema/v20090201"
+ .equals(pNamespaceURI)
+ && "page".equals(pLocalName)) {
+ _1.getPage().add(pResult);
+ return;
+ }
+ break;
+ default:
+ throw new java.lang.IllegalStateException("Illegal
state: "
+ + __state);
+ }
+ }
- public void endElement(java.lang.String pNamespaceURI, java.lang.String
pLocalName, java.lang.String pQName, java.lang.Object pResult) throws
org.xml.sax.SAXException {
- org.perfsonar.webadmin.base2.waschema.v20090201.WebAdminInterface _1 =
(org.perfsonar.webadmin.base2.waschema.v20090201.WebAdminInterface) result;
- switch (__state) {
- case 1:
- if
("http://webadmin.perfsonar.org/base2/waschema/v20090201".equals(pNamespaceURI)
&& "basiclink".equals(pLocalName)) {
- _1.getBasiclink().add(pResult);
- return;
- }
- break;
- case 2:
- if
("http://webadmin.perfsonar.org/base2/waschema/v20090201".equals(pNamespaceURI)
&& "advancedlink".equals(pLocalName)) {
- _1.getAdvancedlink().add(pResult);
- return;
- }
- break;
- case 3:
- if
("http://webadmin.perfsonar.org/base2/waschema/v20090201".equals(pNamespaceURI)
&& "map".equals(pLocalName)) {
- _1.getMap().add(pResult);
- return;
- }
- break;
- case 4:
- if
("http://webadmin.perfsonar.org/base2/waschema/v20090201".equals(pNamespaceURI)
&& "page".equals(pLocalName)) {
- _1.getPage().add(pResult);
- return;
- }
- break;
- default:
- throw new java.lang.IllegalStateException("Illegal state: " +
__state);
- }
- }
+ public boolean isFinished() {
+ switch (__state) {
+ case 4:
+ return true;
+ default:
+ return false;
+ }
+ }
- public boolean isFinished() {
- switch (__state) {
- case 4:
- return true;
- default:
- return false;
- }
- }
-
}
Modified:
branches/new-structure-with-base2/ps-mdm-web-admin/tomcat/classes/perfsonar/conf/wa.xml
===================================================================
---
branches/new-structure-with-base2/ps-mdm-web-admin/tomcat/classes/perfsonar/conf/wa.xml
2009-12-23 13:16:12 UTC (rev 5431)
+++
branches/new-structure-with-base2/ps-mdm-web-admin/tomcat/classes/perfsonar/conf/wa.xml
2009-12-29 09:45:57 UTC (rev 5432)
@@ -2,12 +2,17 @@
<wa:interface
- xmlns:wa="http://webadmin.perfsonar.org/base2/waschema/v20090201"
- >
+ xmlns:wa="http://webadmin.perfsonar.org/base2/waschema/v20090201">
+
<wa:basiclink>
<wa:url>basic</wa:url> <!-- page identifier -->
<wa:title>Service Settings</wa:title>
</wa:basiclink>
+
+ <wa:basiclink>
+ <wa:url>url</wa:url> <!-- page identifier -->
+ <wa:title>xxxxx</wa:title>
+ </wa:basiclink>
<wa:advancedlink>
<wa:url>advanced</wa:url> <!-- page identifier -->
@@ -18,8 +23,22 @@
<wa:url>http://service.perfsonar.org/ns/config/base/0.9/</wa:url>
<wa:ns>ns1</wa:ns>
</wa:map>
+
+ <wa:page>
+ <wa:url><wa:text>url</wa:text></wa:url>
+ <wa:title><wa:text>Title of this page</wa:text></wa:title>
+ <wa:plain>
+ <wa:textbox>
+ <wa:default>
+ <wa:xpath>
+
doc("classes/perfsonar/conf/configls.xml")//ns1:configuration/ns1:service[@name="SimpleService"]/ns1:lookupInformation/ns1:option[@name="accessPoint"]/@value
+ </wa:xpath>
+ </wa:default>
+ <wa:title><wa:text>Default
title</wa:text></wa:title>
+ </wa:textbox>
+ </wa:plain>
+ </wa:page>
-
<wa:page>
<wa:url><wa:text>basic</wa:text></wa:url>
<wa:title><wa:text>Title of this page</wa:text></wa:title>
Modified:
branches/new-structure-with-base2/ps-mdm-web-admin/tomcat/html/index.jsp
===================================================================
--- branches/new-structure-with-base2/ps-mdm-web-admin/tomcat/html/index.jsp
2009-12-23 13:16:12 UTC (rev 5431)
+++ branches/new-structure-with-base2/ps-mdm-web-admin/tomcat/html/index.jsp
2009-12-29 09:45:57 UTC (rev 5432)
@@ -1,4 +1,5 @@
<%@page
import="org.perfsonar.webadmin.base2.servlet.util.ConfigurationServletHelper"%>
+<%@page
import="org.perfsonar.webadmin.base2.config.HTMLGenerator"%>
<%@page
import="java.util.Enumeration"%>
<html>
<head>
@@ -7,55 +8,15 @@
<link rel="stylesheet" type="text/css" href="default.css"/>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<script src="Service_Admin.js"></script>
-
- <style type="text/css">
-
- <!--
-
- a {
- }
-
- .style3 {
- color: #8585c1;
- font-size: 13px;
- }
-
- .style3 a:link {
- color: #8585C1;
- cursor: pointer;
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 12px;
- }
-
- .style3 a:active {
- color: #117721;
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 12px;
- }
-
- .style3 a:visited {
- color: #8585C1;
- cursor: auto;
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 12px;
- /*font-weight: bold;*/
- }
-
-
- .style3 a:hover {
- color: #8585C1;
- cursor: pointer;
- text-decoration: underline;
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 12px;
- }
- -->
- </style>
</head>
<body>
<%
+ HTMLGenerator htmlGenerator=new HTMLGenerator();
org.perfsonar.webadmin.base2.config.ObjectMap map =
ConfigurationServletHelper.objectMap(getServletContext());
- String[] smallLinks
=org.perfsonar.webadmin.base2.config.HTMLGenerator.makeLinks(map,false);
+ String[] menuBasicLinks=htmlGenerator.getBasicLinks(map,false);
+ String[] menuAdvancedLinks=htmlGenerator.getAdvancedLinks(map,false);
+ String[] mainBasicLinks=htmlGenerator.getBasicLinks(map,true);
+ String[] mainAdvancedLinks=htmlGenerator.getAdvancedLinks(map,true);
%>
<div class="adminPanel">
Modified:
branches/new-structure-with-base2/ps-mdm-web-admin/tomcat/html/parts/sideBar.jsp
===================================================================
---
branches/new-structure-with-base2/ps-mdm-web-admin/tomcat/html/parts/sideBar.jsp
2009-12-23 13:16:12 UTC (rev 5431)
+++
branches/new-structure-with-base2/ps-mdm-web-admin/tomcat/html/parts/sideBar.jsp
2009-12-29 09:45:57 UTC (rev 5432)
@@ -9,24 +9,34 @@
</tr>
<tr>
<td>
- <p><span class="navtexheading">Basic <br>
- Configuration </span></p>
- <%
- out.println(smallLinks[0]);
- %>
+ <p>
+ <span class="navtexheading">
+ Basic Configuration
+ </span>
+ </p>
+ <%
+ for(String basicLink:menuBasicLinks){
+ out.println(basicLink);
+ }
+ %>
</td>
</tr>
<%
- if (smallLinks[1].equals("") == false) {
+ if (menuAdvancedLinks.length!=0) {
%>
<tr>
<td>
- <p><span class="navtexheading">Advanced <br>
- Configuration </span></p>
- <%
- out.println(smallLinks[1]);
- %>
+ <p>
+ <span class="navtexheading">
+ Advanced Configuration
+ </span>
+ </p>
+ <%
+ for(String advancedLink:menuAdvancedLinks){
+ out.println(advancedLink);
+ }
+ %>
</td>
</tr>
<%
Modified:
branches/new-structure-with-base2/ps-mdm-web-admin/tomcat/html/parts/welcome.jsp
===================================================================
---
branches/new-structure-with-base2/ps-mdm-web-admin/tomcat/html/parts/welcome.jsp
2009-12-23 13:16:12 UTC (rev 5431)
+++
branches/new-structure-with-base2/ps-mdm-web-admin/tomcat/html/parts/welcome.jsp
2009-12-29 09:45:57 UTC (rev 5432)
@@ -21,12 +21,11 @@
</td>
</tr>
- <%
-
String[] bigLinks =
-
org.perfsonar.webadmin.base2.config.
-
HTMLGenerator.makeLinks(map,true);
-
out.println(bigLinks[0]);
- %>
+ <%
+ for(String
basicLink:mainBasicLinks){
+
out.println(basicLink);
+ }
+ %>
<tr>
<td >
@@ -62,10 +61,10 @@
</tr>
</table>
</td>
- <%
- if(
bigLinks[1].equals("") == false )
- {
- %>
+
+ <%
+ if( mainAdvancedLinks.length
!= 0 ){
+ %>
<td>
<table width="0" border="0" cellpadding="0"
cellspacing="0" background="graphics/step_2_slice.gif" class="contenttable">
<tr>
@@ -73,9 +72,11 @@
<img src="graphics/step_2_top.gif"
width="350" height="118">
</td>
</tr>
- <%
-
out.println(bigLinks[1]);
- %>
+ <%
+ for(String
mainAdvancedLink:mainAdvancedLinks){
+
out.println(mainAdvancedLink);
+ }
+ %>
<tr>
<td>
@@ -84,9 +85,9 @@
</tr>
</table>
</td>
- <%
- }
- %>
+ <%
+ }
+ %>
</tr>
<%
if( map.needSync() )
- perfsonar: r5432 - in branches/new-structure-with-base2/ps-mdm-web-admin: ant src/main/java/org/perfsonar/webadmin/base2/config src/main/java/org/perfsonar/webadmin/base2/waschema/v20090201/impl tomcat/classes/perfsonar/conf tomcat/html tomcat/html/parts, svnlog, 12/29/2009
Archive powered by MHonArc 2.6.16.