You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by ag...@apache.org on 2006/06/21 05:12:11 UTC

svn commit: r415880 - /incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/core/RollerContext.java

Author: agilliland
Date: Tue Jun 20 20:12:11 2006
New Revision: 415880

URL: http://svn.apache.org/viewvc?rev=415880&view=rev
Log:
adding 2 new convenience methods for determining if a weblog handle is the frontpage weblog and if that weblog is rendering site-wide data.


Modified:
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/core/RollerContext.java

Modified: incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/core/RollerContext.java
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/core/RollerContext.java?rev=415880&r1=415879&r2=415880&view=diff
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/core/RollerContext.java (original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/core/RollerContext.java Tue Jun 20 20:12:11 2006
@@ -497,6 +497,32 @@
     }
     
     
+    /**
+     * Convenience method for Roller classes trying to determine if a given
+     * weblog handle represents the front page blog.
+     */
+    public boolean isFrontPageWeblog(String weblogHandle) {
+        
+        String frontPageHandle = RollerConfig.getProperty("frontpage.weblog.handle");
+        
+        return (frontPageHandle.equals(weblogHandle));
+    }
+    
+    
+    /**
+     * Convenience method for Roller classes trying to determine if a given
+     * weblog handle represents the front page blog configured to render
+     * site-wide data.
+     */
+    public boolean isSiteWideWeblog(String weblogHandle) {
+        
+        boolean siteWide = 
+                RollerConfig.getBooleanProperty("frontpage.weblog.aggregatedFeeds");
+        
+        return (isFrontPageWeblog(weblogHandle) && siteWide);
+    }
+    
+    
     public String createEntryPermalink(
             WeblogEntryData entry,
             HttpServletRequest request,