From bdd0a41aed7edf21ec2a65cfa17a86af2ef8c48a Mon Sep 17 00:00:00 2001 From: dims Date: Tue, 17 Jun 2008 00:23:01 +0000 Subject: Move Tuscany from Incubator to top level. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@668359 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/webapp/jsp/DASMenu.jsp | 63 +++++++++++ .../src/main/webapp/jsp/converter.jsp | 117 ++++++++++++++++++++ .../src/main/webapp/jsp/default.css | 35 ++++++ .../src/main/webapp/jsp/indexAdhoc.jsp | 87 +++++++++++++++ .../src/main/webapp/jsp/indexCommand.jsp | 85 +++++++++++++++ .../sample-ajax-das/src/main/webapp/jsp/main.css | 120 +++++++++++++++++++++ .../sample-ajax-das/src/main/webapp/jsp/occ.jsp | 77 +++++++++++++ .../sample-ajax-das/src/main/webapp/jsp/rss.jsp | 78 ++++++++++++++ 8 files changed, 662 insertions(+) create mode 100644 tags/java/das/1.0-incubating-beta1-rc4/samples/sample-ajax-das/src/main/webapp/jsp/DASMenu.jsp create mode 100644 tags/java/das/1.0-incubating-beta1-rc4/samples/sample-ajax-das/src/main/webapp/jsp/converter.jsp create mode 100644 tags/java/das/1.0-incubating-beta1-rc4/samples/sample-ajax-das/src/main/webapp/jsp/default.css create mode 100644 tags/java/das/1.0-incubating-beta1-rc4/samples/sample-ajax-das/src/main/webapp/jsp/indexAdhoc.jsp create mode 100644 tags/java/das/1.0-incubating-beta1-rc4/samples/sample-ajax-das/src/main/webapp/jsp/indexCommand.jsp create mode 100644 tags/java/das/1.0-incubating-beta1-rc4/samples/sample-ajax-das/src/main/webapp/jsp/main.css create mode 100644 tags/java/das/1.0-incubating-beta1-rc4/samples/sample-ajax-das/src/main/webapp/jsp/occ.jsp create mode 100644 tags/java/das/1.0-incubating-beta1-rc4/samples/sample-ajax-das/src/main/webapp/jsp/rss.jsp (limited to 'tags/java/das/1.0-incubating-beta1-rc4/samples/sample-ajax-das/src/main/webapp/jsp') diff --git a/tags/java/das/1.0-incubating-beta1-rc4/samples/sample-ajax-das/src/main/webapp/jsp/DASMenu.jsp b/tags/java/das/1.0-incubating-beta1-rc4/samples/sample-ajax-das/src/main/webapp/jsp/DASMenu.jsp new file mode 100644 index 0000000000..041e05c8bb --- /dev/null +++ b/tags/java/das/1.0-incubating-beta1-rc4/samples/sample-ajax-das/src/main/webapp/jsp/DASMenu.jsp @@ -0,0 +1,63 @@ + + + + + + + + DASMenu: Web Sample + + + + + + +

Tuscany DAS Web Sample

+ +

Tuscany DAS web sample demonstrates - simple adhoc queries, DAS predefined commands execution and + some advanced features like Optimistic Concurrency Control (OCC), Converter, Result Set Shape etc. +

+

Check more details by navigating menu. + Press Refresh! button anytime for database refresh. +

+ +
+ + + + + + +
+ + \ No newline at end of file diff --git a/tags/java/das/1.0-incubating-beta1-rc4/samples/sample-ajax-das/src/main/webapp/jsp/converter.jsp b/tags/java/das/1.0-incubating-beta1-rc4/samples/sample-ajax-das/src/main/webapp/jsp/converter.jsp new file mode 100644 index 0000000000..a3610e7639 --- /dev/null +++ b/tags/java/das/1.0-incubating-beta1-rc4/samples/sample-ajax-das/src/main/webapp/jsp/converter.jsp @@ -0,0 +1,117 @@ + + +<%-- + * Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + --%> + +<%-- JSTL tags --%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> + + + + + + + + + + + +<%@ page import="java.util.*" %> + + + +
+ + + + + + + +Arbitrary Converter: + The column converted is a VARCAHAR. + ResultSetShape is used to specify that the property will be a SDODataTypes.DATE. + So this example uses a converter that transforms a string column into a date property + and conversely, a date property back to a string for the underlying column. +
+ The converter returns 1957.09.27 if the column value is "Pavick" and 1966.12.20 if + the value is "Williams" +
+ On write, the converter returns "Williams" if the property value is 1966.12.20 and "Pavick" + if the property value is 1957.09.27 +
+ Check using direct database connection that the database table rows's column values are + either "Williams" or "Pavick". +
+
+ +Select * from CUSTOMER where ID = 1; +
+ +Check First Customer's LastName is 1957.09.27 +
+ +Set First Customer's LastName to 1966.12.20 +
+ +Check First Customer's LastName is 1966.12.20 +
+ + +    + + +
+ + + +
 
