Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2010-05-13 08:36:11 +0000
committerEike Stepper2010-05-13 08:36:11 +0000
commitcd5569b469b0869e3870b297df31d31d029c857e (patch)
treec3a459c4a6216e643ba75bd76c726feec0386aa2 /plugins
parentd67a03d88f19c6b08a180393bbcc562e63fd3060 (diff)
downloadcdo-cd5569b469b0869e3870b297df31d31d029c857e.tar.gz
cdo-cd5569b469b0869e3870b297df31d31d029c857e.tar.xz
cdo-cd5569b469b0869e3870b297df31d31d029c857e.zip
vserver
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.server/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.server/src-gen/templates/ConfigOverview.java36
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.server/src-gen/templates/RequestForm.java40
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/AbstractTemplateServlet.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/ConfigOverviewServlet.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/RequestFormServlet.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.server/templates/configOverview.htmljet16
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.server/templates/requestForm.htmljet22
-rw-r--r--plugins/org.gastro.server.web/build.properties3
9 files changed, 23 insertions, 105 deletions
diff --git a/plugins/org.eclipse.emf.cdo.examples.server/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.examples.server/META-INF/MANIFEST.MF
index 99d872e744..cd007456ba 100644
--- a/plugins/org.eclipse.emf.cdo.examples.server/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.examples.server/META-INF/MANIFEST.MF
@@ -17,7 +17,8 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
org.eclipse.equinox.http.registry;bundle-version="[1.0.0,2.0.0)",
org.eclipse.equinox.http.servlet;bundle-version="[1.0.0,2.0.0)",
org.eclipse.equinox.http.jetty;bundle-version="[2.0.0,4.0.0)"
-Export-Package: org.eclipse.emf.cdo.examples.server;version="3.0.0"
+Export-Package: org.eclipse.emf.cdo.examples.server;version="3.0.0",
+ templates;version="3.0.0";x-internal:=true
Import-Package: org.h2.jdbcx;version="[1.1.0,1.2.0)",
javax.servlet;version="[2.5.0,2.6.0)",
javax.servlet.http;version="[2.5.0,2.6.0)",
diff --git a/plugins/org.eclipse.emf.cdo.examples.server/src-gen/templates/ConfigOverview.java b/plugins/org.eclipse.emf.cdo.examples.server/src-gen/templates/ConfigOverview.java
index 0875b2270b..73dbfd80c1 100644
--- a/plugins/org.eclipse.emf.cdo.examples.server/src-gen/templates/ConfigOverview.java
+++ b/plugins/org.eclipse.emf.cdo.examples.server/src-gen/templates/ConfigOverview.java
@@ -17,45 +17,21 @@ public class ConfigOverview
protected final String TEXT_1 = "";
protected final String TEXT_2 = NL + NL + "<html>" + NL + " <header>" + NL + "\t <title>" + NL + "\t\t\t";
protected final String TEXT_3 = NL + "\t </title>" + NL + "\t\t<link media=\"screen\" href=\"gastro.css\" type=\"text/css\" rel=\"stylesheet\">" + NL + "\t<header>" + NL + "<body>" + NL + "" + NL + "<h1>";
- protected final String TEXT_4 = "</h1>" + NL + "<table border=\"0\" width=\"400\">";
- protected final String TEXT_5 = NL + "\t<tr><td colspan=\"3\"><h2>";
- protected final String TEXT_6 = "</h2></td></tr>" + NL + "\t<tr><td colspan=\"3\"><h4>";
- protected final String TEXT_7 = "</h4></td></tr>" + NL + "\t";
- protected final String TEXT_8 = NL + "\t\t<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td colspan=\"2\"><h3>";
- protected final String TEXT_9 = "</h3></td></tr>" + NL + "\t\t<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>";
- protected final String TEXT_10 = "</td>" + NL + "\t\t\t\t\t<td align=\"right\" valign=\"bottom\" width=\"80\">";
- protected final String TEXT_11 = " </td></tr>" + NL + "\t";
- protected final String TEXT_12 = NL + "</table>" + NL + "" + NL + "</body>" + NL + "</html>";
- protected final String TEXT_13 = NL;
+ protected final String TEXT_4 = "</h1>" + NL + "<table border=\"0\" width=\"400\">" + NL + "</table>" + NL + "" + NL + "</body>" + NL + "</html>";
+ protected final String TEXT_5 = NL;
public String generate(Object argument)
{
final StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append(TEXT_1);
- MenuCard menuCard = (MenuCard)argument;
+ DemoConfiguration config = (DemoConfiguration)argument;
+ String title = "Demo Configuration " + AbstractTemplateServlet.html(config.getName());
stringBuffer.append(TEXT_2);
- stringBuffer.append(GastroServlet.html(menuCard.getTitle()));
+ stringBuffer.append(title);
stringBuffer.append(TEXT_3);
- stringBuffer.append(GastroServlet.html(menuCard.getTitle()));
+ stringBuffer.append(title);
stringBuffer.append(TEXT_4);
- for (Section section : menuCard.getSections()) {
stringBuffer.append(TEXT_5);
- stringBuffer.append(GastroServlet.html(section.getTitle()));
- stringBuffer.append(TEXT_6);
- stringBuffer.append(GastroServlet.html(section.getText()));
- stringBuffer.append(TEXT_7);
- for (Offering offering : section.getOfferings()) {
- stringBuffer.append(TEXT_8);
- stringBuffer.append(GastroServlet.html(offering.getName()));
- stringBuffer.append(TEXT_9);
- stringBuffer.append(GastroServlet.html(offering.getDescription()));
- stringBuffer.append(TEXT_10);
- stringBuffer.append(GastroServlet.html(offering.getPrice()));
- stringBuffer.append(TEXT_11);
- }
- }
- stringBuffer.append(TEXT_12);
- stringBuffer.append(TEXT_13);
return stringBuffer.toString();
}
}
diff --git a/plugins/org.eclipse.emf.cdo.examples.server/src-gen/templates/RequestForm.java b/plugins/org.eclipse.emf.cdo.examples.server/src-gen/templates/RequestForm.java
index 2b0f1e8137..89cccf1b95 100644
--- a/plugins/org.eclipse.emf.cdo.examples.server/src-gen/templates/RequestForm.java
+++ b/plugins/org.eclipse.emf.cdo.examples.server/src-gen/templates/RequestForm.java
@@ -1,7 +1,5 @@
package templates;
-import org.eclipse.emf.cdo.examples.server.*;
-
public class RequestForm
{
protected static String nl;
@@ -14,48 +12,14 @@ public class RequestForm
}
public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
- protected final String TEXT_1 = "";
- protected final String TEXT_2 = NL + NL + "<html>" + NL + " <header>" + NL + "\t <title>" + NL + "\t\t\t";
- protected final String TEXT_3 = NL + "\t </title>" + NL + "\t\t<link media=\"screen\" href=\"gastro.css\" type=\"text/css\" rel=\"stylesheet\">" + NL + "\t<header>" + NL + "<body>" + NL + "" + NL + "<h1>";
- protected final String TEXT_4 = "</h1>" + NL + "<table border=\"0\" width=\"400\">";
- protected final String TEXT_5 = NL + "\t<tr><td colspan=\"3\"><h2>";
- protected final String TEXT_6 = "</h2></td></tr>" + NL + "\t<tr><td colspan=\"3\"><h4>";
- protected final String TEXT_7 = "</h4></td></tr>" + NL + "\t";
- protected final String TEXT_8 = NL + "\t\t<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td colspan=\"2\"><h3>";
- protected final String TEXT_9 = "</h3></td></tr>" + NL + "\t\t<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>";
- protected final String TEXT_10 = "</td>" + NL + "\t\t\t\t\t<td align=\"right\" valign=\"bottom\" width=\"80\">";
- protected final String TEXT_11 = " </td></tr>" + NL + "\t";
- protected final String TEXT_12 = NL + "</table>" + NL + "" + NL + "</body>" + NL + "</html>";
- protected final String TEXT_13 = NL;
+ protected final String TEXT_1 = NL + "<html>" + NL + " <header>" + NL + "\t <title>" + NL + "\t\t\tDemo Request Form" + NL + "\t </title>" + NL + "\t\t<link media=\"screen\" href=\"demo-server.css\" type=\"text/css\" rel=\"stylesheet\">" + NL + "\t<header>" + NL + "<body>" + NL + "" + NL + "<h1>Demo Request Form</h1>" + NL + "" + NL + "</body>" + NL + "</html>";
+ protected final String TEXT_2 = NL;
public String generate(Object argument)
{
final StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append(TEXT_1);
- MenuCard menuCard = (MenuCard)argument;
stringBuffer.append(TEXT_2);
- stringBuffer.append(GastroServlet.html(menuCard.getTitle()));
- stringBuffer.append(TEXT_3);
- stringBuffer.append(GastroServlet.html(menuCard.getTitle()));
- stringBuffer.append(TEXT_4);
- for (Section section : menuCard.getSections()) {
- stringBuffer.append(TEXT_5);
- stringBuffer.append(GastroServlet.html(section.getTitle()));
- stringBuffer.append(TEXT_6);
- stringBuffer.append(GastroServlet.html(section.getText()));
- stringBuffer.append(TEXT_7);
- for (Offering offering : section.getOfferings()) {
- stringBuffer.append(TEXT_8);
- stringBuffer.append(GastroServlet.html(offering.getName()));
- stringBuffer.append(TEXT_9);
- stringBuffer.append(GastroServlet.html(offering.getDescription()));
- stringBuffer.append(TEXT_10);
- stringBuffer.append(GastroServlet.html(offering.getPrice()));
- stringBuffer.append(TEXT_11);
- }
- }
- stringBuffer.append(TEXT_12);
- stringBuffer.append(TEXT_13);
return stringBuffer.toString();
}
}
diff --git a/plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/AbstractTemplateServlet.java b/plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/AbstractTemplateServlet.java
index 3684dedf62..b55a5141f2 100644
--- a/plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/AbstractTemplateServlet.java
+++ b/plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/AbstractTemplateServlet.java
@@ -75,7 +75,7 @@ public abstract class AbstractTemplateServlet extends HttpServlet
try
{
- Object argument = getTemplateArgument(req);
+ Object argument = createTemplateArgument(req);
String html = (String)method.invoke(template, argument);
writer.print(html);
}
@@ -105,7 +105,7 @@ public abstract class AbstractTemplateServlet extends HttpServlet
{
}
- protected abstract Object getTemplateArgument(HttpServletRequest req);
+ protected abstract Object createTemplateArgument(HttpServletRequest req);
public static String html(String value)
{
diff --git a/plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/ConfigOverviewServlet.java b/plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/ConfigOverviewServlet.java
index 62a5d970e6..80207eeb56 100644
--- a/plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/ConfigOverviewServlet.java
+++ b/plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/ConfigOverviewServlet.java
@@ -31,7 +31,7 @@ public class ConfigOverviewServlet extends AbstractTemplateServlet
}
@Override
- protected Object getTemplateArgument(HttpServletRequest req)
+ protected Object createTemplateArgument(HttpServletRequest req)
{
return null;
}
diff --git a/plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/RequestFormServlet.java b/plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/RequestFormServlet.java
index 3da6c0aa19..1f4802bae4 100644
--- a/plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/RequestFormServlet.java
+++ b/plugins/org.eclipse.emf.cdo.examples.server/src/org/eclipse/emf/cdo/examples/server/RequestFormServlet.java
@@ -31,7 +31,7 @@ public class RequestFormServlet extends AbstractTemplateServlet
}
@Override
- protected Object getTemplateArgument(HttpServletRequest req)
+ protected Object createTemplateArgument(HttpServletRequest req)
{
return null;
}
diff --git a/plugins/org.eclipse.emf.cdo.examples.server/templates/configOverview.htmljet b/plugins/org.eclipse.emf.cdo.examples.server/templates/configOverview.htmljet
index 7180b6efc0..83f8c1cefe 100644
--- a/plugins/org.eclipse.emf.cdo.examples.server/templates/configOverview.htmljet
+++ b/plugins/org.eclipse.emf.cdo.examples.server/templates/configOverview.htmljet
@@ -3,28 +3,20 @@
package="templates"
imports="org.eclipse.emf.cdo.examples.server.*" %>
-<% MenuCard menuCard = (MenuCard)argument; %>
+<% DemoConfiguration config = (DemoConfiguration)argument; %>
+<% String title = "Demo Configuration " + AbstractTemplateServlet.html(config.getName()); %>
<html>
<header>
<title>
- <%=GastroServlet.html(menuCard.getTitle())%>
+ <%=title%>
</title>
<link media="screen" href="gastro.css" type="text/css" rel="stylesheet">
<header>
<body>
-<h1><%=GastroServlet.html(menuCard.getTitle())%></h1>
+<h1><%=title%></h1>
<table border="0" width="400">
-<%for (Section section : menuCard.getSections()) {%>
- <tr><td colspan="3"><h2><%=GastroServlet.html(section.getTitle())%></h2></td></tr>
- <tr><td colspan="3"><h4><%=GastroServlet.html(section.getText())%></h4></td></tr>
- <%for (Offering offering : section.getOfferings()) {%>
- <tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td colspan="2"><h3><%=GastroServlet.html(offering.getName())%></h3></td></tr>
- <tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><%=GastroServlet.html(offering.getDescription())%></td>
- <td align="right" valign="bottom" width="80"><%=GastroServlet.html(offering.getPrice())%> </td></tr>
- <%}%>
-<%}%>
</table>
</body>
diff --git a/plugins/org.eclipse.emf.cdo.examples.server/templates/requestForm.htmljet b/plugins/org.eclipse.emf.cdo.examples.server/templates/requestForm.htmljet
index 52c0e87609..0e7350a8fe 100644
--- a/plugins/org.eclipse.emf.cdo.examples.server/templates/requestForm.htmljet
+++ b/plugins/org.eclipse.emf.cdo.examples.server/templates/requestForm.htmljet
@@ -1,31 +1,17 @@
<%@ jet
class="RequestForm"
- package="templates"
- imports="org.eclipse.emf.cdo.examples.server.*" %>
-
-<% MenuCard menuCard = (MenuCard)argument; %>
+ package="templates" %>
<html>
<header>
<title>
- <%=GastroServlet.html(menuCard.getTitle())%>
+ Demo Request Form
</title>
- <link media="screen" href="gastro.css" type="text/css" rel="stylesheet">
+ <link media="screen" href="demo-server.css" type="text/css" rel="stylesheet">
<header>
<body>
-<h1><%=GastroServlet.html(menuCard.getTitle())%></h1>
-<table border="0" width="400">
-<%for (Section section : menuCard.getSections()) {%>
- <tr><td colspan="3"><h2><%=GastroServlet.html(section.getTitle())%></h2></td></tr>
- <tr><td colspan="3"><h4><%=GastroServlet.html(section.getText())%></h4></td></tr>
- <%for (Offering offering : section.getOfferings()) {%>
- <tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td colspan="2"><h3><%=GastroServlet.html(offering.getName())%></h3></td></tr>
- <tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><%=GastroServlet.html(offering.getDescription())%></td>
- <td align="right" valign="bottom" width="80"><%=GastroServlet.html(offering.getPrice())%> </td></tr>
- <%}%>
-<%}%>
-</table>
+<h1>Demo Request Form</h1>
</body>
</html>
diff --git a/plugins/org.gastro.server.web/build.properties b/plugins/org.gastro.server.web/build.properties
index 35731fcca7..dd4685d6ef 100644
--- a/plugins/org.gastro.server.web/build.properties
+++ b/plugins/org.gastro.server.web/build.properties
@@ -17,7 +17,6 @@ bin.includes = META-INF/,\
plugin.xml,\
gastro.css,\
copyright.txt,\
- about.html,\
- CommonsLang.README
+ about.html
src.includes = about.html,\
copyright.txt

Back to the top