aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From z..@apache.org
Subject svn commit: r1075106 [13/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/ ariestra...
Date Sun, 27 Feb 2011 18:28:41 GMT
Added: aries/tags/samples-0.1-incubating/blog/LICENSE
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/blog/LICENSE?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/blog/LICENSE (added)
+++ aries/tags/samples-0.1-incubating/blog/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/blog/NOTICE
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/blog/NOTICE?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/blog/NOTICE (added)
+++ aries/tags/samples-0.1-incubating/blog/NOTICE Sun Feb 27 18:28:26 2011
@@ -0,0 +1,2 @@
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).

Added: aries/tags/samples-0.1-incubating/blog/blog-api/pom.xml
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/blog/blog-api/pom.xml?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/blog/blog-api/pom.xml (added)
+++ aries/tags/samples-0.1-incubating/blog/blog-api/pom.xml Sun Feb 27 18:28:26 2011
@@ -0,0 +1,51 @@
+<?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.blog</groupId>
+        <artifactId>blog</artifactId>
+        <version>0.1-incubating</version>
+    </parent>
+
+    <artifactId>org.apache.aries.samples.blog.api</artifactId>
+    <name>Apache Aries blog sample API</name>
+    <packaging>bundle</packaging>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+				<configuration>
+					<instructions>
+						<Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
+						<Export-Package>
+							org.apache.aries.samples.blog.api;
+							org.apache.aries.samples.blog.api.comment.persistence;
+							org.apache.aries.samples.blog.api.persistence;
+								version=${project.version}
+						</Export-Package>
+					</instructions>
+				</configuration> 
+            </plugin>
+        </plugins>
+    </build>
+</project>

Added: aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/Blog.java
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/Blog.java?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/Blog.java (added)
+++ aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/Blog.java Sun Feb 27 18:28:26 2011
@@ -0,0 +1,29 @@
+/**
+ * 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.blog.api;
+
+
+public interface Blog
+{
+  /**
+   * Gets the title of the blog
+   * @return currently returns the fixed value of "Aries Sample Blog"
+   */
+  String getBlogTitle();
+}

Added: aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/BlogAuthor.java
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/BlogAuthor.java?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/BlogAuthor.java (added)
+++ aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/BlogAuthor.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.blog.api;
+
+import java.util.List;
+
+
+public interface BlogAuthor
+{
+  /** Get the author's display name 
+   *  @return the display name String
+   */
+  String getName();
+
+  /** Get the author's full name
+   *  @return the full name String
+   */
+  String getFullName();
+
+  /** Get the author's email address 
+   *  @return the email address String
+   */
+  String getEmailAddress();
+
+  /** Get the author's biography 
+   *  @return the biography String
+   */
+  String getBio();
+
+  /** Get the author's date of birth 
+   *  @return the date of birth String (dd-mm-yyyy) 
+   */
+  String getDateOfBirth();
+  
+  /**
+   * 
+   * @return a list of Blog Entries
+   */
+  List <? extends BlogEntry> getEntries();
+}

Added: aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/BlogAuthorManager.java
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/BlogAuthorManager.java?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/BlogAuthorManager.java (added)
+++ aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/BlogAuthorManager.java Sun Feb 27 18:28:26 2011
@@ -0,0 +1,68 @@
+/**
+ * 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.blog.api;
+
+import java.text.ParseException;
+import java.util.List;
+
+
+public interface BlogAuthorManager
+{
+  /**
+   * Create an author.
+   * @param email the author's email address, this is used as the key in the database
+   * @param dob the author's date of birth
+   * @param name the author's full name
+   * @param displayName the author's display name
+   * @param bio the author's biography
+   * @throws ParseException
+   */
+  public void createAuthor(String email, String dob, String name, String displayName, String bio) throws ParseException;
+  
+  /**
+   * Get all authors from the database.
+   * @return a List<Author> of all authors in the database
+   */
+  public List<? extends BlogAuthor> getAllAuthors();
+  
+  /**
+   * Get an individual author.
+   * @param emailAddress - the email address of the author to retrieve
+   * @return the author
+   */
+  public BlogAuthor getAuthor(String emailAddress);
+  
+  /**
+   * Delete an author from the database.
+   * @param emailAddress the email address of the author to delete
+   */
+  public void removeAuthor(String emailAddress);
+  
+  /**
+   * Update a specific author.
+   * @param email the email address of the author being updated.
+   * @param dob the new date of birth (as a string)
+   * @param name the new full name
+   * @param displayName the new display name
+   * @param bio the new biography
+   * @throws ParseException
+   */
+  public void updateAuthor(String email, String dob, String name, String displayName, String bio) throws ParseException;
+  
+}

