abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r627798 - in /incubator/abdera/java/trunk: adapters/jdbc/src/main/java/org/apache/abdera/protocol/server/adapters/ibatis/ server/src/main/java/org/apache/abdera/protocol/server/provider/managed/
Date Thu, 14 Feb 2008 16:44:47 GMT
Author: jmsnell
Date: Thu Feb 14 08:44:42 2008
New Revision: 627798

URL: http://svn.apache.org/viewvc?rev=627798&view=rev
Log:
per https://issues.apache.org/jira/browse/ABDERA-118

Modified:
    incubator/abdera/java/trunk/adapters/jdbc/src/main/java/org/apache/abdera/protocol/server/adapters/ibatis/IBatisCollectionAdapter.java
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/managed/FeedConfiguration.java

Modified: incubator/abdera/java/trunk/adapters/jdbc/src/main/java/org/apache/abdera/protocol/server/adapters/ibatis/IBatisCollectionAdapter.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/adapters/jdbc/src/main/java/org/apache/abdera/protocol/server/adapters/ibatis/IBatisCollectionAdapter.java?rev=627798&r1=627797&r2=627798&view=diff
==============================================================================
--- incubator/abdera/java/trunk/adapters/jdbc/src/main/java/org/apache/abdera/protocol/server/adapters/ibatis/IBatisCollectionAdapter.java
(original)
+++ incubator/abdera/java/trunk/adapters/jdbc/src/main/java/org/apache/abdera/protocol/server/adapters/ibatis/IBatisCollectionAdapter.java
Thu Feb 14 08:44:42 2008
@@ -51,10 +51,6 @@
 
 public class IBatisCollectionAdapter 
   extends BasicAdapter {
-  
-  private static final String ENTRY_AUTHOR = "feedserver";
-  private static final String ENTRY_TITLE = "jdbc entry title";
-
 
   // this class needs to be public - so that Adapter Manager can invoke it
   // to create an instance of this adapter
@@ -139,16 +135,16 @@
         continue;
       }
       Object value = row.get(columnName);
-      if ("id".equals(columnName)) {
+      if (FeedConfiguration.ENTRY_ELEM_NAME_ID.equals(columnName)) {
         entry.setId(createEntryIdUri(value.toString()));
-      } else if ("title".equals(columnName)) {
+      } else if (FeedConfiguration.ENTRY_ELEM_NAME_TITLE.equals(columnName)) {
         entry.setTitle(value.toString());
-      } else if ("author".equals(columnName)) {
+      } else if (FeedConfiguration.ENTRY_ELEM_NAME_AUTHOR.equals(columnName)) {
         entry.addAuthor(value.toString());
-      } else if ("updated".equals(columnName) &&
+      } else if (FeedConfiguration.ENTRY_ELEM_NAME_UPDATED.equals(columnName) &&
           value instanceof java.util.Date) {
         entry.setUpdated((Date) value);
-      } else if ("link".equals(columnName)) {
+      } else if (FeedConfiguration.ENTRY_ELEM_NAME_LINK.equals(columnName)) {
         entry.addLink(value.toString());
       } else {
         Element node = doc.createElement(columnName);
@@ -160,10 +156,10 @@
       entry.setUpdated(new Date());
     }
     if (entry.getAuthor() == null) {
-      entry.addAuthor(ENTRY_AUTHOR);
+      entry.addAuthor(config.getFeedAuthor());
     }
     if (entry.getTitle() == null) {
-      entry.setTitle(ENTRY_TITLE);
+      entry.setTitle((String) config.getProperty(FeedConfiguration.PROP_ENTRY_TITLE_NAME));
     }
     entry.setContent(getDocumentAsXml(doc),"text/xml");
     addEditLinkToEntry(entry);

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/managed/FeedConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/managed/FeedConfiguration.java?rev=627798&r1=627797&r2=627798&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/managed/FeedConfiguration.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/managed/FeedConfiguration.java
Thu Feb 14 08:44:42 2008
@@ -33,12 +33,14 @@
   public static final String PROP_AUTHOR_NAME = "author";
   public static final String PROP_TITLE_NAME = "title";
   public static final String PROP_ACCEPTS = "accepts";
+  public static final String PROP_ENTRY_TITLE_NAME = "entryTitle";
   public static final String PROP_FEED_CONFIG_LOCATION_NAME = "configFile";
 
   public static final String ENTRY_ELEM_NAME_ID = "id";
   public static final String ENTRY_ELEM_NAME_TITLE = "title";
   public static final String ENTRY_ELEM_NAME_AUTHOR = "author";
   public static final String ENTRY_ELEM_NAME_UPDATED = "updated";
+  public static final String ENTRY_ELEM_NAME_LINK = "link";
 
   private final String feedId;
   private final String subUri;



Mime
View raw message