[jboss-cvs] JBossBlog SVN: r195 - in trunk: lib and 12 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Feb 7 04:36:09 EST 2008


Author: adamw
Date: 2008-02-07 04:36:09 -0500 (Thu, 07 Feb 2008)
New Revision: 195

Added:
   trunk/lib/hibernate3.jar
Removed:
   trunk/src/model/org/jboss/blog/model/post/filter/FilterAddBean.java
Modified:
   trunk/build.xml
   trunk/resources/META-INF/persistence-dev.xml
   trunk/resources/META-INF/persistence-prod.xml
   trunk/resources/messages_en.properties
   trunk/src/action/org/jboss/blog/session/cache/CacheManagerHashMapImpl.java
   trunk/src/action/org/jboss/blog/session/group/GroupModBean.java
   trunk/src/action/org/jboss/blog/session/update/UpdateManager.java
   trunk/src/tools/org/jboss/blog/tools/StripHtmlBridge.java
   trunk/view/common/next_previous_navigation.xhtml
   trunk/view/manage/feed_mod.xhtml
   trunk/view/manage/remote/remote_add.xhtml
   trunk/view/manage/remote/remote_edit.xhtml
   trunk/view/manage/remote/remote_mod.xhtml
   trunk/view/manage/remote/remote_propose.xhtml
   trunk/view/search/search.xhtml
   trunk/view/view/feed_toolbar.xhtml
Log:


Modified: trunk/build.xml
===================================================================
--- trunk/build.xml	2008-02-06 17:21:00 UTC (rev 194)
+++ trunk/build.xml	2008-02-07 09:36:09 UTC (rev 195)
@@ -180,10 +180,12 @@
 
                 <!--<include name="lib/ehcache*.jar" />-->
 
+                <!-- Moved to server/default/lib
+                <include name="lib/hibernate*.jar" />
+                
                 <include name="lib/lucene-core.jar" />
-                <!--<include name="lib/hibernate*.jar" />-->
                 <include name="lib/hibernate-search.jar" />
-                <include name="lib/hibernate-commons-annotations.jar" />
+                <include name="lib/hibernate-commons-annotations.jar" />-->
 
                 <!-- moved from the war goal -->
                 <include name="lib/richfaces-impl*.jar" />
@@ -260,6 +262,8 @@
                 <include name="jdom*.jar" />
                 <include name="jericho-html-*.jar" />
                 <include name="htmlcleaner*.jar" />
+                <include name="hibernate*.jar" />
+                <include name="lucene*.jar" />
             </fileset>
         </copy>
     </target>

Added: trunk/lib/hibernate3.jar
===================================================================
(Binary files differ)


Property changes on: trunk/lib/hibernate3.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: trunk/resources/META-INF/persistence-dev.xml
===================================================================
--- trunk/resources/META-INF/persistence-dev.xml	2008-02-06 17:21:00 UTC (rev 194)
+++ trunk/resources/META-INF/persistence-dev.xml	2008-02-07 09:36:09 UTC (rev 195)
@@ -28,8 +28,8 @@
 
             <property name="hibernate.cache.use_query_cache" value="true"/>
             <property name="hibernate.cache.use_second_level_cache" value="true"/>
-            <property name="hibernate.cache.provider_class" value="org.hibernate.cache.EhCacheProvider" />
-            <property name="hibernate.cache.provider_configuration_file_resource_path" value="blog-ehcache.xml" />
+            <!--<property name="hibernate.cache.provider_class" value="org.hibernate.cache.EhCacheProvider" />
+            <property name="hibernate.cache.provider_configuration_file_resource_path" value="blog-ehcache.xml" />-->
             
             <!-- TODO Search -->
             <!-- use a file system based index -->

Modified: trunk/resources/META-INF/persistence-prod.xml
===================================================================
--- trunk/resources/META-INF/persistence-prod.xml	2008-02-06 17:21:00 UTC (rev 194)
+++ trunk/resources/META-INF/persistence-prod.xml	2008-02-07 09:36:09 UTC (rev 195)
@@ -25,6 +25,11 @@
             <property name="hibernate.connection.useUnicode" value="true" />
             <property name="hibernate.connection.characterEncoding" value="UTF-8" />
 
