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

svn commit: r477712 - in /incubator/roller/trunk: docs/templateguide/ docs/templateguide/generated/ docs/templateguide/generated/html/ src/org/apache/roller/business/ src/org/apache/roller/business/hibernate/ src/org/apache/roller/pojos/ src/org/apache...

Author: snoopdave
Date: Tue Nov 21 07:51:53 2006
New Revision: 477712

URL: http://svn.apache.org/viewvc?view=rev&rev=477712
Log:
ROL-1246: Adding site/blog statistics methods to WeblogEntry and SiteModel

Added:
    incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide.odt   (with props)
    incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_13d4503d.gif   (with props)
    incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_1b9c380d.gif   (with props)
    incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_1eba02e4.gif   (with props)
    incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_245ede7d.gif   (with props)
    incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_30c3e854.gif   (with props)
    incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_3b1590ae.gif   (with props)
    incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_3be4c6e2.png   (with props)
    incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_46d84e54.gif   (with props)
    incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_6a9c40d8.gif   (with props)
    incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_797b2131.gif   (with props)
    incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m1f390da8.gif   (with props)
    incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m24b6c41b.gif   (with props)
    incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m25e81f83.gif   (with props)
    incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m2be1d0df.gif   (with props)
    incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m309473a9.gif   (with props)
    incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m3107805d.gif   (with props)
    incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m4016f15a.png   (with props)
    incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m4359b92f.gif   (with props)
    incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m46b36671.gif   (with props)
    incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m48cd7d3.png   (with props)
    incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m511689ba.gif   (with props)
    incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m5306fce6.gif   (with props)
    incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m5549e0bf.gif   (with props)
    incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m621ff2d2.gif   (with props)
    incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m71a47e4a.png   (with props)
    incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m71b0dc19.gif   (with props)
    incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_mc6db489.gif   (with props)
    incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_mef06a86.gif   (with props)
Modified:
    incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide.html
    incubator/roller/trunk/docs/templateguide/generated/roller-template-guide.pdf
    incubator/roller/trunk/docs/templateguide/roller-template-guide.odt
    incubator/roller/trunk/src/org/apache/roller/business/UserManager.java
    incubator/roller/trunk/src/org/apache/roller/business/WeblogManager.java
    incubator/roller/trunk/src/org/apache/roller/business/hibernate/HibernateUserManagerImpl.java
    incubator/roller/trunk/src/org/apache/roller/business/hibernate/HibernateWeblogManagerImpl.java
    incubator/roller/trunk/src/org/apache/roller/pojos/WebsiteData.java
    incubator/roller/trunk/src/org/apache/roller/ui/rendering/model/SiteModel.java
    incubator/roller/trunk/tests/org/apache/roller/business/WeblogEntryTest.java

Modified: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide.html
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide.html?view=diff&rev=477712&r1=477711&r2=477712
==============================================================================
--- incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide.html (original)
+++ incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide.html Tue Nov 21 07:51:53 2006
@@ -1,13 +1,12 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 <HTML>
 <HEAD>
-	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1">
+	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
 	<TITLE></TITLE>
-	<META NAME="GENERATOR" CONTENT="OpenOffice.org 2.0  (Solaris x86)">
+	<META NAME="GENERATOR" CONTENT="NeoOffice 2.0 Aqua Beta 3  (Unix)">
 	<META NAME="AUTHOR" CONTENT="Dave Johnson">
 	<META NAME="CREATED" CONTENT="20051209;11500200">
-	<META NAME="CHANGEDBY" CONTENT="Dave Johnson">
-	<META NAME="CHANGED" CONTENT="20061108;15394100">
+	<META NAME="CHANGED" CONTENT="20061120;14402000">
 	<META NAME="SDFOOTNOTE" CONTENT=";;;;P">
 	<META NAME="SDENDNOTE" CONTENT="ARABIC">
 	<STYLE>
@@ -54,7 +53,8 @@
 		<BR>
 		</P>
 		<P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent">
-		<FONT SIZE=7 STYLE="font-size: 40pt"><B>Template Guide</B></FONT></P>
+		<FONT SIZE=7 STYLE="font-size: 40pt"><B>Template Guide </B></FONT>
+		</P>
 		<P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent">
 		<BR>
 		</P>
@@ -67,7 +67,7 @@
 		 <FONT SIZE=5 STYLE="font-size: 20pt"><B>(incubating) </B></FONT>
 		</P>
 		<P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent"><A NAME="DDE_LINK"></A>
-		<FONT SIZE=7 STYLE="font-size: 32pt"><B>Version 3.1</B></FONT></P>
+		<FONT SIZE=7 STYLE="font-size: 32pt"><B>Version 3.2</B></FONT></P>
 		<P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
 		<BR>
 		</P>
@@ -751,7 +751,7 @@
 		<P CLASS="western"><BR><BR>
 		</P>
 		<OL>
