roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r575094 - /roller/branches/roller_3.1/src/org/apache/roller/pojos/WebsiteData.java
Date Wed, 12 Sep 2007 21:53:25 GMT
Author: snoopdave
Date: Wed Sep 12 14:53:24 2007
New Revision: 575094

URL: http://svn.apache.org/viewvc?rev=575094&view=rev
Log:
Adding weblog.getWeblogEntry()

Modified:
    roller/branches/roller_3.1/src/org/apache/roller/pojos/WebsiteData.java

Modified: roller/branches/roller_3.1/src/org/apache/roller/pojos/WebsiteData.java
URL: http://svn.apache.org/viewvc/roller/branches/roller_3.1/src/org/apache/roller/pojos/WebsiteData.java?rev=575094&r1=575093&r2=575094&view=diff
==============================================================================
--- roller/branches/roller_3.1/src/org/apache/roller/pojos/WebsiteData.java (original)
+++ roller/branches/roller_3.1/src/org/apache/roller/pojos/WebsiteData.java Wed Sep 12 14:53:24
2007
@@ -1344,5 +1344,24 @@
     
     /** No-op method to please XDoclet */
     public void setTodaysHits(int ignored) {}
+    
+    
+    /** 
+     * Get weblog entry specified by anchor or null if no such entry exists.
+     * @param anchor Weblog entry anchor
+     * @return Weblog entry specified by anchor
+     * @roller.wrapPojoMethod type="simple"
+     */
+    public WeblogEntryData getWeblogEntry(String anchor) {
+        WeblogEntryData entry = null;
+        try {
+            Roller roller = RollerFactory.getRoller();
+            WeblogManager wmgr = roller.getWeblogManager();
+            entry = wmgr.getWeblogEntryByAnchor(this, anchor);
+        } catch (RollerException e) {
+            this.log.error("ERROR: getting entry by anchor");
+        }
+        return entry;
+    }
 }
 



Mime
View raw message