+            <property name="hibernate.cache.use_query_cache" value="true"/>
+            <property name="hibernate.cache.use_second_level_cache" value="true"/>
+            <property name="hibernate.cache.provider_class" value="org.hibernate.cache.EhCacheProvider" />
+            <property name="hibernate.cache.provider_configuration_file_resource_path" value="blog-ehcache.xml" />
+
             <!-- Search -->
             <!-- use a file system based index -->
             <property name="hibernate.search.default.directory_provider"

Modified: trunk/resources/messages_en.properties
===================================================================
--- trunk/resources/messages_en.properties	2008-02-06 17:21:00 UTC (rev 194)
+++ trunk/resources/messages_en.properties	2008-02-07 09:36:09 UTC (rev 195)
@@ -91,7 +91,7 @@
 blog.feed.deleted=Feed {0} deleted.
 blog.feed.updated=Feed {0} updated.
 blog.feed.added=Feed {0} added.
-blog.feed.accepted=Feed {0} accepted.
+blog.feed.accepted=Feed {0} accepted. Its posts will bead read and saved in a couple of minutes.
 
 blog.template.deleted=Template {0} of type {1} deleted.
 blog.template.updated=Template {0} of type {1} updated.
@@ -100,6 +100,8 @@
 
 blog.feed.remote.updated=Remote feed's {0} address changed.
 blog.feed.remote.invalid=Property: #0, #1.
+blog.feed.remote.adding.quickstart=Enter your atom/rss2 feed address in the box below; if it is correct \
+  and the feed parses without any problems, you'll be able to proceed and fill in other details of the new feed.
 
 blog.feed.aggregated.updated=Aggregated feed {0} changed.
 
@@ -111,6 +113,7 @@
 blog.group.deleted=Group '{0}' ({1}) deleted.
 blog.group.updated=Group '{0}' ({1}) updated.
 blog.group.added=Group '{0}' ({1}) added.
+blog.group.cannotdelete=Cannot delete group '{0}' ({1}), as there are still feeds assigned to it.
 
 blog.post.deleted=Post '{0}' deleted.
 

Modified: trunk/src/action/org/jboss/blog/session/cache/CacheManagerHashMapImpl.java
===================================================================
--- trunk/src/action/org/jboss/blog/session/cache/CacheManagerHashMapImpl.java	2008-02-06 17:21:00 UTC (rev 194)
+++ trunk/src/action/org/jboss/blog/session/cache/CacheManagerHashMapImpl.java	2008-02-07 09:36:09 UTC (rev 195)
@@ -3,7 +3,9 @@
 import org.jboss.seam.annotations.Name;
 import org.jboss.seam.annotations.Logger;
 import org.jboss.seam.annotations.AutoCreate;
+import org.jboss.seam.annotations.Scope;
 import org.jboss.seam.log.Log;
+import org.jboss.seam.ScopeType;
 import org.jboss.blog.model.feed.RestrictedFeed;
 import org.jboss.blog.model.RestrictedPost;
 import org.jboss.blog.session.xml.content.InMemoryContentResponse;
@@ -19,6 +21,7 @@
  * @author <a href="mailto:adam at warski.org">Adam Warski</a>
  */
 @Name("cacheManager")
+ at Scope(ScopeType.APPLICATION)
 @AutoCreate
 public class CacheManagerHashMapImpl implements CacheManager {
     @Logger

Modified: trunk/src/action/org/jboss/blog/session/group/GroupModBean.java
===================================================================
--- trunk/src/action/org/jboss/blog/session/group/GroupModBean.java	2008-02-06 17:21:00 UTC (rev 194)
+++ trunk/src/action/org/jboss/blog/session/group/GroupModBean.java	2008-02-07 09:36:09 UTC (rev 195)
@@ -49,6 +49,13 @@
     }
 
     public void delete() {
+        if (group.getFeeds().size() > 0) {
+            facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_INFO, "blog.group.cannotdelete",
+                    group.getDisplayName(), group.getName());
+
+            return;
+        }
+
         entityManager.remove(group);
 
         facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_INFO, "blog.group.deleted", group.getDisplayName(),