-			<LI><P CLASS="western"><IMG SRC="roller-template-guide_html_5dc2a3fd.png" NAME="graphics1" ALIGN=LEFT WIDTH=582 HEIGHT=340 BORDER=0><BR CLEAR=LEFT><FONT SIZE=2><B>Go
+			<LI><P CLASS="western"><IMG SRC="roller-template-guide_html_m4016f15a.png" NAME="graphics1" ALIGN=LEFT WIDTH=582 HEIGHT=340 BORDER=0><BR CLEAR=LEFT><FONT SIZE=2><B>Go
 			to the Preferences-&gt;Theme page.</B><BR>Login to Roller and go
 			to your weblog's <B>Preferences-&gt;Themes</B> page. Shown below.<BR></FONT><BR><BR>
 			</P>
@@ -762,25 +762,25 @@
 			to pick the theme that you'd like to use as your starting point.
 			Once you've picked your theme, click the Save button to save it as
 			your current theme.</FONT></P>
-			<LI><P CLASS="western"><IMG SRC="roller-template-guide_html_2de01e50.png" NAME="graphics2" ALIGN=LEFT WIDTH=370 HEIGHT=94 BORDER=0><BR CLEAR=LEFT><FONT SIZE=2><B>Click
+			<LI><P CLASS="western"><IMG SRC="roller-template-guide_html_m71a47e4a.png" NAME="graphics2" ALIGN=LEFT WIDTH=370 HEIGHT=94 BORDER=0><BR CLEAR=LEFT><FONT SIZE=2><B>Click
 			the Customize button.</B><BR>Click the Customize button to
 			customize your theme. When you do this, copies of the themes page
 			templates will be copied into your weblog so you can edit them.</FONT></P>
 			<LI><P CLASS="western"><FONT SIZE=2><B>Customize your theme by
 			editing and creating page templates.</B><BR>Go to the
 			Preferences-&gt;Templates page, edit your page templates and add
-			new ones as needed &ndash; as described in the next section.</FONT></P>
+			new ones as needed – as described in the next section.</FONT></P>
 		</OL>
 		<P CLASS="western">And if you get tired of your customized theme,
 		just use the <B>Preferences-&gt;Theme</B> page to switch back to a
-		shared theme &ndash; or pick another one to customize. Now let's
+		shared theme – or pick another one to customize. Now let's
 		discuss editing and creating templates.</P>
 		<H2 CLASS="western">3.4 - Editing and creating page templates</H2>
 		<P CLASS="western">Once you've got the page templates copied into
 		your weblog, you can do just about anything you want to your theme.
 		You can use the <B>Preferences-&gt;Templates</B> page, shown below,
 		to create a new page, delete a page or choose a page to edit.</P>
-		<P CLASS="western"><IMG SRC="roller-template-guide_html_m7503a72a.png" NAME="graphics3" ALIGN=LEFT WIDTH=634 HEIGHT=352 BORDER=0><BR CLEAR=LEFT><BR><BR>
+		<P CLASS="western"><IMG SRC="roller-template-guide_html_3be4c6e2.png" NAME="graphics3" ALIGN=LEFT WIDTH=634 HEIGHT=352 BORDER=0><BR CLEAR=LEFT><BR><BR>
 		</P>
 		<P CLASS="western">Now might be a good time to describe the <I>page
 		template properties</I> since you can see them in the table above.
@@ -797,9 +797,9 @@
 			yourself as to the purpose of the page.</P>
 			<LI><P CLASS="western"><B>Link</B>: Each page template has a link
 			property, which is used to form the URL for the page. For example,
-			if the page's name is &ldquo;simple&rdquo; then the page will be
-			available at the URL &ldquo;/page/simple&rdquo; within the weblog.
-						</P>
+			if the page's name is “simple” then the page will be available
+			at the URL “/page/simple” within the weblog. 
+			</P>
 			<LI><P CLASS="western"><B>Navbar</B>: This is a flag that
 			indicates whether the page is to be shown in the weblog navigation
 			bar that is produced by the <FONT FACE="Courier New">#showPageMenu()</FONT>
@@ -816,7 +816,7 @@
 		below).</P>
 		<P CLASS="western"><BR><BR>
 		</P>
-		<P CLASS="western"><IMG SRC="roller-template-guide_html_m68e6eb1e.png" NAME="graphics4" ALIGN=LEFT WIDTH=633 HEIGHT=437 BORDER=0><BR CLEAR=LEFT><BR><BR>
+		<P CLASS="western"><IMG SRC="roller-template-guide_html_m48cd7d3.png" NAME="graphics4" ALIGN=LEFT WIDTH=633 HEIGHT=437 BORDER=0><BR CLEAR=LEFT><BR><BR>
 		</P>
 		<P CLASS="western">But the rules for <I>required pages</I> are
 		different. The weblog pages named Weblog, _day and _css are
@@ -888,8 +888,8 @@
 		dot-notation, but you must end the expression with a list of
 		parameters in parentheses. For example, if you'd like to display an
 		image from within your theme, you can use the $url model like so:</P>