Added: aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/BlogComment.java
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/BlogComment.java?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/BlogComment.java (added)
+++ aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/BlogComment.java Sun Feb 27 18:28:26 2011
@@ -0,0 +1,48 @@
+/**
+ * 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.blog.api;
+
+public interface BlogComment {
+	  /** Get comment 
+	   *  @return the String representing the comment 
+	   */
+	  String getComment();
+	  
+	  /** Get the author of the comment 
+	   *  @return the BlogAuthor instance 
+	   */
+	  BlogAuthor getAuthor();
+	  
+	  /** Get the parent blog post for the comment 
+	   *  @return the BlogPost instance the comment is attached to.  
+	   */
+	  BlogEntry getEntry();
+
+	  /** Get the Id value of the comment 
+	   *  @return the integer id of the comment 
+	   */
+	  int getId();
+	  
+	  /** Get the creation date for the comment 
+	   *  @return the String representation of the date the comment was
+	   *  created in dd-mm-yyyy format. 
+	   */
+	  String getCommentCreationDate();
+	  
+}

Added: aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/BlogCommentManager.java
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/BlogCommentManager.java?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/BlogCommentManager.java (added)
+++ aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/BlogCommentManager.java Sun Feb 27 18:28:26 2011
@@ -0,0 +1,58 @@
+/**
+ * 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.blog.api;
+
+import java.util.List;
+
+public interface BlogCommentManager {
+	/**
+	 * Create a comment by an author (email) against a post (Id)
+	 * @param comment
+	 * @param email
+	 * @param entryId
+	 */
+	public void createComment(String comment, String email, long entryId);
+
+	/**
+	 * Get all the comments made by an author
+	 * @param email
+	 * @return a list of comments made by an author
+	 */
+	public List<? extends BlogComment> getCommentsByAuthor(String email);
+
+	/**
+	 * 
+	 * @param id
+	 * @return A list of comments made about an entry
+	 */
+	public List<? extends BlogComment> getCommentsForPost(long id); 
+
+	/**
+	 * Delete a specific comment using it's id
+	 * @param id
+	 */
+	public void deleteComment(int id);
+
+	/**
+	 * Check to see whether the comment service is available
+	 * @return
+	 */
+	public boolean isCommentingAvailable();
+
+}

Added: aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/BlogEntry.java
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/BlogEntry.java?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/BlogEntry.java (added)
+++ aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/BlogEntry.java Sun Feb 27 18:28:26 2011
@@ -0,0 +1,61 @@
+/**
+ * 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.blog.api;
+
+import java.util.Date;
+
+public interface BlogEntry
+{
+  /** 
+   * Get the title of the blog posting.
+   * @return the title String
+   */
+  String getTitle();
+
+  /** 
+   * Get the body of the blog posting.
+   * @return the body content as a String
+   */
+  String getBody();
+
+  /** 
+   * Get the author of the blog entry.
+   * @return the author's display name or email address if display name is null
+   */
+  BlogAuthor getAuthor();
+
+  /**
+   * Get the email address of the author of the blog posting.
+   * @return the author's email address
+   */
+  String getAuthorEmail();
+
+  /**
+   * Get the publish date of a blog posting.
+   * @return the date of publish
+   */
+  public Date getPublishDate();
+
+  /**
+   * Get the Id value for the blog posting. 
+   * @return the id value
+   */
+  public long getId();
+  
+}
\ No newline at end of file

Added: aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/BlogEntryManager.java
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/BlogEntryManager.java?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/BlogEntryManager.java (added)
+++ aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/BlogEntryManager.java Sun Feb 27 18:28:26 2011
@@ -0,0 +1,111 @@
+/**
+ * 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.blog.api;
+
+import java.text.ParseException;
+import java.util.List;
+
+import org.apache.aries.samples.blog.api.persistence.Entry;
+
+
+
+public interface BlogEntryManager
+{
+  /**
+   * Create a blog posting.
+   * @param email the author's email
+   * @param title the title of the entry
+   * @param blogText the text of the entry
+   * @param tags tags associated with the blog entry
+   */
+  public void createBlogPost(String email, String title, String blogText, List<String> tags);
+  
+  /**
+   * Find a specific blog entry by title.
+   * @param title the title to search for
+   * @return the blog entry
+   */
+  public Entry findBlogEntryByTitle(String title);
+  
+  /**
+   * Retrieve all blog entries.
+   * @return a List<BlogEntry> of all blog entries
+   */
+  public List<? extends BlogEntry> getAllBlogEntries();
+  
+  /**
+   * Retrieve all blog entries for a specific author.
+   * @param emailAddress the email address of the author in question
+   * @return a List<BlogEntry>
+   */
+  public List<? extends BlogEntry> getBlogsForAuthor(String emailAddress);
+  
+  /**
+   * Retrieve all blog entries created between a specified date range.
+   * @param startDate the start date
+   * @param endDate the end date
+   * @return a List<BlogEntry>
+   * @throws ParseException
+   */
+  public List<?extends BlogEntry> getBlogEntriesModifiedBetween(String startDate, String endDate) throws ParseException;
+
+  /**
+   * Get N posts from the database starting at post number X
+   * 
+   * @param firstPostIndex the first post to retrieve
+   * @param noOfPosts the number of posts to retrieve in total
+   * @return a List<BlogEntry> of N posts
+   */
+  public List<? extends BlogEntry> getBlogEntries(int firstPostIndex, int noOfPosts);
+  
+  /**
+   * Get the total number of blog entries in the database
+   * @return the int number of entries
+   */
+  public int getNoOfPosts();
+  
+  /**
+   * Remove a specific blog entry.
+   * @param a the author of the blog entry
+   * @param title the title of the blog entry
+   * @param publishDate the publication date of the blog entry
+   * @throws ParseException
+   */
+  public void removeBlogEntry(BlogAuthor author, String title, String publishDate) throws ParseException;
+  
+  /**
+   * Update a blog entry.
+   * @param originalEntry the original blog entry
+   * @param a the author of the blog entry
+   * @param title the title of the blog entry
+   * @param publishDate the publication date of the blog entry
+   * @param blogText the text content of the blog entry
+   * @param tags any assocaited tags for the blog entry
+   * @throws ParseException
+   */
+  public void updateBlogEntry(BlogEntry originalEntry, BlogAuthor a, String title, String publishDate, String blogText, List<String> tags) throws ParseException;
+
+  
+  /**
+   * Get the specified blog posting.
+   * @param id the id of the blog posting
+   * @return the blog post
+   */
+  public BlogEntry getBlogPost(long id);
+}