+
+ + +
+ +
+ + + diff --git a/tags/java/das/1.0-incubating-beta1-rc4/samples/sample-ajax-das/src/main/webapp/jsp/default.css b/tags/java/das/1.0-incubating-beta1-rc4/samples/sample-ajax-das/src/main/webapp/jsp/default.css new file mode 100644 index 0000000000..5680fab9ed --- /dev/null +++ b/tags/java/das/1.0-incubating-beta1-rc4/samples/sample-ajax-das/src/main/webapp/jsp/default.css @@ -0,0 +1,35 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +BODY {BACKGROUND-COLOR: #FFFFFF; COLOR: #333366; FONT-FAMILY: 'Times New Roman'} +H1 {COLOR: #6666CC; FONT-FAMILY: 'Times New Roman'; TEXT-TRANSFORM: capitalize } +H2 {COLOR: #6666CC; FONT-FAMILY: 'Times New Roman'; TEXT-TRANSFORM: capitalize } +H3 {COLOR: #6666CC; FONT-FAMILY: 'Times New Roman'; TEXT-TRANSFORM: capitalize } +H4 {COLOR: #6666CC; FONT-FAMILY: 'Times New Roman'; TEXT-TRANSFORM: capitalize } +H5 {COLOR: #6666CC; FONT-FAMILY: 'Times New Roman'; TEXT-TRANSFORM: capitalize } +H6 {COLOR: #6666CC; FONT-FAMILY: 'Times New Roman'; TEXT-TRANSFORM: capitalize } +TH {COLOR: #000000; font-weight: bold } + +#TRowEven {background-color: #ccff99} +#TRowOdd {background-color: #ffffcc} + +A:link {cursor:hand; color: #3300FF; text-decoration: none;} +A:visited {cursor:hand; color: #3300FF; text-decoration: none; } +A:active {cursor:hand; color:#FEAA02; text-decoration: none;} +A:hover {cursor:hand; color:#FEAA02;} diff --git a/tags/java/das/1.0-incubating-beta1-rc4/samples/sample-ajax-das/src/main/webapp/jsp/indexAdhoc.jsp b/tags/java/das/1.0-incubating-beta1-rc4/samples/sample-ajax-das/src/main/webapp/jsp/indexAdhoc.jsp new file mode 100644 index 0000000000..f212d744f1 --- /dev/null +++ b/tags/java/das/1.0-incubating-beta1-rc4/samples/sample-ajax-das/src/main/webapp/jsp/indexAdhoc.jsp @@ -0,0 +1,87 @@ + + +<%-- + * Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + --%> + +<%-- JSTL tags --%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> + + + + + + + + + + + +<%@ page import="java.util.*" %> + + + +
+ + + + + + + +Adhoc SQL Query:
+ +    + + +
+ + + +
 
+
+ +
+ +
+ + + diff --git a/tags/java/das/1.0-incubating-beta1-rc4/samples/sample-ajax-das/src/main/webapp/jsp/indexCommand.jsp b/tags/java/das/1.0-incubating-beta1-rc4/samples/sample-ajax-das/src/main/webapp/jsp/indexCommand.jsp new file mode 100644 index 0000000000..55dcb56e38 --- /dev/null +++ b/tags/java/das/1.0-incubating-beta1-rc4/samples/sample-ajax-das/src/main/webapp/jsp/indexCommand.jsp @@ -0,0 +1,85 @@ + + +<%-- + * Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + --%> + +<%-- JSTL tags --%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> + + + + + + + + + + + +<%@ page import="java.util.*" %> + + + +
+ + + + + + + +DAS Command: + + + + + + +
+ + +
 
+
+ +
+ +
+ + + diff --git a/tags/java/das/1.0-incubating-beta1-rc4/samples/sample-ajax-das/src/main/webapp/jsp/main.css b/tags/java/das/1.0-incubating-beta1-rc4/samples/sample-ajax-das/src/main/webapp/jsp/main.css new file mode 100644 index 0000000000..264facc985 --- /dev/null +++ b/tags/java/das/1.0-incubating-beta1-rc4/samples/sample-ajax-das/src/main/webapp/jsp/main.css @@ -0,0 +1,120 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +body +{ + margin: 0px; + border: 0px; + padding: 0px; + font-family: Verdana, Arial, Sans-Serif; + font-size: 0px; +} + +img +{ + border: none 0px #ffffff; +} + +h1 +{ + background-color: #ffcc00; + border-bottom: solid 1px #333333; + padding: 5px; + margin: 0px; + font-size: x-large; +} + +h2 +{ + font-size: large; +} + +p +{ + font-size: small; +} + +/* Real menu */ +ul, li +{ + font-size: small; + margin-top: 0px; + margin-right: 0px; + margin-bottom: 0px; + display: block; +} + +ul +{ + width: 130px; + border: solid 1px #333333; + border-top: solid 5px #333333; + border-right: solid 2px #333333; + padding: 0px; +} + +li ul +{ + display: none; + position: absolute; + margin-left: 100px; + margin-top: -20px; +} + +li a +{ + padding: 2px; + text-decoration: none; + color: #000000; + background-color: #ffffee; + width: 100%; + display: block; + border-bottom: dashed 1px #333333; + text-indent: 2px; + font-size: small; +} + +li a:hover +{ + background-color: #ffcc00; + font-weight: bold; + border-bottom: solid 1px #333333; +} + +li +{ + float: left; + width: 98%; +} + +a.hassubmenu +{ + background-image: url(../img/lay_dmnuhassub.gif); + background-repeat: no-repeat; + background-position: 120px 7px; +} + +#mainmenu +{ + margin: 10px; + margin-left: 5px; + float: left; + border-bottom: solid 2px #333333; + margin-bottom: 100%; +} \ No newline at end of file diff --git a/tags/java/das/1.0-incubating-beta1-rc4/samples/sample-ajax-das/src/main/webapp/jsp/occ.jsp b/tags/java/das/1.0-incubating-beta1-rc4/samples/sample-ajax-das/src/main/webapp/jsp/occ.jsp new file mode 100644 index 0000000000..ed5a7ee0c1 --- /dev/null +++ b/tags/java/das/1.0-incubating-beta1-rc4/samples/sample-ajax-das/src/main/webapp/jsp/occ.jsp @@ -0,0 +1,77 @@ + + +<%-- + * Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + --%> + +<%-- JSTL tags --%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> + + + + + + + + + + + +<%@ page import="java.util.*" %> + + + +
+ + + + + + + +Automatic Optimistic Concurrency Control: + Try to modify same column in same database table row twice in one transaction. +
+ + +    + + +
+ + + +
 
+
+ +
+ +
+ + + diff --git a/tags/java/das/1.0-incubating-beta1-rc4/samples/sample-ajax-das/src/main/webapp/jsp/rss.jsp b/tags/java/das/1.0-incubating-beta1-rc4/samples/sample-ajax-das/src/main/webapp/jsp/rss.jsp new file mode 100644 index 0000000000..2d217d68b3 --- /dev/null +++ b/tags/java/das/1.0-incubating-beta1-rc4/samples/sample-ajax-das/src/main/webapp/jsp/rss.jsp @@ -0,0 +1,78 @@ + + +<%-- + * Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + --%> + +<%-- JSTL tags --%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> + + + + + + + + + + + +<%@ page import="java.util.*" %> + + + +
+ + + + + + + +Result Set Shape: + DAS has ability to specify format(shape) of the ResultSet. This is necessary + when the JDBC driver in use does not provide adequate support for ResultSetMetadata. + Also, we expect that specifying the result set shape will increase performance. +
+
+ +(Select 99, 'Roosevelt', '1600 Pennsylvania Avenue' from customer) + +    + + +
+ + + +
 
+
+ +
+ +
+ + + -- cgit v1.2.3