-		<P STYLE="margin-bottom: 0in; background: transparent"><FONT FACE="Courier New"><FONT SIZE=2>	&lt;img='<B>$url.themeResource(&ldquo;basic&rdquo;,
-		&ldquo;background.gif&rdquo;)</B>'&gt;&lt;/a&gt;</FONT></FONT></P>
+		<P STYLE="margin-bottom: 0in; background: transparent"><FONT FACE="Courier New"><FONT SIZE=2>	&lt;img='<B>$url.themeResource(“basic”,
+		“background.gif”)</B>'&gt;&lt;/a&gt;</FONT></FONT></P>
 		<P STYLE="margin-bottom: 0in; background: transparent"><BR>
 		</P>
 		<P CLASS="western">Argument one is the name of the theme and
@@ -912,14 +912,13 @@
 		<P STYLE="margin-bottom: 0in; background: transparent"><BR>
 		</P>
 		<P CLASS="western">Argument one is the weblog for the calendar and
-		argument two is the category, where &ldquo;nil&rdquo; indicates
-		that no category is specified. Note that the arguments for a macro
-		are separated by a space and NOT a comma as was the case for
-		methods.</P>
+		argument two is the category, where “nil” indicates that no
+		category is specified. Note that the arguments for a macro are
+		separated by a space and NOT a comma as was the case for methods.</P>
 		<H2 CLASS="western">4.3 - A word about pagers</H2>
 		<P CLASS="western">There are many cases in a weblog when we want to
 		display a large collection of values and we want that collection to
-		be page-able &ndash; that is, we want a Next link to go to the next
+		be page-able – that is, we want a Next link to go to the next
 		page of results and possibly a Previous link to go to the previous
 		page. So in Roller, we've introduced the concept of a <SPAN STYLE="font-style: normal">pager</SPAN>.
 		A <I>pager</I> is a special type of object that makes it easy to
@@ -931,26 +930,26 @@
 		what a pager looks like:</P>
 		<UL>
 			<LI><P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
-			<FONT SIZE=2>$pager.homeLink 		&ndash; URL of the first page of
+			<FONT SIZE=2>$pager.homeLink 		– URL of the first page of
 			results</FONT></P>
 			<LI><P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
-			<FONT SIZE=2>$pager.homeName 		&ndash; Name to be displayed for
-			that URL</FONT></P>
+			<FONT SIZE=2>$pager.homeName 		– Name to be displayed for that
+			URL</FONT></P>
 			<LI><P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
-			<FONT SIZE=2>$pager.nextLink 			&ndash; URL of the next page of
+			<FONT SIZE=2>$pager.nextLink 			– URL of the next page of
 			results</FONT></P>
 			<LI><P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
-			<FONT SIZE=2>$pager.nextName 		&ndash; Name to be displayed for
-			that URL</FONT></P>
+			<FONT SIZE=2>$pager.nextName 		– Name to be displayed for that
+			URL</FONT></P>
 			<LI><P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
-			<FONT SIZE=2>$pager.prevLink 			&ndash; URL of the previous page
-			of results</FONT></P>
+			<FONT SIZE=2>$pager.prevLink 			– URL of the previous page of
+			results</FONT></P>
 			<LI><P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
-			<FONT SIZE=2>$pager.prevName 		&ndash; Name to be displayed for
-			that URL</FONT></P>
+			<FONT SIZE=2>$pager.prevName 		– Name to be displayed for that
+			URL</FONT></P>
 			<LI><P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
-			<FONT SIZE=2>$pager.items 			&ndash; Collection of data objects;
-			the current page of results</FONT></P>
+			<FONT SIZE=2>$pager.items 			– Collection of data objects; the
+			current page of results</FONT></P>
 		</UL>
 		<P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium"><A NAME="DDE_LINK6"></A>
 		<BR>
@@ -964,38 +963,38 @@
 		to the next months entries.</P>
 		<UL>
 			<LI><P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
-			<FONT SIZE=2>$pager.homeLink 		&ndash; URL of the first page of
+			<FONT SIZE=2>$pager.homeLink 		– URL of the first page of
 			results</FONT></P>
 			<LI><P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
-			<FONT SIZE=2>$pager.homeName 		&ndash; Name to be displayed for
-			that URL</FONT></P>
+			<FONT SIZE=2>$pager.homeName 		– Name to be displayed for that
+			URL</FONT></P>
 			<LI><P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
-			<FONT SIZE=2>$pager.nextLink 			&ndash; URL of the next page of
+			<FONT SIZE=2>$pager.nextLink 			– URL of the next page of
 			results</FONT></P>
 			<LI><P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
-			<FONT SIZE=2>$pager.nextName 		&ndash; Name to be displayed for
-			that URL</FONT></P>
+			<FONT SIZE=2>$pager.nextName 		– Name to be displayed for that
+			URL</FONT></P>
 			<LI><P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
-			<FONT SIZE=2>$pager.prevLink 			&ndash; URL of the previous page
-			of results</FONT></P>
+			<FONT SIZE=2>$pager.prevLink 			– URL of the previous page of
+			results</FONT></P>
 			<LI><P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
-			<FONT SIZE=2>$pager.prevName 		&ndash; Name to be displayed for
-			that URL</FONT></P>
+			<FONT SIZE=2>$pager.prevName 		– Name to be displayed for that
+			URL</FONT></P>
 			<LI><P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
-			<FONT SIZE=2>$pager.nextCollectionLink 	&ndash; URL of next
-			collection in sequence</FONT></P>
+			<FONT SIZE=2>$pager.nextCollectionLink 	– URL of next collection
+			in sequence</FONT></P>
 			<LI><P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