Added: aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/BloggingService.java
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/BloggingService.java?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/BloggingService.java (added)
+++ aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/BloggingService.java Sun Feb 27 18:28:26 2011
@@ -0,0 +1,124 @@
+/**
+ * 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.blog.api;
+
+import java.util.List;
+
+public interface BloggingService
+{
+  /**
+   *  Get the blog
+   *  @return the title of the Blog
+   */
+  String getBlogTitle();
+
+  /** 
+   * Get the author associated with a given email address.
+   * 
+   * @param email the email address of interest
+   * @return the blog author with the supplied email address
+   */
+  BlogAuthor getBlogAuthor(String email);
+  
+  /**
+   * Get the blog post with the specified id.
+   * 
+   * @param id the blog entry id
+   * @return the blog post
+   */
+  BlogEntry getBlogEntry(long id);
+
+
+  /**
+   * Update the attributes of an author.
+   * 
+   * @param email the email address of the author being updated
+   * @param nickName the display name for this author
+   * @param name the full name for this author
+   * @param bio the biography for this author
+   * @param dob the date of birth for this author
+   */
+  void updateBlogAuthor(String email, String nickName, String name, String bio, String dob);
+  
+  /**
+   * Get the number of entries(posts) in the blog
+   * @return the number of posts.
+   */
+  public int getNoOfEntries(); 
+  
+  /**
+   * Get the a number of entries starting at the teh first index
+   * @param firstPostIndex
+   * @param noOfPosts
+   * @return a list of BlogEntries
+   */
+  public List<? extends BlogEntry> getBlogEntries(int firstPostIndex, int noOfPosts);
+  
+  /**
+   * Get all the blog entries
+   * @return a lost of BlogEntrys
+   */
+  public List<? extends BlogEntry> getAllBlogEntries();
+
+  /**
+   * Create a new author.
+   * 
+   * @param email the author's email address
+   * @param nickName the author's display name
+   * @param name the author's full name
+   * @param bio the author's biography
+   * @param dob the author's date of birth
+   */
+  void createBlogAuthor(String email, String nickName, String name, String bio, String dob);
+  
+  /**
+   * 
+   * @param email the email address of the author
+   * @param title the title of the post
+   * @param blogText the test of the post
+   * @param tags list of tags associated with the post
+   */
+  void createBlogEntry(String email, String title, String blogText, String tags); 
+  
+  /**
+   * Retrieve the state of the blog commenting service
+   * 
+   * @return true if available else false
+   */
+  boolean isCommentingAvailable();
+  
+  /**
+   * Create a comment
+   * @param text
+   * @param email
+   * @param entryId
+   */
+  void createBlogComment(String text, String email, long entryId);
+  
+  /**
+   * Get the comments associated with an entry
+   * @param entry
+   * @return a list of comments for an entry (post)
+   */
+  List <? extends BlogComment> getCommentsForEntry(BlogEntry entry);
+  
+  
+  
+  
+}

Added: aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/comment/persistence/BlogCommentService.java
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/comment/persistence/BlogCommentService.java?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/comment/persistence/BlogCommentService.java (added)
+++ aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/comment/persistence/BlogCommentService.java Sun Feb 27 18:28:26 2011
@@ -0,0 +1,57 @@
+/**
+ * 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.blog.api.comment.persistence;
+
+import java.util.List;
+
+public interface BlogCommentService {
+
+	  /**
+	   * Create a comment against a blog entry.
+	   * 
+	   * @param comment the comment text
+	   * @param author the author
+	   * @param blogEntry the blog entry against which we are commenting
+	   */
+	  void createComment(String comment, String authorEmail, long entryId);
+
+	  /**
+	   * Delete a blog entry comment
+	   * 
+	   * @param comment the comment being deleted.
+	   */
+	  void delete(int id);
+
+	  /**
+	   * Get comments for a given blog entry post.
+	   * 
+	   * @param id the blog entry id
+	   * @return a List<BlogComment> for the blog entry
+	   */
+	  List<? extends Comment> getCommentsForEntry(long id);
+
+	  /**
+	   * Get comments for a given author.
+	   * 
+	   * @param emailAddress the email address of the author
+	   * @return a List<BlogComment> for the given email address
+	   */
+	 List<? extends Comment> getCommentsForAuthor(String emailAddress);
+
+}

