summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaspar De Groot2011-11-10 03:53:58 (EST)
committerCaspar De Groot2011-11-10 03:53:58 (EST)
commitb0a0f5730fc52573b1c16d4929aea1cf40f59122 (patch)
treee0d3a023acdd026f71c21c2376999949ebd4c359
parent7cd4c750a02aaa4c8885230530f5ef0385b6f919 (diff)
downloadcdo-b0a0f5730fc52573b1c16d4929aea1cf40f59122.zip
cdo-b0a0f5730fc52573b1c16d4929aea1cf40f59122.tar.gz
cdo-b0a0f5730fc52573b1c16d4929aea1cf40f59122.tar.bz2
Revert "Removed src-gen/ folder contents from source control"
-rw-r--r--plugins/org.gastro.server.web/src-gen/.gitignore1
-rw-r--r--plugins/org.gastro.server.web/src-gen/templates/MenuCardTemplate.java62
2 files changed, 62 insertions, 1 deletions
diff --git a/plugins/org.gastro.server.web/src-gen/.gitignore b/plugins/org.gastro.server.web/src-gen/.gitignore
deleted file mode 100644
index 72e8ffc..0000000
--- a/plugins/org.gastro.server.web/src-gen/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*
diff --git a/plugins/org.gastro.server.web/src-gen/templates/MenuCardTemplate.java b/plugins/org.gastro.server.web/src-gen/templates/MenuCardTemplate.java
new file mode 100644
index 0000000..bab6834
--- /dev/null
+++ b/plugins/org.gastro.server.web/src-gen/templates/MenuCardTemplate.java
@@ -0,0 +1,62 @@
+package templates;
+
+import org.gastro.inventory.*;
+import org.gastro.server.internal.web.*;
+
+public class MenuCardTemplate
+{
+ protected static String nl;
+ public static synchronized MenuCardTemplate create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ MenuCardTemplate result = new MenuCardTemplate();
+ nl = null;
+ return result;
+ }
+
+ 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;
+
+ 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();
+ }
+}