-			<FONT SIZE=2>$pager.nextCollectionName 	&ndash; Name to be
-			displayed for that URL</FONT></P>
+			<FONT SIZE=2>$pager.nextCollectionName 	– Name to be displayed
+			for that URL</FONT></P>
 			<LI><P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
-			<FONT SIZE=2>$pager.prevCollectionLink 	&ndash; URL of previous
+			<FONT SIZE=2>$pager.prevCollectionLink 	– URL of previous
 			collection in sequence</FONT></P>
 			<LI><P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
-			<FONT SIZE=2>$pager.prevCollectionName 	&ndash; Name to be
-			displayed for that URL</FONT></P>
+			<FONT SIZE=2>$pager.prevCollectionName 	– Name to be displayed
+			for that URL</FONT></P>
 			<LI><P CLASS="western" STYLE="margin-bottom: 0in; background: transparent; font-weight: medium">
-			<FONT SIZE=2>$pager.items 			&ndash; Collection of data objects;
-			the current page of results</FONT></P>
+			<FONT SIZE=2>$pager.items 			– Collection of data objects; the
+			current page of results</FONT></P>
 		</UL>
 		<P CLASS="western"><BR><BR>
 		</P>
@@ -1005,13 +1004,13 @@
 		<P CLASS="western">This section covers the standard model objects
 		available in all page templates:</P>
 		<UL>
-			<LI><P CLASS="western"><FONT SIZE=2>$config &ndash; provides
-			access to the Roller site configuration parameters</FONT></P>
-			<LI><P CLASS="western"><FONT SIZE=2>$model &ndash; provides access
-			to data for one specific weblog</FONT></P>
-			<LI><P CLASS="western"><FONT SIZE=2>$url &ndash; for creating
-			Roller URLs and URLs within one specific weblog</FONT></P>
-			<LI><P CLASS="western"><FONT SIZE=2>$utils &ndash; utility methods
+			<LI><P CLASS="western"><FONT SIZE=2>$config – provides access to
+			the Roller site configuration parameters</FONT></P>
+			<LI><P CLASS="western"><FONT SIZE=2>$model – provides access to
+			data for one specific weblog</FONT></P>
+			<LI><P CLASS="western"><FONT SIZE=2>$url – for creating Roller
+			URLs and URLs within one specific weblog</FONT></P>
+			<LI><P CLASS="western"><FONT SIZE=2>$utils – utility methods
 			needed within page templates</FONT></P>
 		</UL>
 		<P CLASS="western">For each model, we'll cover properties and
@@ -1212,7 +1211,7 @@
 		get from those. See Section 6 for a complete reference to the data
 		objects and their properties.</P>
 		<P CLASS="western"><SPAN ID="Frame1" DIR="LTR" STYLE="float: left; width: 7.06in; height: 3.96in; border: none; padding: 0in; background: #ffffff">
-			<P CLASS="frame-contents-western"><IMG SRC="roller-template-guide_html_1e560987.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_34c19140.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_mf2d7980.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_m5695ffaf.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_mf2d7980.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_mf8a9362.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_mf2d7980.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_m3f93234f.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_mf2d7980.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_m2b0639f5.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_mf2d7980.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_745e10ce.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_mf2d7980.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_6e28811.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_m610b5f75.gif" ALIGN=LEFT><IMG SRC="roller-te
 mplate-guide_html_m452b7d95.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_m3add420.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_6d3d7e5b.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_4b83d79d.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_7b24c4cc.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_a408ed3.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_m7027fa92.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_m8246857.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_m4f869ae1.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_dac7346.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_731c768.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_m4b8ab955.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_6d79f29e.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_3e97bead.gif" ALIGN=LEFT><BR><BR>
+			<P CLASS="frame-contents-western"><IMG SRC="roller-template-guide_html_m511689ba.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_1eba02e4.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_m46b36671.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_30c3e854.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_m46b36671.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_3b1590ae.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_m46b36671.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_mc6db489.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_m46b36671.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_m5549e0bf.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_m46b36671.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_1b9c380d.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_m46b36671.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_m309473a9.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_m2be1d0df.gif" ALIGN=LEFT><IMG SRC="ro
 ller-template-guide_html_m3107805d.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_245ede7d.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_13d4503d.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_mef06a86.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_m24b6c41b.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_m621ff2d2.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_m71b0dc19.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_m25e81f83.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_m5306fce6.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_m4359b92f.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_m1f390da8.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_797b2131.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_6a9c40d8.gif" ALIGN=LEFT><IMG SRC="roller-template-guide_html_46d84e54.gif" ALIGN=LEFT><BR><BR>
 			</P>
 		</SPAN><BR CLEAR=LEFT><BR><BR>
 		</P>
@@ -3028,11 +3027,14 @@
 		<P CLASS="western"><B>Weblog Methods</B></P>
 		<UL>
 			<UL>