Added: aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/comment/persistence/Comment.java
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/comment/persistence/Comment.java?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/comment/persistence/Comment.java (added)
+++ aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/comment/persistence/Comment.java Sun Feb 27 18:28:26 2011
@@ -0,0 +1,52 @@
+/**
+ * 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.blog.api.comment.persistence;
+
+import java.util.Date;
+
+import org.apache.aries.samples.blog.api.persistence.Author;
+import org.apache.aries.samples.blog.api.persistence.Entry;
+
+public interface Comment {
+	 /** Get comment 
+	   *  @return the String representing the comment 
+	   */
+	  String getComment();
+	  
+	  /** Get the author of the comment 
+	   *  @return the BlogAuthor instance 
+	   */
+	  Author getAuthor();
+	  
+	  /** Get the parent blog post for the comment 
+	   *  @return the BlogPost instance the comment is attached to.  
+	   */
+	  Entry getEntry();
+
+	  /** Get the Id value of the comment 
+	   *  @return the integer id of the comment 
+	   */
+	  int getId();
+	  
+	  /** Get the creation date for the comment 
+	   *  @return the String representation of the date the comment was
+	   *  created in dd-mm-yyyy format. 
+	   */
+	  Date getCreationDate();
+}

Added: aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/persistence/Author.java
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/persistence/Author.java?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/persistence/Author.java (added)
+++ aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/persistence/Author.java Sun Feb 27 18:28:26 2011
@@ -0,0 +1,45 @@
+/**
+ * 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.blog.api.persistence;
+
+import java.util.Date;
+import java.util.List;
+
+
+public interface Author {
+
+	/** Get the author's email address */
+	public String getEmail();
+
+	/** Get the author's full name */
+	public String getName();
+
+	/** Get the author's displayed name */
+	public String getDisplayName();
+
+	/** Get the author's biographical information */
+	public String getBio();
+
+	/** Get the author's date of birth */
+	public Date getDob();
+
+	/** Get the author's blog posts */
+	public List<? extends Entry> getEntries();
+
+}

Added: aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/persistence/BlogPersistenceService.java
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/persistence/BlogPersistenceService.java?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/persistence/BlogPersistenceService.java (added)
+++ aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/persistence/BlogPersistenceService.java Sun Feb 27 18:28:26 2011
@@ -0,0 +1,162 @@
+/**
+ * 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.blog.api.persistence;
+
+import java.util.Date;
+import java.util.List;
+
+
+
+/**
+ * This is the interface for the persistence layer of the blog
+ * application.  This persistence layer is registered in the service
+ * registry and is used by the main application layer. 
+ *
+ */
+public interface BlogPersistenceService
+{
+
+  /**
+   * Get all the blog entries in the data store
+   * @return a list of BlogEntry objects
+   */
+  public List<? extends Entry> getAllBlogEntries();
+
+  /**
+   * Get the number of blog entries in the data store
+   * @return the number of blog entries
+   */
+  public int getNoOfBlogEntries();
+
+  /**
+   * Get the first N most recent posts starting from post X
+   * @param firstPostIndex - The index of the first post to be retrieved
+   * @param no - The number of posts to be retrieved starting from firstPostIndex
+   */
+  public List<? extends Entry> getBlogEntries(int firstPostIndex, int no);
+
+  /**
+   * Get all the blog entries made by a particular
+   * author
+   * 
+   * @param emailAddress the author's email address
+   * @return a list of BlogEntry objects
+   */
+  public List<? extends Entry> getBlogsForAuthor(String emailAddress);
+
+  /**
+   * Get a BlogEntry that has a given title
+   * @param title the title of interest
+   * @return A BlogEntry with a specific title (or null if no entry exists in the
+   *         data store)
+   */
+  public Entry findBlogEntryByTitle(String title);
+
+  /**
+   * Get BlogEntries created or modified between two specified dates
+   * @param start  The Date defining the start of the time period
+   * @param end    The Date defining the end of the time period
+   * @return  A list of BlogEntry objects
+   */
+  public List<? extends Entry> getBlogEntriesModifiedBetween(Date start, Date end);
+
+  /**
+   * Obtain a given Blog post using its unique id.
+   * 
+   * @param postId the posts unique id.
+   * @return the Blog post.
+   */
+  public Entry getBlogEntryById(long postId);
+
+  /**
+   * Get the details for an author
+   * @param emailAddress the Author's email address
+   * @return An Author object
+   */
+  public Author getAuthor(String emailAddress);
+
+  /**
+   * Get all authors in the database
+   * @return a List of Authors
+   */
+  public List<? extends Author> getAllAuthors();
+
+  /**
+   * Create an author in the database
+   * 
+   * @param emailAddress
+   * 			The author's email address
+   * @param dob
+   *     		The author's date of birth
+   * @param name
+   *        	The author's name
+   * @param displayName
+   *        	??
+   * @param bio
+   *        	The author's bio.
+   */
+  public void createAuthor(String email, Date dob, String name, String displayName, String bio);
+
+  /**
+   * Create an Blog post in the database
+   * 
+   * @param a
+   * 			The author
+   * @param title
+   * 			The title of the post
+   * @param blogText
+   * 			The text of the post
+   * @param tags
+   * 			??
+   */
+  public void createBlogPost(String email, String title, String blogText, List<String> tags);
+
+  /**
+   * Update an author in the database
+   * @param 
+   */
+  public void updateAuthor(String email, Date dob, String name, String displayName, String bio);
+
+  /**
+   * Update an post in the database
+   * 
+   * @param email The author's email
+   * @param title The title of the post
+   * @param blogText The text of the blog
+   * @param tags The list of tags
+   * @param updatedDate The date the update was made
+   */
+  public void updateBlogEntry(long id, String email, String title, String blogText, List<String> tags, Date updatedDate);
+
+  /**
+   * Remove the author with the specified email address
+   * 
+   * @param emailAddress the email address of the author to remove
+   */
+  public void removeAuthor(String emailAddress);
+
+  /**
+   * Remove the specified BlogEntry, note that this must be a BlogEntry returned by
+   * this service.
+   * 
+   * @param id the unique id of the blog entry to remove
+   */
+  public void removeBlogEntry(long id);
+
+}

