You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by zo...@apache.org on 2011/02/27 19:28:41 UTC
svn commit: r1075106 [2/18] - in /aries/tags/samples-0.1-incubating: ./
ariestrader/ ariestrader/assemblies/
ariestrader/assemblies/ariestrader-all-eba/
ariestrader/assemblies/ariestrader-jdbc-eba/
ariestrader/assemblies/equinox-test-harness/ ariestrad...
Added: aries/tags/samples-0.1-incubating/ariestrader/LICENSE
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/ariestrader/LICENSE?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/ariestrader/LICENSE (added)
+++ aries/tags/samples-0.1-incubating/ariestrader/LICENSE Sun Feb 27 18:28:26 2011
@@ -0,0 +1,203 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ 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.
+
Added: aries/tags/samples-0.1-incubating/ariestrader/NOTICE
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/ariestrader/NOTICE?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/ariestrader/NOTICE (added)
+++ aries/tags/samples-0.1-incubating/ariestrader/NOTICE Sun Feb 27 18:28:26 2011
@@ -0,0 +1,9 @@
+Apache Aries
+Copyright 2009-2010 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+Portions of this software were developed at IBM and donated to the
+ASF under the Apache 2.0 license. The former work was referred to
+as Trade 6.
Added: aries/tags/samples-0.1-incubating/ariestrader/assemblies/ariestrader-all-eba/pom.xml
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/ariestrader/assemblies/ariestrader-all-eba/pom.xml?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/ariestrader/assemblies/ariestrader-all-eba/pom.xml (added)
+++ aries/tags/samples-0.1-incubating/ariestrader/assemblies/ariestrader-all-eba/pom.xml Sun Feb 27 18:28:26 2011
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.aries.samples.ariestrader</groupId>
+ <artifactId>assemblies</artifactId>
+ <version>0.1-incubating</version>
+ </parent>
+
+ <groupId>org.apache.aries.samples.ariestrader</groupId>
+ <artifactId>org.apache.aries.samples.ariestrader.all</artifactId>
+ <packaging>eba</packaging>
+ <name>AriesTrader :: Assemblies - EBA - ALL</name>
+ <description>An EBA version of AriesTrader ALL</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.aries.samples.ariestrader</groupId>
+ <artifactId>org.apache.aries.samples.ariestrader.util</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.samples.ariestrader</groupId>
+ <artifactId>org.apache.aries.samples.ariestrader.core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.samples.ariestrader</groupId>
+ <artifactId>org.apache.aries.samples.ariestrader.api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.samples.ariestrader</groupId>
+ <artifactId>org.apache.aries.samples.ariestrader.web</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.samples.ariestrader</groupId>
+ <artifactId>org.apache.aries.samples.ariestrader.beans</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.samples.ariestrader</groupId>
+ <artifactId>org.apache.aries.samples.ariestrader.persist.jdbc</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.samples.ariestrader</groupId>
+ <artifactId>org.apache.aries.samples.ariestrader.entities</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.samples.ariestrader</groupId>
+ <artifactId>org.apache.aries.samples.ariestrader.persist.jpa.am</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.samples.ariestrader</groupId>
+ <artifactId>org.apache.aries.samples.ariestrader.persist.jpa.cm</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.aries</groupId>
+ <artifactId>eba-maven-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <generateManifest>true</generateManifest>
+ <instructions>
+ <Application-SymbolicName>${pom.artifactId}</Application-SymbolicName>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: aries/tags/samples-0.1-incubating/ariestrader/assemblies/ariestrader-jdbc-eba/pom.xml
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/ariestrader/assemblies/ariestrader-jdbc-eba/pom.xml?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/ariestrader/assemblies/ariestrader-jdbc-eba/pom.xml (added)
+++ aries/tags/samples-0.1-incubating/ariestrader/assemblies/ariestrader-jdbc-eba/pom.xml Sun Feb 27 18:28:26 2011
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.aries.samples.ariestrader</groupId>
+ <artifactId>assemblies</artifactId>
+ <version>0.1-incubating</version>
+ </parent>
+
+ <groupId>org.apache.aries.samples.ariestrader</groupId>
+ <artifactId>org.apache.aries.samples.ariestrader.jdbc</artifactId>
+ <packaging>eba</packaging>
+ <name>AriesTrader :: Assemblies - EBA - JDBC</name>
+ <description>An EBA version of AriesTrader JDBC</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.aries.samples.ariestrader</groupId>
+ <artifactId>org.apache.aries.samples.ariestrader.util</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.samples.ariestrader</groupId>
+ <artifactId>org.apache.aries.samples.ariestrader.core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.samples.ariestrader</groupId>
+ <artifactId>org.apache.aries.samples.ariestrader.api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.samples.ariestrader</groupId>
+ <artifactId>org.apache.aries.samples.ariestrader.beans</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.samples.ariestrader</groupId>
+ <artifactId>org.apache.aries.samples.ariestrader.persist.jdbc</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.samples.ariestrader</groupId>
+ <artifactId>org.apache.aries.samples.ariestrader.web</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.aries</groupId>
+ <artifactId>eba-maven-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <generateManifest>true</generateManifest>
+ <instructions>
+ <Application-SymbolicName>${pom.artifactId}</Application-SymbolicName>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: aries/tags/samples-0.1-incubating/ariestrader/assemblies/equinox-test-harness/pom.xml
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/ariestrader/assemblies/equinox-test-harness/pom.xml?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/ariestrader/assemblies/equinox-test-harness/pom.xml (added)
+++ aries/tags/samples-0.1-incubating/ariestrader/assemblies/equinox-test-harness/pom.xml Sun Feb 27 18:28:26 2011
@@ -0,0 +1,253 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.aries.samples.ariestrader</groupId>
+ <artifactId>assemblies</artifactId>
+ <version>0.1-incubating</version>
+ </parent>
+
+ <groupId>org.apache.aries.samples.ariestrader</groupId>
+ <artifactId>equinox-test-harness</artifactId>
+ <name>Equinox test harness that can be used to install sample EBAs</name>
+ <packaging>pom</packaging>
+
+ <dependencies>
+
+ <!--
+ External Dependencies
+ -->
+ <dependency>
+ <groupId>org.eclipse</groupId>
+ <artifactId>osgi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.equinox</groupId>
+ <artifactId>cm</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.osgi</groupId>
+ <artifactId>services</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.ops4j.pax.logging</groupId>
+ <artifactId>pax-logging-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.ops4j.pax.logging</groupId>
+ <artifactId>pax-logging-service</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.ops4j.pax.web</groupId>
+ <artifactId>pax-web-extender-war</artifactId>
+ <version>0.7.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.ops4j.pax.web</groupId>
+ <artifactId>pax-web-jetty-bundle</artifactId>
+ <version>0.7.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.ops4j.pax.web</groupId>
+ <artifactId>pax-web-jsp</artifactId>
+ <version>0.7.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.derby</groupId>
+ <artifactId>derby</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jpa_2.0_spec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jta_1.1_spec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.components</groupId>
+ <artifactId>geronimo-transaction</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.openjpa</groupId>
+ <artifactId>openjpa</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-pool</groupId>
+ <artifactId>commons-pool</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.servicemix.bundles</groupId>
+ <artifactId>org.apache.servicemix.bundles.serp</artifactId>
+ </dependency>
+<!--
+ <dependency>
+ <groupId>org.apache.servicemix.bundles</groupId>
+ <artifactId>org.apache.servicemix.bundles.cglib</artifactId>
+ </dependency>
+-->
+ <dependency>
+ <groupId>asm</groupId>
+ <artifactId>asm-all</artifactId>
+ <version>3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.fileinstall</artifactId>
+ </dependency>
+
+
+ <!--
+ Aries Dependencies
+ -->
+ <dependency>
+ <groupId>org.apache.aries.blueprint</groupId>
+ <artifactId>org.apache.aries.blueprint</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries</groupId>
+ <artifactId>org.apache.aries.util</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.jndi</groupId>
+ <artifactId>org.apache.aries.jndi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.jpa</groupId>
+ <artifactId>org.apache.aries.jpa.api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.jpa</groupId>
+ <artifactId>org.apache.aries.jpa.blueprint.aries</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.jpa</groupId>
+ <artifactId>org.apache.aries.jpa.container</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.jpa</groupId>
+ <artifactId>org.apache.aries.jpa.container.context</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.transaction</groupId>
+ <artifactId>org.apache.aries.transaction.blueprint</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.transaction</groupId>
+ <artifactId>org.apache.aries.transaction.manager</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.transaction</groupId>
+ <artifactId>org.apache.aries.transaction.wrappers</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.application</groupId>
+ <artifactId>org.apache.aries.application.install</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.application</groupId>
+ <artifactId>org.apache.aries.application.api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.application</groupId>
+ <artifactId>org.apache.aries.application.management</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.application</groupId>
+ <artifactId>org.apache.aries.application.runtime</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.application</groupId>
+ <artifactId>org.apache.aries.application.utils</artifactId>
+ </dependency>
+
+
+ <!--
+ Aries Trader Dependencies
+ -->
+ <dependency>
+ <groupId>org.apache.aries.samples.ariestrader</groupId>
+ <artifactId>org.apache.aries.samples.ariestrader.derby.ds</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.samples.ariestrader</groupId>
+ <artifactId>org.apache.aries.samples.ariestrader.all</artifactId>
+ <type>eba</type>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.samples.ariestrader</groupId>
+ <artifactId>org.apache.aries.samples.ariestrader.jdbc</artifactId>
+ <type>eba</type>
+ </dependency>
+ </dependencies>
+
+ <build>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <configuration>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </configuration>
+ <executions>
+ <execution>
+ <id>filter</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>resources</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy</id>
+ <phase>package</phase>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <configuration>
+ <excludeTransitive>true</excludeTransitive>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: aries/tags/samples-0.1-incubating/ariestrader/assemblies/equinox-test-harness/src/main/filtered-resources/configuration/config.ini
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/ariestrader/assemblies/equinox-test-harness/src/main/filtered-resources/configuration/config.ini?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/ariestrader/assemblies/equinox-test-harness/src/main/filtered-resources/configuration/config.ini (added)
+++ aries/tags/samples-0.1-incubating/ariestrader/assemblies/equinox-test-harness/src/main/filtered-resources/configuration/config.ini Sun Feb 27 18:28:26 2011
@@ -0,0 +1,210 @@
+# 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.
+
+osgi.bundles=\
+cm-3.2.0-v20070116.jar@start,\
+services-3.1.200-v20070605.jar@start,\
+asm-all-3.2.jar@start,\
+pax-logging-api-1.4.jar@start,\
+pax-logging-service-1.4.jar@start,\
+derby-10.5.3.0_1.jar@start,\
+commons-collections-3.2.1.jar@start,\
+commons-lang-2.5.jar@start,\
+commons-pool-1.5.4.jar@start,\
+org.apache.servicemix.bundles.serp-1.13.1_2.jar@start,\
+openjpa-${openjpaVersion}.jar@start,\
+geronimo-j2ee-connector_1.5_spec-2.0.0.jar@start,\
+geronimo-jpa_2.0_spec-1.0.jar@start,\
+geronimo-jta_1.1_spec-1.1.1.jar@start,\
+geronimo-transaction-2.1.3.jar@start,\
+pax-web-jetty-bundle-0.7.2.jar@start,\
+pax-web-extender-war-0.7.2.jar@start,\
+pax-web-jsp-0.7.2.jar@start,\
+org.apache.felix.fileinstall-2.0.8.jar@start,\
+org.apache.aries.application.install-${ariesApplicationVersion}.jar@start,\
+org.apache.aries.application.management-${ariesApplicationVersion}.jar@start,\
+org.apache.aries.application.api-${ariesApplicationVersion}.jar@start,\
+org.apache.aries.application.utils-${ariesApplicationVersion}.jar@start,\
+org.apache.aries.application.runtime-${ariesApplicationVersion}.jar@start,\
+org.apache.aries.jndi-${ariesJndiVersion}.jar@start,\
+org.apache.aries.jpa.api-${ariesJpaVersion}.jar@start,\
+org.apache.aries.jpa.blueprint.aries-${ariesJpaVersion}.jar@start,\
+org.apache.aries.jpa.container-${ariesJpaVersion}.jar@start,\
+org.apache.aries.jpa.container.context-${ariesJpaVersion}.jar@start,\
+org.apache.aries.util-${ariesUtilVersion}.jar@start,\
+org.apache.aries.blueprint-${ariesBlueprintVersion}.jar@start,\
+org.apache.aries.transaction.blueprint-${ariesTransactionVersion}.jar@start,\
+org.apache.aries.transaction.manager-${ariesTransactionVersion}.jar@start,\
+org.apache.aries.transaction.wrappers-${ariesTransactionVersion}.jar@start,\
+org.apache.aries.samples.ariestrader.derby.ds-${version}.jar@start
+eclipse.ignoreApp=true
+org.ops4j.pax.logging.DefaultServiceLog.level=DEBUG
+org.osgi.framework.system.packages=\
+javax.accessibility,\
+javax.activation,\
+javax.activity,\
+javax.annotation,\
+javax.annotation.processing,\
+javax.crypto,\
+javax.crypto.interfaces,\
+javax.crypto.spec,\
+javax.imageio,\
+javax.imageio.event,\
+javax.imageio.metadata,\
+javax.imageio.plugins.bmp,\
+javax.imageio.plugins.jpeg,\
+javax.imageio.spi,\
+javax.imageio.stream,\
+javax.jws,\
+javax.jws.soap,\
+javax.lang.model,\
+javax.lang.model.element,\
+javax.lang.model.type,\
+javax.lang.model.util,\
+javax.management,\
+javax.management.loading,\
+javax.management.modelmbean,\
+javax.management.monitor,\
+javax.management.openmbean,\
+javax.management.relation,\
+javax.management.remote,\
+javax.management.remote.rmi,\
+javax.management.timer,\
+javax.naming,\
+javax.naming.directory,\
+javax.naming.event,\
+javax.naming.ldap,\
+javax.naming.spi,\
+javax.net,\
+javax.net.ssl,\
+javax.print,\
+javax.print.attribute,\
+javax.print.attribute.standard,\
+javax.print.event,javax.rmi,\
+javax.rmi.CORBA,\
+javax.rmi.ssl,\
+javax.script,\
+javax.security.auth,\
+javax.security.auth.callback,\
+javax.security.auth.kerberos,\
+javax.security.auth.login,\
+javax.security.auth.spi,\
+javax.security.auth.x500,\
+javax.security.cert,\
+javax.security.sasl,\
+javax.sound.midi,\
+javax.sound.midi.spi,javax.sound.sampled,\
+javax.sound.sampled.spi,\
+javax.sql,\
+javax.sql.rowset,\
+javax.sql.rowset.serial,\
+javax.sql.rowset.spi,\
+javax.swing,\
+javax.swing.border,\
+javax.swing.colorchooser,\
+javax.swing.event,\
+javax.swing.filechooser,\
+javax.swing.plaf,\
+javax.swing.plaf.basic,\
+javax.swing.plaf.metal,\
+javax.swing.plaf.multi,\
+javax.swing.plaf.synth,\
+javax.swing.table,\
+javax.swing.text,\
+javax.swing.text.html,\
+javax.swing.text.html.parser,\
+javax.swing.text.rtf,\
+javax.swing.tree,\
+javax.swing.undo,\
+javax.tools,\
+javax.xml,\
+javax.xml.bind,\
+javax.xml.bind.annotation,\
+javax.xml.bind.annotation.adapters,\
+javax.xml.bind.attachment,\
+javax.xml.bind.helpers,\
+javax.xml.bind.util,\
+javax.xml.crypto,\
+javax.xml.crypto.dom,\
+javax.xml.crypto.dsig,\
+javax.xml.crypto.dsig.dom,\
+javax.xml.crypto.dsig.keyinfo,\
+javax.xml.crypto.dsig.spec,\
+javax.xml.datatype,\
+javax.xml.namespace,\
+javax.xml.parsers,\
+javax.xml.soap,\
+javax.xml.stream,\
+javax.xml.stream.events,\
+javax.xml.stream.util,\
+javax.xml.transform,\
+javax.xml.transform.dom,\
+javax.xml.transform.sax,\
+javax.xml.transform.stax,\
+javax.xml.transform.stream,\
+javax.xml.validation,\
+javax.xml.ws,\
+javax.xml.ws.handler,\
+javax.xml.ws.handler.soap,\
+javax.xml.ws.http,\
+javax.xml.ws.soap,\
+javax.xml.ws.spi,\
+javax.xml.xpath,\
+org.ietf.jgss,\
+org.omg.CORBA,\
+org.omg.CORBA.DynAnyPackage,\
+org.omg.CORBA.ORBPackage,\
+org.omg.CORBA.TypeCodePackage,\
+org.omg.CORBA.portable,\
+org.omg.CORBA_2_3,\
+org.omg.CORBA_2_3.portable,\
+org.omg.CosNaming,\
+org.omg.CosNaming.NamingContextExtPackage,\
+org.omg.CosNaming.NamingContextPackage,\
+org.omg.Dynamic,org.omg.DynamicAny,\
+org.omg.DynamicAny.DynAnyFactoryPackage,\
+org.omg.DynamicAny.DynAnyPackage,\
+org.omg.IOP,\
+org.omg.IOP.CodecFactoryPackage,\
+org.omg.IOP.CodecPackage,\
+org.omg.Messaging,\
+org.omg.PortableInterceptor,\
+org.omg.PortableInterceptor.ORBInitInfoPackage,\
+org.omg.PortableServer,\
+org.omg.PortableServer.CurrentPackage,\
+org.omg.PortableServer.POAManagerPackage,\
+org.omg.PortableServer.POAPackage,\
+org.omg.PortableServer.ServantLocatorPackage,\
+org.omg.PortableServer.portable,\
+org.omg.SendingContext,\
+org.omg.stub.java.rmi,\
+org.w3c.dom,\
+org.w3c.dom.bootstrap,\
+org.w3c.dom.css,\
+org.w3c.dom.events,\
+org.w3c.dom.html,\
+org.w3c.dom.ls,\
+org.w3c.dom.ranges,\
+org.w3c.dom.stylesheets,\
+org.w3c.dom.traversal,\
+org.w3c.dom.views,\
+org.xml.sax,\
+org.xml.sax.ext,\
+org.xml.sax.helpers,\
+javax.transaction;partial=true;mandatory:=partial,\
+javax.transaction.xa;partial=true;mandatory:=partial
+
Added: aries/tags/samples-0.1-incubating/ariestrader/assemblies/equinox-test-harness/src/main/resources/tradeDB.sql
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/ariestrader/assemblies/equinox-test-harness/src/main/resources/tradeDB.sql?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/ariestrader/assemblies/equinox-test-harness/src/main/resources/tradeDB.sql (added)
+++ aries/tags/samples-0.1-incubating/ariestrader/assemblies/equinox-test-harness/src/main/resources/tradeDB.sql Sun Feb 27 18:28:26 2011
@@ -0,0 +1,101 @@
+--
+-- 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.
+--
+
+connect 'jdbc:derby:tradedb;create=true';
+create table holdingejb
+ (purchaseprice decimal(10, 2),
+ holdingid integer not null,
+ quantity double not null,
+ purchasedate timestamp,
+ account_accountid integer,
+ quote_symbol varchar(250),
+ optLock integer);
+
+alter table holdingejb
+ add constraint pk_holdingejb primary key (holdingid);
+
+create table accountprofileejb
+ (address varchar(250),
+ passwd varchar(250),
+ userid varchar(250) not null,
+ email varchar(250),
+ creditcard varchar(250),
+ fullname varchar(250),
+ optLock integer);
+
+alter table accountprofileejb
+ add constraint pk_accountprofile2 primary key (userid);
+
+create table quoteejb
+ (low decimal(10, 2),
+ open1 decimal(10, 2),
+ volume double not null,
+ price decimal(10, 2),
+ high decimal(10, 2),
+ companyname varchar(250),
+ symbol varchar(250) not null,
+ change1 double not null,
+ optLock integer);
+
+alter table quoteejb
+ add constraint pk_quoteejb primary key (symbol);
+
+create table keygenejb
+ (keyval integer not null,
+ keyname varchar(250) not null);
+
+alter table keygenejb
+ add constraint pk_keygenejb primary key (keyname);
+
+create table accountejb
+ (creationdate timestamp,
+ openbalance decimal(10, 2),
+ logoutcount integer not null,
+ balance decimal(10, 2),
+ accountid integer not null,
+ lastlogin timestamp,
+ logincount integer not null,
+ PROFILE_USERID VARCHAR(250),
+ optLock integer);
+
+alter table accountejb
+ add constraint pk_accountejb primary key (accountid);
+
+create table orderejb
+ (orderfee decimal(10, 2),
+ completiondate timestamp,
+ ordertype varchar(250),
+ orderstatus varchar(250),
+ price decimal(10, 2),
+ quantity double not null,
+ opendate timestamp,
+ orderid integer not null,
+ account_accountid integer,
+ quote_symbol varchar(250),
+ holding_holdingid integer,
+ optLock integer);
+
+alter table orderejb
+ add constraint pk_orderejb primary key (orderid);
+
+create index profile_userid on accountejb(profile_userid);
+create index account_accountid on holdingejb(account_accountid);
+create index account_accountidt on orderejb(account_accountid);
+create index holding_holdingid on orderejb(holding_holdingid);
+create index orderstatus on orderejb(orderstatus);
+create index ordertype on orderejb(ordertype);
+exit;
Added: aries/tags/samples-0.1-incubating/ariestrader/assemblies/pom.xml
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/ariestrader/assemblies/pom.xml?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/ariestrader/assemblies/pom.xml (added)
+++ aries/tags/samples-0.1-incubating/ariestrader/assemblies/pom.xml Sun Feb 27 18:28:26 2011
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.aries.samples.ariestrader</groupId>
+ <artifactId>ariestrader</artifactId>
+ <version>0.1-incubating</version>
+ </parent>
+
+ <groupId>org.apache.aries.samples.ariestrader</groupId>
+ <artifactId>assemblies</artifactId>
+ <name>AriesTrader :: Assemblies</name>
+ <packaging>pom</packaging>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.aries.samples.ariestrader</groupId>
+ <artifactId>modules</artifactId>
+ <version>${version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.aries.samples.ariestrader</groupId>
+ <artifactId>org.apache.aries.samples.ariestrader.all</artifactId>
+ <version>${pom.version}</version>
+ <type>eba</type>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.samples.ariestrader</groupId>
+ <artifactId>org.apache.aries.samples.ariestrader.jdbc</artifactId>
+ <version>${pom.version}</version>
+ <type>eba</type>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <modules>
+ <module>ariestrader-jdbc-eba</module>
+ <module>ariestrader-all-eba</module>
+ <module>equinox-test-harness</module>
+ </modules>
+
+</project>
Added: aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/pom.xml
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/pom.xml?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/pom.xml (added)
+++ aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/pom.xml Sun Feb 27 18:28:26 2011
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.aries.samples.ariestrader</groupId>
+ <artifactId>modules</artifactId>
+ <version>0.1-incubating</version>
+ </parent>
+
+ <groupId>org.apache.aries.samples.ariestrader</groupId>
+ <artifactId>org.apache.aries.samples.ariestrader.api</artifactId>
+ <packaging>bundle</packaging>
+ <name>AriesTrader :: Modules - API</name>
+ <description>AriesTrader API</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.aries.samples.ariestrader</groupId>
+ <artifactId>org.apache.aries.samples.ariestrader.util</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <configuration>
+ <instructions>
+ <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
+ <Bundle-Version>${pom.version}</Bundle-Version>
+ <Export-Package>
+ org.apache.aries.samples.ariestrader.api;
+ org.apache.aries.samples.ariestrader.api.persistence;
+ version=${pom.version}
+ </Export-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/TradeDBManager.java
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/TradeDBManager.java?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/TradeDBManager.java (added)
+++ aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/TradeDBManager.java Sun Feb 27 18:28:26 2011
@@ -0,0 +1,59 @@
+/**
+ * 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.
+ */
+package org.apache.aries.samples.ariestrader.api;
+
+import org.apache.aries.samples.ariestrader.api.persistence.RunStatsDataBean;
+
+/**
+ * TradeDBManager interface centralizes and simplifies the DB
+ * configuration methods that are shared by some TradeServices
+ * implementations.
+ *
+ */
+public interface TradeDBManager {
+
+ /**
+ * Return a String containing the DBProductName configured for
+ * the current DataSource
+ *
+ * used by TradeBuildDB
+ *
+ * @return A String of the currently configured DataSource
+ *
+ */
+ public String checkDBProductName() throws Exception;
+
+ /**
+ * Recreate DataBase Tables for AriesTrader
+ *
+ * used by TradeBuildDB
+ *
+ * @return boolean of success/failure in recreate of DB tables
+ *
+ */
+ public boolean recreateDBTables(Object[] sqlBuffer, java.io.PrintWriter out) throws Exception;
+
+ /**
+ * Reset the statistics for the Test AriesTrader Scenario
+ *
+ * used by TradeConfigServlet
+ *
+ * @return the RunStatsDataBean
+ *
+ */
+ public RunStatsDataBean resetTrade(boolean deleteAll) throws Exception;
+}
Added: aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/TradeServiceUtilities.java
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/TradeServiceUtilities.java?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/TradeServiceUtilities.java (added)
+++ aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/TradeServiceUtilities.java Sun Feb 27 18:28:26 2011
@@ -0,0 +1,78 @@
+/**
+ * Licensed to4the 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.
+ */
+package org.apache.aries.samples.ariestrader.api;
+
+import org.apache.aries.samples.ariestrader.util.Log;
+import org.apache.aries.samples.ariestrader.util.ServiceUtilities;
+
+
+/**
+ * TradeServiceUtilities provides servlet specific client side
+ * utility functions.
+ */
+public class TradeServiceUtilities {
+
+ /**
+ * Lookup and return the TradeServices osgi service
+ *
+ * @return TradeServices
+ *
+ */
+ public static final TradeServices getTradeServices() {
+ if (Log.doTrace())
+ Log.trace("TradeServiceUtilities:getTradeServices()");
+ return getTradeServices(null);
+ }
+
+ /**
+ * Lookup and return the TradeServices osgi service with filter
+ *
+ * @return TradeServices
+ *
+ */
+ public static final TradeServices getTradeServices(String filter) {
+ if (Log.doTrace())
+ Log.trace("TradeServiceUtilities:getTradeServices()" , filter);
+ return (TradeServices) ServiceUtilities.getOSGIService(TradeServices.class.getName(), filter);
+ }
+
+ /**
+ * Lookup and return the TradeServicesManager osgi service
+ *
+ * @return TradeServicesManager
+ *
+ */
+ public static final TradeServicesManager getTradeServicesManager() {
+ if (Log.doTrace())
+ Log.trace("TradeServiceUtilities:getTradeServicesManager()");
+ return (TradeServicesManager) ServiceUtilities.getOSGIService(TradeServicesManager.class.getName());
+ }
+
+ /**
+ * Lookup and return the TradeDBManager osgi service
+ *
+ * @return TradeDBManager
+ *
+ */
+ public static final TradeDBManager getTradeDBManager() {
+ if (Log.doTrace())
+ Log.trace("TradeServiceUtilities:getTradeDBManager()");
+ return (TradeDBManager) ServiceUtilities.getOSGIService(TradeDBManager.class.getName());
+ }
+
+}
\ No newline at end of file
Added: aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/TradeServices.java
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/TradeServices.java?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/TradeServices.java (added)
+++ aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/TradeServices.java Sun Feb 27 18:28:26 2011
@@ -0,0 +1,285 @@
+/**
+ * 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.
+ */
+package org.apache.aries.samples.ariestrader.api;
+
+
+import java.math.BigDecimal;
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+import java.util.Collection;
+
+import org.apache.aries.samples.ariestrader.api.persistence.AccountDataBean;
+import org.apache.aries.samples.ariestrader.api.persistence.AccountProfileDataBean;
+import org.apache.aries.samples.ariestrader.api.persistence.HoldingDataBean;
+import org.apache.aries.samples.ariestrader.api.persistence.MarketSummaryDataBean;
+import org.apache.aries.samples.ariestrader.api.persistence.OrderDataBean;
+import org.apache.aries.samples.ariestrader.api.persistence.QuoteDataBean;
+import org.apache.aries.samples.ariestrader.util.TradeConfig;
+
+/**
+ * TradeServices interface specifies the business methods provided by the Trade online broker application.
+ * These business methods represent the features and operations that can be performed by customers of
+ * the brokerage such as login, logout, get a stock quote, buy or sell a stock, etc.
+ * This interface is implemented by {@link Trade} providing an EJB implementation of these
+ * business methods and also by {@link TradeDirect} providing a JDBC implementation.
+ *
+ * @see Trade
+ * @see TradeDirect
+ *
+ */
+public interface TradeServices extends Remote {
+
+ /**
+ * Compute and return a snapshot of the current market conditions
+ * This includes the TSIA - an index of the price of the top 100 Trade stock quotes
+ * The openTSIA ( the index at the open)
+ * The volume of shares traded,
+ * Top Stocks gain and loss
+ *
+ * @return A snapshot of the current market summary
+ */
+ public MarketSummaryDataBean getMarketSummary() throws Exception, RemoteException;
+
+
+ /**
+ * Purchase a stock and create a new holding for the given user.
+ * Given a stock symbol and quantity to purchase, retrieve the current quote price,
+ * debit the user's account balance, and add holdings to user's portfolio.
+ * buy/sell are asynchronous, using J2EE messaging,
+ * A new order is created and submitted for processing to the TradeBroker
+ *
+ * @param userID the customer requesting the stock purchase
+ * @param symbol the symbol of the stock being purchased
+ * @param quantity the quantity of shares to purchase
+ * @return OrderDataBean providing the status of the newly created buy order
+ */
+
+
+ public OrderDataBean buy(String userID, String symbol, double quantity, int orderProcessingMode) throws Exception, RemoteException;
+
+ /**
+ * Sell a stock holding and removed the holding for the given user.
+ * Given a Holding, retrieve current quote, credit user's account,
+ * and reduce holdings in user's portfolio.
+ *
+ * @param userID the customer requesting the sell
+ * @param holdingID the users holding to be sold
+ * @return OrderDataBean providing the status of the newly created sell order
+ */
+ public OrderDataBean sell(String userID, Integer holdingID, int orderProcessingMode) throws Exception, RemoteException;
+
+
+ /**
+ * Queue the Order identified by orderID to be processed
+ *
+ * Orders are submitted through JMS to a Trading Broker
+ * and completed asynchronously. This method queues the order for processing
+ *
+ * The boolean twoPhase specifies to the server implementation whether or not the
+ * method is to participate in a global transaction
+ *
+ * @param orderID the Order being queued for processing
+ * @return OrderDataBean providing the status of the completed order
+ */
+ public void queueOrder(Integer orderID, boolean twoPhase) throws Exception, RemoteException;
+
+ /**
+ * Complete the Order identefied by orderID
+ * Orders are submitted through JMS to a Trading agent
+ * and completed asynchronously. This method completes the order
+ * For a buy, the stock is purchased creating a holding and the users account is debited
+ * For a sell, the stock holding is removed and the users account is credited with the proceeds
+ *
+ * The boolean twoPhase specifies to the server implementation whether or not the
+ * method is to participate in a global transaction
+ *
+ * @param orderID the Order to complete
+ * @return OrderDataBean providing the status of the completed order
+ */
+ public OrderDataBean completeOrder(Integer orderID, boolean twoPhase) throws Exception, RemoteException;
+
+ /**
+ * Cancel the Order identefied by orderID
+ *
+ * The boolean twoPhase specifies to the server implementation whether or not the
+ * method is to participate in a global transaction
+ *
+ * @param orderID the Order to complete
+ * @return OrderDataBean providing the status of the completed order
+ */
+ public void cancelOrder(Integer orderID, boolean twoPhase) throws Exception, RemoteException;
+
+
+ /**
+ * Signify an order has been completed for the given userID
+ *
+ * @param userID the user for which an order has completed
+ * @param orderID the order which has completed
+ *
+ */
+ public void orderCompleted(String userID, Integer orderID) throws Exception, RemoteException;
+
+
+ /**
+ * Get the collection of all orders for a given account
+ *
+ * @param userID the customer account to retrieve orders for
+ * @return Collection OrderDataBeans providing detailed order information
+ */
+ public Collection getOrders(String userID) throws Exception, RemoteException;
+
+ /**
+ * Get the collection of completed orders for a given account that need to be alerted to the user
+ *
+ * @param userID the customer account to retrieve orders for
+ * @return Collection OrderDataBeans providing detailed order information
+ */
+ public Collection getClosedOrders(String userID) throws Exception, RemoteException;
+
+
+ /**
+ * Given a market symbol, price, and details, create and return a new {@link QuoteDataBean}
+ *
+ * @param symbol the symbol of the stock
+ * @param price the current stock price
+ * @param details a short description of the stock or company
+ * @return a new QuoteDataBean or null if Quote could not be created
+ */
+ public QuoteDataBean createQuote(String symbol, String companyName, BigDecimal price) throws Exception, RemoteException;
+
+ /**
+ * Return a {@link QuoteDataBean} describing a current quote for the given stock symbol
+ *
+ * @param symbol the stock symbol to retrieve the current Quote
+ * @return the QuoteDataBean
+ */
+ public QuoteDataBean getQuote(String symbol) throws Exception, RemoteException;
+
+ /**
+ * Return a {@link java.util.Collection} of {@link QuoteDataBean}
+ * describing all current quotes
+ * @return A collection of QuoteDataBean
+ */
+ public Collection getAllQuotes() throws Exception, RemoteException;
+
+ /**
+ * Update the stock quote price and volume for the specified stock symbol
+ *
+ * @param symbol for stock quote to update
+ * @param price the updated quote price
+ * @return the QuoteDataBean describing the stock
+ */
+ public QuoteDataBean updateQuotePriceVolume(String symbol, BigDecimal newPrice, double sharesTraded) throws Exception, RemoteException;
+
+
+ /**
+ * Return the portfolio of stock holdings for the specified customer
+ * as a collection of HoldingDataBeans
+ *
+ * @param userID the customer requesting the portfolio
+ * @return Collection of the users portfolio of stock holdings
+ */
+ public Collection getHoldings(String userID) throws Exception, RemoteException;
+
+ /**
+ * Return a specific user stock holding identified by the holdingID
+ *
+ * @param holdingID the holdingID to return
+ * @return a HoldingDataBean describing the holding
+ */
+ public HoldingDataBean getHolding(Integer holdingID) throws Exception, RemoteException;
+
+ /**
+ * Return an AccountDataBean object for userID describing the account
+ *
+ * @param userID the account userID to lookup
+ * @return User account data in AccountDataBean
+ */
+ public AccountDataBean getAccountData(String userID)
+ throws Exception, RemoteException;
+
+ /**
+ * Return an AccountProfileDataBean for userID providing the users profile
+ *
+ * @param userID the account userID to lookup
+ * @param User account profile data in AccountProfileDataBean
+ */
+ public AccountProfileDataBean getAccountProfileData(String userID) throws Exception, RemoteException;
+
+ /**
+ * Update userID's account profile information using the provided AccountProfileDataBean object
+ *
+ * @param userID the account userID to lookup
+ * @param password the updated password
+ * @param fullName the updated fullName
+ * @param address the updated address
+ * @param address the updated email
+ * @param the updated creditcard
+ */
+ public AccountProfileDataBean updateAccountProfile(String userID, String password, String fullName, String address, String email, String creditcard) throws Exception, RemoteException;
+
+
+ /**
+ * Attempt to authenticate and login a user with the given password
+ *
+ * @param userID the customer to login
+ * @param password the password entered by the customer for authentication
+ * @return User account data in AccountDataBean
+ */
+ public AccountDataBean login(String userID, String password) throws Exception, RemoteException;
+
+ /**
+ * Logout the given user
+ *
+ * @param userID the customer to logout
+ * @return the login status
+ */
+
+ public void logout(String userID) throws Exception, RemoteException;
+
+ /**
+ * Register a new Trade customer.
+ * Create a new user profile, user registry entry, account with initial balance,
+ * and empty portfolio.
+ *
+ * @param userID the new customer to register
+ * @param password the customers password
+ * @param fullname the customers fullname
+ * @param address the customers street address
+ * @param email the customers email address
+ * @param creditcard the customers creditcard number
+ * @param initialBalance the amount to charge to the customers credit to open the account and set the initial balance
+ * @return the userID if successful, null otherwise
+ */
+ public AccountDataBean register(String userID,
+ String password,
+ String fullname,
+ String address,
+ String email,
+ String creditcard,
+ BigDecimal openBalance) throws Exception, RemoteException;
+
+ /**
+ * Get mode - returns the persistence mode
+ * (TradeConfig.JDBC, JPA, etc...)
+ *
+ * @return TradeConfig.ModeType
+ */
+ public TradeConfig.ModeType getMode();
+
+}
+
Added: aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/TradeServicesManager.java
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/TradeServicesManager.java?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/TradeServicesManager.java (added)
+++ aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/TradeServicesManager.java Sun Feb 27 18:28:26 2011
@@ -0,0 +1,60 @@
+/**
+ * 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.
+ */
+package org.apache.aries.samples.ariestrader.api;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.aries.samples.ariestrader.api.persistence.MarketSummaryDataBean;
+
+/**
+ * TradeServicesManager interface provides an interface to be
+ * used for managing the implementations of TradeServices that
+ * are available.
+ *
+ */
+public interface TradeServicesManager {
+
+
+ /**
+ * Get CurrentModes that are registered
+ */
+ public ArrayList<Integer> getCurrentModes();
+
+ /**
+ * Get the currently selected TradeServices
+ */
+ public TradeServices getTradeServices();
+
+ /**
+ * Compute and return a snapshot of the current market
+ * conditions. This includes the TSIA - and index of the
+ * of the top 100 Trade stock quotes. The openTSIA(the index
+ * at the open), The volume of shares traded, Top Stocks gain
+ * and loss.
+ *
+ * This is a special version of this function which will cache
+ * the results provided by the currently selected
+ * TradeServices.
+ *
+ * @return A snapshot of the current market summary
+ */
+ public MarketSummaryDataBean getMarketSummary() throws Exception;
+
+
+}
+
Added: aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/persistence/AccountDataBean.java
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/persistence/AccountDataBean.java?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/persistence/AccountDataBean.java (added)
+++ aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/persistence/AccountDataBean.java Sun Feb 27 18:28:26 2011
@@ -0,0 +1,73 @@
+/**
+ * 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.
+ */
+package org.apache.aries.samples.ariestrader.api.persistence;
+
+import java.math.BigDecimal;
+import java.util.Collection;
+import java.util.Date;
+
+public interface AccountDataBean {
+
+ public String toString();
+
+ public String toHTML();
+
+ public Integer getAccountID();
+
+ public void setAccountID(Integer accountID);
+
+ public int getLoginCount();
+
+ public void setLoginCount(int loginCount);
+
+ public int getLogoutCount();
+
+ public void setLogoutCount(int logoutCount);
+
+ public Date getLastLogin();
+
+ public void setLastLogin(Date lastLogin);
+
+ public Date getCreationDate();
+
+ public void setCreationDate(Date creationDate);
+
+ public BigDecimal getBalance();
+
+ public void setBalance(BigDecimal balance);
+
+ public BigDecimal getOpenBalance();
+
+ public void setOpenBalance(BigDecimal openBalance);
+
+ public String getProfileID();
+
+ public void setProfileID(String profileID);
+
+ public Collection<OrderDataBean> getOrders();
+
+ public Collection<HoldingDataBean> getHoldings();
+
+ public AccountProfileDataBean getProfile();
+
+ public void setProfile(AccountProfileDataBean profile);
+
+ public void login(String password);
+
+ public void logout();
+
+}
\ No newline at end of file
Added: aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/persistence/AccountProfileDataBean.java
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/persistence/AccountProfileDataBean.java?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/persistence/AccountProfileDataBean.java (added)
+++ aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/persistence/AccountProfileDataBean.java Sun Feb 27 18:28:26 2011
@@ -0,0 +1,53 @@
+/**
+ * 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.
+ */
+package org.apache.aries.samples.ariestrader.api.persistence;
+
+public interface AccountProfileDataBean {
+
+ public String toString();
+
+ public String toHTML();
+
+ public String getUserID();
+
+ public void setUserID(String userID);
+
+ public String getPassword();
+
+ public void setPassword(String password);
+
+ public String getFullName();
+
+ public void setFullName(String fullName);
+
+ public String getAddress();
+
+ public void setAddress(String address);
+
+ public String getEmail();
+
+ public void setEmail(String email);
+
+ public String getCreditCard();
+
+ public void setCreditCard(String creditCard);
+
+ public AccountDataBean getAccount();
+
+ public void setAccount(AccountDataBean account);
+
+}
Added: aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/persistence/HoldingDataBean.java
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/persistence/HoldingDataBean.java?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/persistence/HoldingDataBean.java (added)
+++ aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/persistence/HoldingDataBean.java Sun Feb 27 18:28:26 2011
@@ -0,0 +1,56 @@
+/**
+ * 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.
+ */
+package org.apache.aries.samples.ariestrader.api.persistence;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+public interface HoldingDataBean {
+
+ public String toString();
+
+ public String toHTML();
+
+ public Integer getHoldingID();
+
+ public void setHoldingID(Integer holdingID);
+
+ public double getQuantity();
+
+ public void setQuantity(double quantity);
+
+ public BigDecimal getPurchasePrice();
+
+ public void setPurchasePrice(BigDecimal purchasePrice);
+
+ public Date getPurchaseDate();
+
+ public void setPurchaseDate(Date purchaseDate);
+
+ public String getQuoteID();
+
+ public void setQuoteID(String quoteID);
+
+ public AccountDataBean getAccount();
+
+ public void setAccount(AccountDataBean account);
+
+ public QuoteDataBean getQuote();
+
+ public void setQuote(QuoteDataBean quote);
+
+}
Added: aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/persistence/MarketSummaryDataBean.java
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/persistence/MarketSummaryDataBean.java?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/persistence/MarketSummaryDataBean.java (added)
+++ aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/persistence/MarketSummaryDataBean.java Sun Feb 27 18:28:26 2011
@@ -0,0 +1,218 @@
+/**
+ * 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.
+ */
+package org.apache.aries.samples.ariestrader.api.persistence;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Date;
+import java.util.Iterator;
+
+import org.apache.aries.samples.ariestrader.util.FinancialUtils;
+import org.apache.aries.samples.ariestrader.util.Log;
+import org.apache.aries.samples.ariestrader.util.TradeConfig;
+
+public class MarketSummaryDataBean implements Serializable
+{
+
+ private BigDecimal TSIA; /* Trade Stock Index Average */
+ private BigDecimal openTSIA; /* Trade Stock Index Average at the open */
+ private double volume; /* volume of shares traded */
+ private Collection topGainers; /* Collection of top gaining stocks */
+ private Collection topLosers; /* Collection of top losing stocks */
+ //FUTURE private Collection topVolume; /* Collection of top stocks by volume */
+ private Date summaryDate; /* Date this summary was taken */
+
+ //cache the gainPercent once computed for this bean
+ private BigDecimal gainPercent=null;
+
+ public MarketSummaryDataBean(){ }
+ public MarketSummaryDataBean(BigDecimal TSIA,
+ BigDecimal openTSIA,
+ double volume,
+ Collection topGainers,
+ Collection topLosers//, Collection topVolume
+ )
+ {
+ setTSIA(TSIA);
+ setOpenTSIA(openTSIA);
+ setVolume(volume);
+ setTopGainers(topGainers);
+ setTopLosers(topLosers);
+ setSummaryDate(new java.sql.Date(System.currentTimeMillis()));
+ gainPercent = FinancialUtils.computeGainPercent(getTSIA(), getOpenTSIA());
+
+ }
+
+
+ public String toString()
+ {
+ String ret = "\n\tMarket Summary at: " + getSummaryDate()
+ + "\n\t\t TSIA:" + getTSIA()
+ + "\n\t\t openTSIA:" + getOpenTSIA()
+ + "\n\t\t gain:" + getGainPercent()
+ + "\n\t\t volume:" + getVolume()
+ ;
+
+ if ( (getTopGainers()==null) || (getTopLosers()==null) )
+ return ret;
+ ret += "\n\t\t Current Top Gainers:";
+ Iterator it = getTopGainers().iterator();
+ while ( it.hasNext() )
+ {
+ QuoteDataBean quoteData = (QuoteDataBean) it.next();
+ ret += ( "\n\t\t\t" + quoteData.toString() );
+ }
+ ret += "\n\t\t Current Top Losers:";
+ it = getTopLosers().iterator();
+ while ( it.hasNext() )
+ {
+ QuoteDataBean quoteData = (QuoteDataBean) it.next();
+ ret += ( "\n\t\t\t" + quoteData.toString() );
+ }
+ return ret;
+ }
+ public String toHTML()
+ {
+ String ret = "<BR>Market Summary at: " + getSummaryDate()
+ + "<LI> TSIA:" + getTSIA() + "</LI>"
+ + "<LI> openTSIA:" + getOpenTSIA() + "</LI>"
+ + "<LI> volume:" + getVolume() + "</LI>"
+ ;
+ if ( (getTopGainers()==null) || (getTopLosers()==null) )
+ return ret;
+ ret += "<BR> Current Top Gainers:";
+ Iterator it = getTopGainers().iterator();
+ while ( it.hasNext() )
+ {
+ QuoteDataBean quoteData = (QuoteDataBean) it.next();
+ ret += ( "<LI>" + quoteData.toString() + "</LI>" );
+ }
+ ret += "<BR> Current Top Losers:";
+ it = getTopLosers().iterator();
+ while ( it.hasNext() )
+ {
+ QuoteDataBean quoteData = (QuoteDataBean) it.next();
+ ret += ( "<LI>" + quoteData.toString() + "</LI>" );
+ }
+ return ret;
+ }
+ public void print()
+ {
+ Log.log( this.toString() );
+ }
+
+ public BigDecimal getGainPercent()
+ {
+ if ( gainPercent == null )
+ gainPercent = FinancialUtils.computeGainPercent(getTSIA(), getOpenTSIA());
+ return gainPercent;
+ }
+
+
+ /**
+ * Gets the tSIA
+ * @return Returns a BigDecimal
+ */
+ public BigDecimal getTSIA() {
+ return TSIA;
+ }
+ /**
+ * Sets the tSIA
+ * @param tSIA The tSIA to set
+ */
+ public void setTSIA(BigDecimal tSIA) {
+ TSIA = tSIA;
+ }
+
+ /**
+ * Gets the openTSIA
+ * @return Returns a BigDecimal
+ */
+ public BigDecimal getOpenTSIA() {
+ return openTSIA;
+ }
+ /**
+ * Sets the openTSIA
+ * @param openTSIA The openTSIA to set
+ */
+ public void setOpenTSIA(BigDecimal openTSIA) {
+ this.openTSIA = openTSIA;
+ }
+
+ /**
+ * Gets the volume
+ * @return Returns a BigDecimal
+ */
+ public double getVolume() {
+ return volume;
+ }
+ /**
+ * Sets the volume
+ * @param volume The volume to set
+ */
+ public void setVolume(double volume) {
+ this.volume = volume;
+ }
+
+ /**
+ * Gets the topGainers
+ * @return Returns a Collection
+ */
+ public Collection getTopGainers() {
+ return topGainers;
+ }
+ /**
+ * Sets the topGainers
+ * @param topGainers The topGainers to set
+ */
+ public void setTopGainers(Collection topGainers) {
+ this.topGainers = topGainers;
+ }
+
+ /**
+ * Gets the topLosers
+ * @return Returns a Collection
+ */
+ public Collection getTopLosers() {
+ return topLosers;
+ }
+ /**
+ * Sets the topLosers
+ * @param topLosers The topLosers to set
+ */
+ public void setTopLosers(Collection topLosers) {
+ this.topLosers = topLosers;
+ }
+
+ /**
+ * Gets the summaryDate
+ * @return Returns a Date
+ */
+ public Date getSummaryDate() {
+ return summaryDate;
+ }
+ /**
+ * Sets the summaryDate
+ * @param summaryDate The summaryDate to set
+ */
+ public void setSummaryDate(Date summaryDate) {
+ this.summaryDate = summaryDate;
+ }
+
+}
Added: aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/persistence/OrderDataBean.java
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/persistence/OrderDataBean.java?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/persistence/OrderDataBean.java (added)
+++ aries/tags/samples-0.1-incubating/ariestrader/modules/ariestrader-api/src/main/java/org/apache/aries/samples/ariestrader/api/persistence/OrderDataBean.java Sun Feb 27 18:28:26 2011
@@ -0,0 +1,89 @@
+/**
+ * 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.
+ */
+package org.apache.aries.samples.ariestrader.api.persistence;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+public interface OrderDataBean {
+
+ public String toString();
+
+ public String toHTML();
+
+ public Integer getOrderID();
+
+ public void setOrderID(Integer orderID);
+
+ public String getOrderType();
+
+ public void setOrderType(String orderType);
+
+ public String getOrderStatus();
+
+ public void setOrderStatus(String orderStatus);
+
+ public Date getOpenDate();
+
+ public void setOpenDate(Date openDate);
+
+ public Date getCompletionDate();
+
+ public void setCompletionDate(Date completionDate);
+
+ public double getQuantity();
+
+ public void setQuantity(double quantity);
+
+ public BigDecimal getPrice();
+
+ public void setPrice(BigDecimal price);
+
+ public BigDecimal getOrderFee();
+
+ public void setOrderFee(BigDecimal orderFee);
+
+ public String getSymbol();
+
+ public void setSymbol(String symbol);
+
+ public AccountDataBean getAccount();
+
+ public void setAccount(AccountDataBean account);
+
+ public QuoteDataBean getQuote();
+
+ public void setQuote(QuoteDataBean quote);
+
+ public HoldingDataBean getHolding();
+
+ public void setHolding(HoldingDataBean holding);
+
+ public boolean isBuy();
+
+ public boolean isSell();
+
+ public boolean isOpen();
+
+ public boolean isCompleted();
+
+ public boolean isCancelled();
+
+ public void cancel();
+
+}
+