+				<LI><P CLASS="western" STYLE="font-weight: medium"><B>WeblogEntry
+				getWeblogEntry(String anchor)<BR></B>Get an individual weblog
+				entry by the entry's anchor, which is unique within a weblog.</P>
 				<LI><P CLASS="western" STYLE="font-weight: medium"><B>List
 				getRecentWeblogEntries(String cat, int max)</B><BR>Get most
 				recent WeblogEntries in the weblog up to the number max. You can
 				specify a category name if you'd liike only entries from one
-				category (or &ldquo;nil&rdquo; for all categories). 
+				category (or “nil” for all categories). 
 				</P>
 				<LI><P CLASS="western" STYLE="font-weight: medium"><B>List
 				getRecentComments(int max)</B><BR>Get most recent Comments in the
@@ -3677,7 +3679,7 @@
 		<UL>
 			<LI><P CLASS="western"><B>#showWeblogEntryCalendar($weblog
 			$category)</B><BR>Show weblog entry calendar, optionally
-			restricted by category name (&ldquo;nil&rdquo; for no category)</P>
+			restricted by category name (“nil” for no category)</P>
 			<LI><P CLASS="western"><B>#includeTemplate($weblog
 			$pageName)</B><BR>Parse and include a page template into the
 			current page tempate.</P>
@@ -3898,8 +3900,8 @@
 		<H2 CLASS="western">8.2 - $planet</H2>
 		<P CLASS="western">The <B>$planet</B> model makes Planet Roller
 		data available to weblog pages. It allows you to display the main
-		aggregation (i.e. the one named &ldquo;external&rdquo;), any custom
-		group aggregation, a feed and ranked subscriptions.</P>
+		aggregation (i.e. the one named “external”), any custom group
+		aggregation, a feed and ranked subscriptions.</P>
 		<H3 CLASS="western">8.2.1 - $planet Objects</H3>
 		<P CLASS="western">The $planet model returns two types of objects
 		that we haven't seen before: the PlanetSubscription object, which

Added: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide.odt
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide.odt?view=auto&rev=477712
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide.odt
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_13d4503d.gif
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_13d4503d.gif?view=auto&rev=477712
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_13d4503d.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_1b9c380d.gif
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_1b9c380d.gif?view=auto&rev=477712
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_1b9c380d.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_1eba02e4.gif
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_1eba02e4.gif?view=auto&rev=477712
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_1eba02e4.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_245ede7d.gif
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_245ede7d.gif?view=auto&rev=477712
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_245ede7d.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_30c3e854.gif
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_30c3e854.gif?view=auto&rev=477712
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_30c3e854.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_3b1590ae.gif
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_3b1590ae.gif?view=auto&rev=477712
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_3b1590ae.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_3be4c6e2.png
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_3be4c6e2.png?view=auto&rev=477712
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_3be4c6e2.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_46d84e54.gif
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_46d84e54.gif?view=auto&rev=477712
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_46d84e54.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_6a9c40d8.gif
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_6a9c40d8.gif?view=auto&rev=477712
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_6a9c40d8.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_797b2131.gif
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_797b2131.gif?view=auto&rev=477712
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_797b2131.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m1f390da8.gif
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m1f390da8.gif?view=auto&rev=477712
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m1f390da8.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m24b6c41b.gif
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m24b6c41b.gif?view=auto&rev=477712
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m24b6c41b.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m25e81f83.gif
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m25e81f83.gif?view=auto&rev=477712
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m25e81f83.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m2be1d0df.gif
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m2be1d0df.gif?view=auto&rev=477712
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m2be1d0df.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m309473a9.gif
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m309473a9.gif?view=auto&rev=477712
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m309473a9.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m3107805d.gif
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m3107805d.gif?view=auto&rev=477712
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m3107805d.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m4016f15a.png
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m4016f15a.png?view=auto&rev=477712
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m4016f15a.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m4359b92f.gif
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m4359b92f.gif?view=auto&rev=477712
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m4359b92f.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m46b36671.gif
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m46b36671.gif?view=auto&rev=477712
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m46b36671.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m48cd7d3.png
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m48cd7d3.png?view=auto&rev=477712
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m48cd7d3.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m511689ba.gif
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m511689ba.gif?view=auto&rev=477712
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m511689ba.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m5306fce6.gif
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m5306fce6.gif?view=auto&rev=477712
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m5306fce6.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m5549e0bf.gif
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m5549e0bf.gif?view=auto&rev=477712
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m5549e0bf.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m621ff2d2.gif
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m621ff2d2.gif?view=auto&rev=477712
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m621ff2d2.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m71a47e4a.png
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m71a47e4a.png?view=auto&rev=477712
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m71a47e4a.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m71b0dc19.gif
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m71b0dc19.gif?view=auto&rev=477712
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_m71b0dc19.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_mc6db489.gif
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_mc6db489.gif?view=auto&rev=477712
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_mc6db489.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_mef06a86.gif
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_mef06a86.gif?view=auto&rev=477712
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/templateguide/generated/html/roller-template-guide_html_mef06a86.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: incubator/roller/trunk/docs/templateguide/generated/roller-template-guide.pdf
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/docs/templateguide/generated/roller-template-guide.pdf?view=diff&rev=477712&r1=477711&r2=477712
==============================================================================
Binary files - no diff available.