Added: aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/persistence/Entry.java
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/persistence/Entry.java?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/persistence/Entry.java (added)
+++ aries/tags/samples-0.1-incubating/blog/blog-api/src/main/java/org/apache/aries/samples/blog/api/persistence/Entry.java Sun Feb 27 18:28:26 2011
@@ -0,0 +1,52 @@
+/**
+ * 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.blog.api.persistence;
+
+import java.util.Date;
+import java.util.List;
+
+
+
+public interface Entry {
+
+	/** Get the author of this blog post */
+	public Author getAuthor();
+
+	/** Get the publish date of this blog post */
+	public Date getPublishDate();
+	
+	/** Get the title of this blog post */
+	public String getTitle();
+	
+	/** Get the tags for this blog post */
+	public List<String> getTags();
+	
+	/** Get the text for this blog post */
+	public String getBlogText();
+	
+	/** get the Blog post id */
+	public long getId();
+
+	/**
+	 * @return The date of the last update to this blog or null if it has never
+	 *         been modified
+	 */
+	public Date getUpdatedDate();
+
+}

Added: aries/tags/samples-0.1-incubating/blog/blog-assembly/pom.xml
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/blog/blog-assembly/pom.xml?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/blog/blog-assembly/pom.xml (added)
+++ aries/tags/samples-0.1-incubating/blog/blog-assembly/pom.xml Sun Feb 27 18:28:26 2011
@@ -0,0 +1,263 @@
+<?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.blog</groupId>
+		<artifactId>blog</artifactId>
+		<version>0.1-incubating</version>
+	</parent>
+
+	<artifactId>org.apache.aries.samples.blog.assembly</artifactId>
+	<name>Apache Aries blog sample assembly</name>
+	<packaging>pom</packaging>
+
+	<dependencies>
+
+		<!-- Base (JDBC) platform 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>
+		</dependency>
+		<dependency>
+			<groupId>org.ops4j.pax.web</groupId>
+			<artifactId>pax-web-jetty-bundle</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>org.ops4j.pax.web</groupId>
+			<artifactId>pax-web-jsp</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.derby</groupId>
+			<artifactId>derby</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.felix</groupId>
+			<artifactId>org.apache.felix.fileinstall</artifactId>
+		</dependency>
+
+		<!--  Additional (JPA persistence layer) platform dependencies -->
+
+		<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.specs</groupId>
+			<artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.geronimo.components</groupId>
+			<artifactId>geronimo-transaction</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.openjpa</groupId>
+			<artifactId>openjpa</artifactId>
+		</dependency>
+		
+		 <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+        </dependency>
+        
+        <dependency>
+            <groupId>commons-collections</groupId>
+            <artifactId>commons-collections</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>
+		
+
+
+		<!-- Base (JDBC) 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.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>
+
+		<!-- Additional (JPA persistence layer) Aries dependencies -->
+
+		<dependency>
+			<groupId>org.apache.aries.jpa</groupId>
+			<artifactId>org.apache.aries.jpa.api</artifactId>
+		</dependency>
+		
+		<dependency>
+			<groupId>asm</groupId>
+			<artifactId>asm-all</artifactId>
+			<version>3.2</version>
+		</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.blueprint.aries</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.manager</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.wrappers</artifactId>
+		</dependency>
+		
+		<!-- Blog sample datasource -->
+		<dependency>
+			<groupId>org.apache.aries.samples.blog</groupId>
+			<artifactId>org.apache.aries.samples.blog.datasource</artifactId>
+		</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/blog/blog-assembly/src/main/filtered-resources/configuration/config.ini
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/blog/blog-assembly/src/main/filtered-resources/configuration/config.ini?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/blog/blog-assembly/src/main/filtered-resources/configuration/config.ini (added)
+++ aries/tags/samples-0.1-incubating/blog/blog-assembly/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,\
+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.aries.jndi-${ariesJndiVersion}.jar@start,\
+org.apache.aries.util-${ariesUtilVersion}.jar@start,\
+org.apache.aries.blueprint-${ariesBlueprintVersion}.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.felix.fileinstall-2.0.8.jar@start,\
+org.apache.aries.application.runtime-${ariesApplicationVersion}.jar@start,\
+commons-collections-3.2.1.jar@start,\
+commons-lang-2.5.jar@start,\
+commons-pool-1.5.4.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,\
+openjpa-${openjpaVersion}.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.transaction.blueprint-${ariesTransactionVersion}.jar@start,\
+org.apache.aries.transaction.manager-${ariesTransactionVersion}.jar@start,\
+org.apache.servicemix.bundles.serp-1.13.1_2.jar@start,\
+org.apache.aries.samples.blog.datasource-${version}.jar@start,\
+org.apache.aries.transaction.wrappers-${ariesTransactionVersion}.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/blog/blog-assembly/src/main/resources/blogDB.sql
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/blog/blog-assembly/src/main/resources/blogDB.sql?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/blog/blog-assembly/src/main/resources/blogDB.sql (added)
+++ aries/tags/samples-0.1-incubating/blog/blog-assembly/src/main/resources/blogDB.sql Sun Feb 27 18:28:26 2011
@@ -0,0 +1,33 @@
+/**
+ * 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:blogDB/;create=true';
+CREATE TABLE AUTHOR (email VARCHAR(255) NOT NULL, bio VARCHAR(255), displayName VARCHAR(255), dob TIMESTAMP, name VARCHAR(255), PRIMARY KEY (email));
+CREATE TABLE AUTHOR_BLOGENTRY (AUTHOR_EMAIL VARCHAR(255), POSTS_ID BIGINT);
+CREATE TABLE BLOGENTRY (id BIGINT NOT NULL, blogText VARCHAR(10000), publishDate TIMESTAMP, title VARCHAR(255), updatedDate TIMESTAMP, AUTHOR_EMAIL VARCHAR(255), PRIMARY KEY (id));
+CREATE TABLE COMMENT (id BIGINT NOT NULL, comment VARCHAR(255), creationDate TIMESTAMP, AUTHOR_EMAIL VARCHAR(255), BLOGENTRY_ID BIGINT);
+CREATE TABLE OPENJPA_SEQUENCE_TABLE (ID SMALLINT NOT NULL, SEQUENCE_VALUE BIGINT, PRIMARY KEY (ID));
+CREATE INDEX I_THR_TRY_AUTHOR_EMAIL ON AUTHOR_BLOGENTRY (AUTHOR_EMAIL);
+CREATE INDEX I_THR_TRY_ELEMENT ON AUTHOR_BLOGENTRY (POSTS_ID);
+CREATE INDEX I_BLGNTRY_AUTHOR ON BLOGENTRY (AUTHOR_EMAIL);
+DELETE FROM AUTHOR;
+DELETE FROM AUTHOR_BLOGENTRY;
+DELETE FROM BLOGENTRY;
+DELETE FROM COMMENT;
+DELETE FROM OPENJPA_SEQUENCE_TABLE;
+exit;

Added: aries/tags/samples-0.1-incubating/blog/blog-biz/pom.xml
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/blog/blog-biz/pom.xml?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/blog/blog-biz/pom.xml (added)
+++ aries/tags/samples-0.1-incubating/blog/blog-biz/pom.xml Sun Feb 27 18:28:26 2011
@@ -0,0 +1,54 @@
+<?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.blog</groupId>
+        <artifactId>blog</artifactId>
+        <version>0.1-incubating</version>
+    </parent>
+
+	<artifactId>org.apache.aries.samples.blog.biz</artifactId>
+	<name>Apache Aries blog sample </name>
+	<packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.aries.samples.blog</groupId>
+            <artifactId>org.apache.aries.samples.blog.api</artifactId>
+        </dependency>
+    </dependencies>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+				<configuration>
+					<instructions>
+                        <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
+						<Private-Package>org.apache.aries.samples.blog.biz.*</Private-Package>
+                        <Export-Package>!org.apache.aries.samples.blog.biz.*</Export-Package>
+					</instructions>
+				</configuration> 
+			</plugin>
+		</plugins>
+	</build>
+</project>
+	

Added: aries/tags/samples-0.1-incubating/blog/blog-biz/src/main/java/org/apache/aries/samples/blog/biz/BlogAuthorImpl.java
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/blog/blog-biz/src/main/java/org/apache/aries/samples/blog/biz/BlogAuthorImpl.java?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/blog/blog-biz/src/main/java/org/apache/aries/samples/blog/biz/BlogAuthorImpl.java (added)
+++ aries/tags/samples-0.1-incubating/blog/blog-biz/src/main/java/org/apache/aries/samples/blog/biz/BlogAuthorImpl.java Sun Feb 27 18:28:26 2011
@@ -0,0 +1,82 @@
+/**
+ * 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.blog.biz;
+
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+
+import org.apache.aries.samples.blog.api.BlogAuthor;
+import org.apache.aries.samples.blog.api.BlogEntry;
+import org.apache.aries.samples.blog.api.persistence.Author;
+import org.apache.aries.samples.blog.api.persistence.Entry;
+
+public class BlogAuthorImpl implements BlogAuthor {
+	private static Calendar cal = Calendar.getInstance();
+	private Author author;
+
+	public BlogAuthorImpl(Author a) {
+		author = a;
+	}
+
+	public String getBio() {
+		return author.getBio();
+	}
+
+	public String getEmailAddress() {
+		return author.getEmail();
+	}
+
+	public String getFullName() {
+		return author.getName();
+	}
+
+	public String getName() {
+		return author.getDisplayName();
+	}
+
+	public String getDateOfBirth() {
+		Date dob = author.getDob();
+
+		int year = 0;
+		int month = 0;
+		int date = 0;
+
+		synchronized (cal) {
+			if (dob != null) {
+				cal.setTime(dob);
+				year = cal.get(Calendar.YEAR);
+				month = cal.get(Calendar.MONTH) + 1;
+				date = cal.get(Calendar.DATE);
+			}
+		}
+		return year + "-" + month + "-" + date;
+
+	}
+
+	public List<? extends BlogEntry> getEntries() {
+		return adapt(author.getEntries());
+	}
+
+	private List<? extends BlogEntry> adapt(List<? extends Entry> list) {
+		List<BlogEntryImpl> bei = null;
+		;
+		return bei;
+	}
+}
\ No newline at end of file

Added: aries/tags/samples-0.1-incubating/blog/blog-biz/src/main/java/org/apache/aries/samples/blog/biz/BlogAuthorManagerImpl.java
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/blog/blog-biz/src/main/java/org/apache/aries/samples/blog/biz/BlogAuthorManagerImpl.java?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/blog/blog-biz/src/main/java/org/apache/aries/samples/blog/biz/BlogAuthorManagerImpl.java (added)
+++ aries/tags/samples-0.1-incubating/blog/blog-biz/src/main/java/org/apache/aries/samples/blog/biz/BlogAuthorManagerImpl.java Sun Feb 27 18:28:26 2011
@@ -0,0 +1,91 @@
+/**
+ * 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.blog.biz;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.aries.samples.blog.api.*;
+import org.apache.aries.samples.blog.api.persistence.Author;
+import org.apache.aries.samples.blog.api.persistence.BlogPersistenceService;
+
+
+
+public class BlogAuthorManagerImpl implements BlogAuthorManager
+{
+  private BlogPersistenceService persistenceService;
+
+  // Blueprint injection used to set the persistenceService
+  public void setPersistenceService(BlogPersistenceService persistenceService)
+  {
+    this.persistenceService = persistenceService;
+  }
+  
+  public void createAuthor(String email, String dob, String name, String displayName, String bio) throws ParseException
+  {
+    if(email == null) throw new IllegalArgumentException("Email must not be null");
+   
+    Date dateOfBirth;
+    
+	dateOfBirth = (dob == null || "".equals(dob)) ? null : new SimpleDateFormat("yyyy-MM-dd").parse(dob);
+	
+    persistenceService.createAuthor(email, dateOfBirth, name, displayName, bio);
+  }
+  
+  public List<? extends BlogAuthor> getAllAuthors()
+  {
+	  List<? extends Author> authors = persistenceService.getAllAuthors();
+		return adaptAuthor(authors);
+  }
+  
+  public BlogAuthor getAuthor(String emailAddress)
+  {
+    if(emailAddress == null) throw new IllegalArgumentException("Email must not be null");
+    Author a = persistenceService.getAuthor(emailAddress);
+    if (a != null)
+		return new BlogAuthorImpl(a);
+	else
+		return null;
+  }
+  
+  public void removeAuthor(String emailAddress)
+  {
+    if(emailAddress == null) throw new IllegalArgumentException("Email must not be null");
+    persistenceService.removeAuthor(emailAddress);
+  }
+  
+  public void updateAuthor(String email, String dob, String name, String displayName, String bio) throws ParseException
+  { 
+	  if (email == null)
+			throw new IllegalArgumentException("Email must not be null");
+    Date dateOfBirth = (dob == null) ? null : new SimpleDateFormat("yyyy-MM-dd").parse(dob);
+    persistenceService.updateAuthor(email, dateOfBirth, name, displayName, bio);
+  }
+  
+	private List<? extends BlogAuthor> adaptAuthor(
+			List<? extends Author> authors) {
+			return new BlogListAdapter<BlogAuthor, Author>(authors, BlogAuthorImpl.class, Author.class);
+
+	}
+ 
+}

Added: aries/tags/samples-0.1-incubating/blog/blog-biz/src/main/java/org/apache/aries/samples/blog/biz/BlogCommentImpl.java
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/blog/blog-biz/src/main/java/org/apache/aries/samples/blog/biz/BlogCommentImpl.java?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/blog/blog-biz/src/main/java/org/apache/aries/samples/blog/biz/BlogCommentImpl.java (added)
+++ aries/tags/samples-0.1-incubating/blog/blog-biz/src/main/java/org/apache/aries/samples/blog/biz/BlogCommentImpl.java Sun Feb 27 18:28:26 2011
@@ -0,0 +1,88 @@
+/**
+ * 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.blog.biz;
+
+import java.util.Date;
+import java.util.Calendar;
+
+import org.apache.aries.samples.blog.api.BlogAuthor;
+import org.apache.aries.samples.blog.api.BlogComment;
+import org.apache.aries.samples.blog.api.BlogEntry;
+import org.apache.aries.samples.blog.api.comment.persistence.Comment;
+
+
+public class BlogCommentImpl implements BlogComment {
+	private static Calendar cal = Calendar.getInstance();
+	
+	private Comment comment;
+	
+	public BlogCommentImpl(Comment c) {
+		 comment = c;
+	}
+  /** Get comment 
+   *  @return the String representing the comment 
+   */
+  public String getComment() {
+	  return comment.getComment();
+  }
+  
+  /** Get the author of the comment 
+   *  @return the BlogAuthor instance 
+   */
+  public BlogAuthor getAuthor() {
+	  return new BlogAuthorImpl(comment.getAuthor());
+  }
+  
+  /** Get the parent blog post for the comment 
+   *  @return the BlogPost instance the comment is attached to.  
+   */
+  public BlogEntry getEntry() {
+	  return new BlogEntryImpl(comment.getEntry());
+  }
+
+  /** Get the Id value of the comment 
+   *  @return the integer id of the comment 
+   */
+  public int getId() {
+	  return comment.getId();
+  }
+  
+  /** Get the creation date for the comment 
+   *  @return the String representation of the date the comment was
+   *  created in dd-mm-yyyy format. 
+   */
+  public String getCommentCreationDate() {
+	  
+	  Date dc = comment.getCreationDate();
+	  int year;
+		int month;
+		int date;
+
+		synchronized (cal) {
+			cal.setTime(dc);
+			year = cal.get(Calendar.YEAR);
+			month = cal.get(Calendar.MONTH) + 1;
+			date = cal.get(Calendar.DATE);
+		}
+
+		return year + "-" + month + "-" + date;
+
+  }
+  
+}