Modified: trunk/src/action/org/jboss/blog/session/update/UpdateManager.java
===================================================================
--- trunk/src/action/org/jboss/blog/session/update/UpdateManager.java	2008-02-06 17:21:00 UTC (rev 194)
+++ trunk/src/action/org/jboss/blog/session/update/UpdateManager.java	2008-02-07 09:36:09 UTC (rev 195)
@@ -34,6 +34,7 @@
     }
 
     // TODO: the cache in this thread is not updated
+    // TODO: EhCache or hashtable cache? If not ehcache -> remove the jar
     private static class UpdateRunnable implements Runnable {
         public void run() {
             boolean createContexts = !Contexts.isEventContextActive() && !Contexts.isApplicationContextActive();

Deleted: trunk/src/model/org/jboss/blog/model/post/filter/FilterAddBean.java
===================================================================
--- trunk/src/model/org/jboss/blog/model/post/filter/FilterAddBean.java	2008-02-06 17:21:00 UTC (rev 194)
+++ trunk/src/model/org/jboss/blog/model/post/filter/FilterAddBean.java	2008-02-07 09:36:09 UTC (rev 195)
@@ -1,57 +0,0 @@
-package org.jboss.blog.model.post.filter;
-
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.ScopeType;
-import org.jboss.blog.model.post.PostFilter;
-
-import java.util.List;
-
-/**
- * @author <a href="mailto:adam at warski.org">Adam Warski</a>
- */
- at Name("filterAdd")
- at Scope(ScopeType.CONVERSATION)
-public class FilterAddBean {
-    private List<PostFilter> addToList;
-
-    private PodcastFilter podcastFilter;
-
-    private NotPodcastFilter notPodcastFilter;
-
-    private AuthorRegexpFilter authorRegexpFilter;
-
-    public PodcastFilter getPodcastFilter() {
-        if (podcastFilter == null) {
-            podcastFilter = new PodcastFilter();
-        }
-
-        return podcastFilter;
-    }
-
-    public NotPodcastFilter getNotPodcastFilter() {
-        if (notPodcastFilter == null) {
-            notPodcastFilter =  new NotPodcastFilter();
-        }
-
-        return notPodcastFilter;
-    }
-
-    public AuthorRegexpFilter getAuthorRegexpFilter() {
-        if (authorRegexpFilter == null) {
-            authorRegexpFilter = new AuthorRegexpFilter();
-        }
-        
-        return authorRegexpFilter;
-    }
-
-    public void add(PostFilter filter) {
-        addToList.add(filter);
-    }
-
-    public void addToList(List<PostFilter> addToList) {
-        this.addToList = addToList;
-    }
-
-    public void cancel() { }
-}

Modified: trunk/src/tools/org/jboss/blog/tools/StripHtmlBridge.java
===================================================================
--- trunk/src/tools/org/jboss/blog/tools/StripHtmlBridge.java	2008-02-06 17:21:00 UTC (rev 194)
+++ trunk/src/tools/org/jboss/blog/tools/StripHtmlBridge.java	2008-02-07 09:36:09 UTC (rev 195)
@@ -1,7 +1,6 @@
 package org.jboss.blog.tools;
 
 import org.hibernate.search.bridge.StringBridge;
-import org.jboss.blog.tools.StringTools;
 
 /**
  * @author <a href="mailto:adam at warski.org">Adam Warski</a>

Modified: trunk/view/common/next_previous_navigation.xhtml
===================================================================
--- trunk/view/common/next_previous_navigation.xhtml	2008-02-06 17:21:00 UTC (rev 194)
+++ trunk/view/common/next_previous_navigation.xhtml	2008-02-07 09:36:09 UTC (rev 195)
@@ -19,7 +19,7 @@
         </s:link>
     </li>
 
-    <s:fragment rendered="#{navigationBean.showNext || navigationBean.showPrevious}">
+    <s:fragment rendered="#{(navigationBean.showNext || navigationBean.showPrevious) and showColon}">
         <li>:</li>
     </s:fragment>
 </ui:composition>
\ No newline at end of file

Modified: trunk/view/manage/feed_mod.xhtml
===================================================================
--- trunk/view/manage/feed_mod.xhtml	2008-02-06 17:21:00 UTC (rev 194)
+++ trunk/view/manage/feed_mod.xhtml	2008-02-07 09:36:09 UTC (rev 195)
@@ -8,6 +8,23 @@
                 xmlns:rich="http://richfaces.org/rich"
                 xmlns:blog="http://jboss.org/blog/tags"
                 xmlns:a="http://richfaces.org/a4j">
+<div class="QuickstartMargin" id="QuickStart">
+    <ul>
+        <li>
+            <p>Please fill in all the details that are necessary to handle your feed.</p>
+        </li>
+        <li>
+            <p>If posts in your feed do not contain author information, tick the checkbox near the bottom; then
+                the author of the blog will automatically become the author of the post.</p>
+        </li>
+        <li>
+            <p>Also, choose an atom template that suites the type of your feed. Most of the time, 'standard' will
+                suffice, however if you have a podcast, choose 'podcast'.</p>
+        </li>
+    </ul>
+</div>
+
+
 <h:form>
 <div class="adminforms">
 <h:panelGrid columns="2">
@@ -62,7 +79,7 @@
 
 <h:outputLabel for="link"><span class="required">*</span> Link to blog:</h:outputLabel>
 <h:panelGroup>
-    <h:inputText id="link" value="#{feedMod.feed.link}" required="true" size="64">
+    <h:inputText id="link" value="#{feedMod.feed.link}" required="true" size="48" maxlength="64">
         <a:support event="onblur" reRender="linkMessage" ajaxSingle="true" bypassUpdates="true"/>
         <s:validate />
     </h:inputText>
@@ -89,7 +106,7 @@
 </h:panelGroup>
 
 <h:outputLabel for="maxPostsInFeed">
-    <span class="required">*</span> Maximum number of posts in a feed:
+    <span class="required">*</span> Maximum number of posts in an atom feed:
 </h:outputLabel>
 <h:panelGroup>
     <h:inputText id="maxPostsInFeed" value="#{feedMod.feed.maxPostsInFeed}" required="true" size="16">
@@ -103,7 +120,7 @@
 </h:panelGroup>
 
 <h:outputLabel for="maxPostsOnPage">
-    <span class="required">*</span> Maximum number of posts to display:
+    <span class="required">*</span> Maximum number of posts to display on one page:
 </h:outputLabel>
 <h:panelGroup>
     <h:inputText id="maxPostsOnPage" value="#{feedMod.feed.maxPostsOnPage}" required="true" size="16">
@@ -130,7 +147,7 @@
     </a:outputPanel>
 </h:panelGroup>
 
-<h:outputLabel for="useBlogAuthorInPosts"><span class="required">*</span> Templates:</h:outputLabel>
+<h:outputLabel for="useBlogAuthorInPosts"><span class="required">*</span> Xml templates:</h:outputLabel>
 <h:panelGroup>
     <h:dataTable var="templateType" value="#{feedMod.templateTypes}">
         <h:column>
@@ -168,7 +185,7 @@
 
 <h:panelGroup rendered="#{feedMod.feed.posts.size() > 0}">
     <h3>Post data preview:</h3>
-    
+
     <h:dataTable value="#{feedMod.feed.posts}" var="post" rows="1">
         <h:column>
             <h:panelGrid columns="2" columnClasses="bold,empty" rowClasses="oddRow,evenRow" styleClass="basetablestyle">

Modified: trunk/view/manage/remote/remote_add.xhtml
===================================================================
--- trunk/view/manage/remote/remote_add.xhtml	2008-02-06 17:21:00 UTC (rev 194)
+++ trunk/view/manage/remote/remote_add.xhtml	2008-02-07 09:36:09 UTC (rev 195)
@@ -11,11 +11,20 @@
     <ui:define name="header">
         Add remote feed
     </ui:define>
-    
+
     <ui:define name="body">
+        <div class="QuickstartMargin" id="QuickStart">
+            <ul>
+                <li>
+                    <p>#{messages['blog.feed.remote.adding.quickstart']}</p>
+                </li>
+            </ul>
+        </div>
+
         <ui:include src="remote_mod.xhtml">
-            <ui:param name="new" value="true" />            
-            <ui:param name="showCaptcha" value="false" />
+            <ui:param name="new" value="true" />
+            <ui:param name="showCaptcha" value="false" /> 
+            <ui:param name="backTo" value="/manage/index.html" />
         </ui:include>
     </ui:define>
 </ui:composition>

Modified: trunk/view/manage/remote/remote_edit.xhtml
===================================================================
--- trunk/view/manage/remote/remote_edit.xhtml	2008-02-06 17:21:00 UTC (rev 194)
+++ trunk/view/manage/remote/remote_edit.xhtml	2008-02-07 09:36:09 UTC (rev 195)
@@ -13,9 +13,19 @@
     </ui:define>
 
     <ui:define name="body">
+        <div class="QuickstartMargin" id="QuickStart">
+            <ul>
+                <li>
+                    <p>You can change the address of your feed, however use this option with caution; if you
+                    have a completely new feed, maybe it's better to create a new remote feed instead?</p>
+                </li>
+            </ul>
+        </div>
+
         <ui:include src="remote_mod.xhtml">
             <ui:param name="new" value="false" /> 
             <ui:param name="showCaptcha" value="false" />
+            <ui:param name="backTo" value="/manage/index.html" />
         </ui:include>
     </ui:define>
 </ui:composition>

Modified: trunk/view/manage/remote/remote_mod.xhtml
===================================================================
--- trunk/view/manage/remote/remote_mod.xhtml	2008-02-06 17:21:00 UTC (rev 194)
+++ trunk/view/manage/remote/remote_mod.xhtml	2008-02-07 09:36:09 UTC (rev 195)
@@ -6,7 +6,7 @@
                 xmlns:f="http://java.sun.com/jsf/core"
                 xmlns:h="http://java.sun.com/jsf/html"
                 xmlns:rich="http://richfaces.org/rich"
-                xmlns:a="http://richfaces.org/a4j">
+                xmlns:a="http://richfaces.org/a4j">    
     <div class="adminforms">
         <h:form>
             <h:panelGrid columns="2">
@@ -23,9 +23,10 @@
                     </a:outputPanel>
                 </h:panelGroup>
 
-                <h:outputLabel><span class="required">*</span> Remote feed address:</h:outputLabel>
+                <h:outputLabel><span class="required">*</span> Remote feed (atom/rss2) address:</h:outputLabel>
                 <h:panelGroup>
-                    <h:inputText id="link" value="#{remoteFeedMod.remoteFeed.remoteLink}" required="true" size="64">
+                    <h:inputText id="link" value="#{remoteFeedMod.remoteFeed.remoteLink}" required="true" size="55"
+                                 maxlength="64">
                         <s:validate />
                     </h:inputText>
                     <a:outputPanel id="linkMessage">
@@ -67,7 +68,7 @@
                         </li>
                     </s:fragment>
                     <li>
-                        <s:button value="Cancel" view="/manage/index.html" propagation="end" styleClass="submit" />
+                        <s:button value="Cancel" view="#{backTo}" propagation="end" styleClass="submit" />
                     </li>
                     <li>
                         <ui:include src="../../common/ajax_status.xhtml" />

Modified: trunk/view/manage/remote/remote_propose.xhtml
===================================================================
--- trunk/view/manage/remote/remote_propose.xhtml	2008-02-06 17:21:00 UTC (rev 194)
+++ trunk/view/manage/remote/remote_propose.xhtml	2008-02-07 09:36:09 UTC (rev 195)
@@ -13,9 +13,18 @@
     </ui:define>
 
     <ui:define name="body">
+        <div class="QuickstartMargin" id="QuickStart">
+            <ul>
+                <li>
+                    <p>#{messages['blog.feed.remote.adding.quickstart']}</p>
+                </li>
+            </ul>
+        </div>
+
         <ui:include src="remote_mod.xhtml">
             <ui:param name="new" value="true" />
             <ui:param name="showCaptcha" value="true" />
+            <ui:param name="backTo" value="/home.xhtml" />
         </ui:include>
     </ui:define>
 </ui:composition>

Modified: trunk/view/search/search.xhtml
===================================================================
--- trunk/view/search/search.xhtml	2008-02-06 17:21:00 UTC (rev 194)
+++ trunk/view/search/search.xhtml	2008-02-07 09:36:09 UTC (rev 195)
@@ -7,26 +7,35 @@
                 xmlns:h="http://java.sun.com/jsf/html"
                 xmlns:rich="http://richfaces.org/rich"
                 template="../layout/template.xhtml">
+    <ui:define name="header">
+        Search
+    </ui:define>
+
+
     <ui:define name="body">
-        <h1>Search</h1>
+        <div class="blogContent">
+            <s:div rendered="#{empty postSearch.results}">
+                <p>
+                    Your search for: '#{postSearch.query}' didn't return any results.
+                </p>
+            </s:div>
 
-        <s:div rendered="#{empty postSearch.results}">
-            <p>
-                Your search for: '#{postSearch.query}' didn't return any results.
-            </p>
-        </s:div>
+            <s:div rendered="#{not empty postSearch.results}">
+                <p>
+                    Your search for: '#{postSearch.query}' returned #{postSearch.resultsCount} results.
+                </p>
 
-        <s:div rendered="#{not empty postSearch.results}">
-            <p>
-                Your search for: '#{postSearch.query}' returned #{postSearch.resultsCount} results.
-            </p>
+                <div class="blogFeedNav">
+                    <ul>
+                        <ui:include src="../common/next_previous_navigation.xhtml">
+                            <ui:param name="viewId" value="/search/search.xhtml" />
+                            <ui:param name="navigationBean" value="#{postSearch}" />
+                            <ui:param name="showColon" value="false" />
+                        </ui:include>
+                    </ul>
+                </div>
 
-            <ui:include src="../common/next_previous_navigation.xhtml">
-                <ui:param name="viewId" value="/search/search.xhtml" />
-                <ui:param name="navigationBean" value="#{postSearch}" />
-            </ui:include>
-
-            <ui:repeat var="result" value="#{postSearch.results}">
+                <ui:repeat var="result" value="#{postSearch.results}">
                     <ui:include src="../common/post.xhtml">
                         <ui:param name="post" value="#{result[1]}" />
                         <ui:param name="showLinkToSeparatePage" value="true" />
@@ -34,7 +43,8 @@
                         <ui:param name="additionalHeader"
                                   value="(#{postSearch.formatScore(result[0])}%)" />
                     </ui:include>
-            </ui:repeat>
-        </s:div>
+                </ui:repeat>
+            </s:div>
+        </div>
     </ui:define>
 </ui:composition>

Modified: trunk/view/view/feed_toolbar.xhtml
===================================================================
--- trunk/view/view/feed_toolbar.xhtml	2008-02-06 17:21:00 UTC (rev 194)
+++ trunk/view/view/feed_toolbar.xhtml	2008-02-07 09:36:09 UTC (rev 195)
@@ -12,6 +12,7 @@
             <ui:include src="../common/next_previous_navigation.xhtml">
                 <ui:param name="viewId" value="/view/feed.xhtml" />
                 <ui:param name="navigationBean" value="#{feedView}" />
+                <ui:param name="showColon" value="true" />
             </ui:include>
             <li>
                 Subscribe to this feed:




More information about the jboss-cvs-commits mailing list