Modified: incubator/roller/trunk/docs/templateguide/roller-template-guide.odt
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/docs/templateguide/roller-template-guide.odt?view=diff&rev=477712&r1=477711&r2=477712
==============================================================================
Binary files - no diff available.

Modified: incubator/roller/trunk/src/org/apache/roller/business/UserManager.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/business/UserManager.java?view=diff&rev=477712&r1=477711&r2=477712
==============================================================================
--- incubator/roller/trunk/src/org/apache/roller/business/UserManager.java (original)
+++ incubator/roller/trunk/src/org/apache/roller/business/UserManager.java Tue Nov 21 07:51:53 2006
@@ -361,6 +361,18 @@
      * Get website's pages
      */
     public List getPages(WebsiteData w) throws RollerException;
+   
+    
+    /**
+     * Get count of active weblogs
+     */    
+    public long getWeblogCount() throws RollerException;
+
+    
+    /**
+     * Get count of enabled users
+     */    
+    public long getUserCount() throws RollerException; 
     
     
     /**

Modified: incubator/roller/trunk/src/org/apache/roller/business/WeblogManager.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/business/WeblogManager.java?view=diff&rev=477712&r1=477711&r2=477712
==============================================================================
--- incubator/roller/trunk/src/org/apache/roller/business/WeblogManager.java (original)
+++ incubator/roller/trunk/src/org/apache/roller/business/WeblogManager.java Tue Nov 21 07:51:53 2006
@@ -492,5 +492,32 @@
      * @throws RollerException If there was a problem with the backend.
      */
     public void resetHitCount(WebsiteData weblog) throws RollerException;
+
     
+    /**
+     * Get site-wide comment count 
+     */
+    public long getCommentCount() throws RollerException;
+
+    
+    /**
+     * Get weblog comment count 
+     */    
+    public long getCommentCount(WebsiteData websiteData) throws RollerException;
+
+    
+    /**
+     * Get site-wide entry count 
+     */    
+    public long getEntryCount() throws RollerException;
+
+    
+    /**
+     * Get weblog entry count 
+     */    
+    public long getEntryCount(WebsiteData websiteData) throws RollerException;
+   
 }
+
+
+

Modified: incubator/roller/trunk/src/org/apache/roller/business/hibernate/HibernateUserManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/business/hibernate/HibernateUserManagerImpl.java?view=diff&rev=477712&r1=477711&r2=477712
==============================================================================
--- incubator/roller/trunk/src/org/apache/roller/business/hibernate/HibernateUserManagerImpl.java (original)
+++ incubator/roller/trunk/src/org/apache/roller/business/hibernate/HibernateUserManagerImpl.java Tue Nov 21 07:51:53 2006
@@ -943,6 +943,41 @@
             throw new RollerException(msg, pe);
         }
     }
+    
+    
+    /**
+     * Get count of weblogs, active and inactive
+     */    
+    public long getWeblogCount() throws RollerException {
+        long ret = 0;
+        try {
+            Session session = ((HibernatePersistenceStrategy)strategy).getSession();
+            String query = "select count(distinct w) from WebsiteData w";
+            List result = session.createQuery(query).list();
+            ret = ((Integer)result.get(0)).intValue();
+        } catch (Exception e) {
+            throw new RollerException(e);
+        }
+        return ret;
+    }
+
+    
+    /**
+     * Get count of users, enabled only
+     */    
+    public long getUserCount() throws RollerException {
+        long ret = 0;
+        try {
+            Session session = ((HibernatePersistenceStrategy)strategy).getSession();
+            String query = "select count(distinct u) from UserData u where u.enabled=true";
+            List result = session.createQuery(query).list();
+            ret = ((Integer)result.get(0)).intValue();
+        } catch (Exception e) {
+            throw new RollerException(e);
+        }
+        return ret;
+    }
+    
      
     /** Doesn't seem to be any other way to get ignore case w/o QBE */
     class IgnoreCaseEqExpression extends SimpleExpression {

Modified: incubator/roller/trunk/src/org/apache/roller/business/hibernate/HibernateWeblogManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/business/hibernate/HibernateWeblogManagerImpl.java?view=diff&rev=477712&r1=477711&r2=477712
==============================================================================
--- incubator/roller/trunk/src/org/apache/roller/business/hibernate/HibernateWeblogManagerImpl.java (original)
+++ incubator/roller/trunk/src/org/apache/roller/business/hibernate/HibernateWeblogManagerImpl.java Tue Nov 21 07:51:53 2006
@@ -1524,4 +1524,71 @@
         }
     }
     