Added: aries/tags/samples-0.1-incubating/blog/blog-biz/src/main/java/org/apache/aries/samples/blog/biz/BlogCommentManagerImpl.java
URL: http://svn.apache.org/viewvc/aries/tags/samples-0.1-incubating/blog/blog-biz/src/main/java/org/apache/aries/samples/blog/biz/BlogCommentManagerImpl.java?rev=1075106&view=auto
==============================================================================
--- aries/tags/samples-0.1-incubating/blog/blog-biz/src/main/java/org/apache/aries/samples/blog/biz/BlogCommentManagerImpl.java (added)
+++ aries/tags/samples-0.1-incubating/blog/blog-biz/src/main/java/org/apache/aries/samples/blog/biz/BlogCommentManagerImpl.java Sun Feb 27 18:28:26 2011
@@ -0,0 +1,88 @@
+/**
+ * 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.blog.biz;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.aries.samples.blog.api.BlogComment;
+import org.apache.aries.samples.blog.api.BlogCommentManager;
+import org.apache.aries.samples.blog.api.comment.persistence.BlogCommentService;
+import org.apache.aries.samples.blog.api.comment.persistence.Comment;
+
+
+public class BlogCommentManagerImpl implements BlogCommentManager {
+	
+	private BlogCommentService commentService;
+	private boolean commentServiceValid;
+	
+	// Injected via blueprint
+	public void setCommentService(BlogCommentService bcs) {
+		commentService = bcs;
+	}
+
+
+	public void createComment(String comment, String email, long entryId) {
+		commentService.createComment(comment, email, entryId);
+	}
+
+	public List<? extends BlogComment> getCommentsByAuthor(String email) {
+		List<? extends Comment> comment = commentService.getCommentsForAuthor(email);
+		return adaptComment(comment);
+		
+	}		
+
+	public List<? extends BlogComment> getCommentsForPost(long id) {
+		List<? extends Comment> comment = commentService.getCommentsForEntry(id);
+		return adaptComment(comment);
+	}
+		
+
+	public void deleteComment(int id) {
+		commentService.delete(id);
+	}
+
+	private List<? extends BlogComment> adaptComment(
+			List<? extends Comment> comments) {
+		List<BlogComment> list = new ArrayList<BlogComment>();
+
+		Iterator<? extends Comment> c = comments.iterator();
+		while (c.hasNext()) {
+			list.add(new BlogCommentImpl(c.next()));
+			
+		}
+		return list;
+
+	}
+	
+	public boolean isCommentingAvailable() {
+		return commentServiceValid;
+	}
+	
+	public void blogServiceBound(BlogCommentService comment, Map props) {
+		commentServiceValid = true;
+	}
+
+	public void blogServiceUnbound(BlogCommentService comment, Map props) {
+
+	}
+
+}



Mime
View raw message