+    /**
+     * Get site-wide comment count 
+     */
+    public long getCommentCount() throws RollerException {
+        long ret = 0;
+        try {
+            Session session = ((HibernatePersistenceStrategy)strategy).getSession();
+            String query = "select count(distinct c) from CommentData c";
+            List result = session.createQuery(query).list();
+            ret = ((Integer)result.get(0)).intValue();
+        } catch (Exception e) {
+            throw new RollerException(e);
+        }
+        return ret;
+    }
+
+    
+    /**
+     * Get weblog comment count 
+     */    
+    public long getCommentCount(WebsiteData website) throws RollerException {
+        long ret = 0;
+        try {
+            Session session = ((HibernatePersistenceStrategy)strategy).getSession();
+            String query = "select count(distinct c) from CommentData c where c.weblogEntry.website=?";
+            List result = session.createQuery(query).setParameter(0,website).list();
+            ret = ((Integer)result.get(0)).intValue();
+        } catch (Exception e) {
+            throw new RollerException(e);
+        }
+        return ret;
+    }
+
+    
+    /**
+     * Get site-wide entry count 
+     */    
+    public long getEntryCount() throws RollerException {
+        long ret = 0;
+        try {
+            Session session = ((HibernatePersistenceStrategy)strategy).getSession();
+            String query = "select count(distinct e) from WeblogEntryData e where e.status='PUBLISHED'";
+            List result = session.createQuery(query).list();
+            ret = ((Integer)result.get(0)).intValue();
+        } catch (Exception e) {
+            throw new RollerException(e);
+        }
+        return ret;
+    }
+
+    
+    /**
+     * Get weblog entry count 
+     */    
+    public long getEntryCount(WebsiteData website) throws RollerException {
+        long ret = 0;
+        try {
+            Session session = ((HibernatePersistenceStrategy)strategy).getSession();
+            String query = "select count(distinct e) from WeblogEntryData e where e.status='PUBLISHED' and e.website=?";
+            List result = session.createQuery(query).setParameter(0,website).list();
+            ret = ((Integer)result.get(0)).intValue();
+        } catch (Exception e) {
+            throw new RollerException(e);
+        }
+        return ret;
+    }
+    
 }

Modified: incubator/roller/trunk/src/org/apache/roller/pojos/WebsiteData.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/pojos/WebsiteData.java?view=diff&rev=477712&r1=477711&r2=477712
==============================================================================
--- incubator/roller/trunk/src/org/apache/roller/pojos/WebsiteData.java (original)
+++ incubator/roller/trunk/src/org/apache/roller/pojos/WebsiteData.java Tue Nov 21 07:51:53 2006
@@ -1127,6 +1127,23 @@
         return initializedPlugins;
     }
     
+    /** 
+     * 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;
+    }
     
     /**
      * Returns categories under the default category of the weblog.
@@ -1309,13 +1326,15 @@
             return (hitCount != null) ? hitCount.getDailyHits() : 0;
             
         } catch (RollerException e) {
-            log.error("PageModel getTotalHits()", e);
+            log.error("Error getting weblog hit count", e);
         }
         return 0;
     }
     
-    
-    
+    /** No-op method to please XDoclet */
+    public void setTodaysHits(int ignored) {}
+
+        
     /**
      * Get a list of TagStats objects for the most popular tags
      *
@@ -1339,12 +1358,50 @@
             WeblogManager wmgr = roller.getWeblogManager();
             results = wmgr.getPopularTags(this, startDate, length);
         } catch (Exception e) {
-            log.error("ERROR: fetching weblog tags list", e);
+            log.error("ERROR: fetching popular tags for weblog " + this.getName(), e);
         }
         return results;
     }      
+
+    /**
+     * @roller.wrapPojoMethod type="simple"
+     */
+    public long getCommentCount() {
+        long count = 0;
+        try {
+            Roller roller = RollerFactory.getRoller();
+            WeblogManager mgr = roller.getWeblogManager();
+            count = mgr.getCommentCount(this);            
+        } catch (RollerException e) {
+            log.error("Error getting comment count for weblog " + this.getName(), e);
+        }
+        return count;
+    }
     
     /** No-op method to please XDoclet */
-    public void setTodaysHits(int ignored) {}
+    public void setCommentCount(int ignored) {}
+    
+    /**
+     * @roller.wrapPojoMethod type="simple"
+     */
+    public long getEntryCount() {
+        long count = 0;
+        try {
+            Roller roller = RollerFactory.getRoller();
+            WeblogManager mgr = roller.getWeblogManager();
+            count = mgr.getEntryCount(this);            
+        } catch (RollerException e) {
+            log.error("Error getting entry count for weblog " + this.getName(), e);
+        }
+        return count;
+    }
+
+    /** No-op method to please XDoclet */
+    public void setEntryCount(int ignored) {}
+    
 }
+
+
+
+
 

Modified: incubator/roller/trunk/src/org/apache/roller/ui/rendering/model/SiteModel.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/ui/rendering/model/SiteModel.java?view=diff&rev=477712&r1=477711&r2=477712
==============================================================================
--- incubator/roller/trunk/src/org/apache/roller/ui/rendering/model/SiteModel.java (original)
+++ incubator/roller/trunk/src/org/apache/roller/ui/rendering/model/SiteModel.java Tue Nov 21 07:51:53 2006
@@ -516,6 +516,58 @@
             log.error("ERROR: fetching site tags list", e);
         }
         return results;
-    }    
+    }   
+    
+    
+    public long getCommentCount() {
+        long count = 0;
+        try {
+            Roller roller = RollerFactory.getRoller();
+            WeblogManager mgr = roller.getWeblogManager();
+            count = mgr.getCommentCount();            
+        } catch (RollerException e) {
+            log.error("Error getting comment count for site ", e);
+        }
+        return count;
+    }
+    
+    
+    public long getEntryCount() {
+        long count = 0;
+        try {
+            Roller roller = RollerFactory.getRoller();
+            WeblogManager mgr = roller.getWeblogManager();
+            count = mgr.getEntryCount();            
+        } catch (RollerException e) {
+            log.error("Error getting entry count for site", e);
+        }
+        return count;
+    }
+    
+    
+    public long getWeblogCount() {
+        long count = 0;
+        try {
+            Roller roller = RollerFactory.getRoller();
+            UserManager mgr = roller.getUserManager();
+            count = mgr.getWeblogCount();            
+        } catch (RollerException e) {
+            log.error("Error getting weblog count for site", e);
+        }
+        return count;
+    } 
+    
+    
+    public long getUserCount() {
+        long count = 0;
+        try {
+            Roller roller = RollerFactory.getRoller();
+            UserManager mgr = roller.getUserManager();
+            count = mgr.getUserCount();            
+        } catch (RollerException e) {
+            log.error("Error getting user count for site", e);
+        }
+        return count;
+    }
     
 }

Modified: incubator/roller/trunk/tests/org/apache/roller/business/WeblogEntryTest.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/tests/org/apache/roller/business/WeblogEntryTest.java?view=diff&rev=477712&r1=477711&r2=477712
==============================================================================
--- incubator/roller/trunk/tests/org/apache/roller/business/WeblogEntryTest.java (original)
+++ incubator/roller/trunk/tests/org/apache/roller/business/WeblogEntryTest.java Tue Nov 21 07:51:53 2006
@@ -32,8 +32,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.roller.TestUtils;
-import org.apache.roller.business.RollerFactory;
-import org.apache.roller.business.WeblogManager;
+import org.apache.roller.pojos.CommentData;
 import org.apache.roller.pojos.TagStat;
 import org.apache.roller.pojos.UserData;
 import org.apache.roller.pojos.WeblogEntryData;
@@ -867,4 +866,73 @@
         // TODO: implement entry attribute test
     }
     
+    
+    public void testWeblogStats() throws Exception {
+        
+        WeblogManager wmgr = RollerFactory.getRoller().getWeblogManager();
+        UserManager umgr = RollerFactory.getRoller().getUserManager();
+        
+        UserData user1 = TestUtils.setupUser("statuser1");
+        WebsiteData blog1 = TestUtils.setupWeblog("statblog1", user1);
+        WebsiteData blog2 = TestUtils.setupWeblog("statblog2", user1);
+
+        WebsiteData blog3 = TestUtils.setupWeblog("statblog3", user1);
+        blog3.setEnabled(Boolean. FALSE);
+        umgr.saveWebsite(blog3);
+
+        WeblogEntryData entry1 = TestUtils.setupWeblogEntry("entry1", 
+                testWeblog.getDefaultCategory(), blog1, user1);
+        WeblogEntryData entry2 = TestUtils.setupWeblogEntry("entry2", 
+                testWeblog.getDefaultCategory(), blog1, user1);
+        
+        WeblogEntryData entry3 = TestUtils.setupWeblogEntry("entry3", 
+                testWeblog.getDefaultCategory(), blog2, user1);
+        WeblogEntryData entry4 = TestUtils.setupWeblogEntry("entry4", 
+                testWeblog.getDefaultCategory(), blog2, user1);
+        WeblogEntryData entry5 = TestUtils.setupWeblogEntry("entry5", 
+                testWeblog.getDefaultCategory(), blog2, user1);
+               
+        CommentData comment1 = TestUtils.setupComment("comment1", entry1);
+        CommentData comment2 = TestUtils.setupComment("comment2", entry1);
+        
+        CommentData comment3 = TestUtils.setupComment("comment3", entry3);
+        CommentData comment4 = TestUtils.setupComment("comment4", entry3);
+        CommentData comment5 = TestUtils.setupComment("comment5", entry3);
+
+        try {
+            assertEquals(2L, blog1.getEntryCount());
+            assertEquals(3L, blog2.getEntryCount());
+            assertEquals(5L, wmgr.getEntryCount());
+
+            assertEquals(2L, blog1.getCommentCount());
+            assertEquals(3L, blog2.getCommentCount());
+            assertEquals(5L, wmgr.getCommentCount());
+
+            assertEquals(4L, umgr.getWeblogCount());
+            assertEquals(2L, umgr.getUserCount());
+            
+        } finally {
+            
+            TestUtils.teardownComment(comment1.getId());
+            TestUtils.teardownComment(comment2.getId());
+            TestUtils.teardownComment(comment3.getId());
+            TestUtils.teardownComment(comment4.getId());
+            TestUtils.teardownComment(comment5.getId());
+
+            TestUtils.teardownWeblogEntry(entry1.getId());
+            TestUtils.teardownWeblogEntry(entry2.getId());
+            TestUtils.teardownWeblogEntry(entry3.getId());
+            TestUtils.teardownWeblogEntry(entry4.getId());
+            TestUtils.teardownWeblogEntry(entry5.getId());
+
+            TestUtils.teardownWeblog(blog1.getId());
+            TestUtils.teardownWeblog(blog2.getId());
+            TestUtils.teardownWeblog(blog3.getId());
+
+            TestUtils.teardownUser(user1.getId());            
+        }
+    }
 }
+
+
+