[jboss-cvs] jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/action ...

Christian Bauer christian at hibernate.org
Sun Apr 8 12:06:49 EDT 2007


  User: cbauer  
  Date: 07/04/08 12:06:49

  Modified:    examples/wiki/src/main/org/jboss/seam/wiki/core/action 
                        DocumentHome.java
  Log:
  Minor
  
  Revision  Changes    Path
  1.10      +12 -3     jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: DocumentHome.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -b -r1.9 -r1.10
  --- DocumentHome.java	8 Apr 2007 15:10:32 -0000	1.9
  +++ DocumentHome.java	8 Apr 2007 16:06:49 -0000	1.10
  @@ -28,6 +28,7 @@
       private boolean minorRevision;
       private String formContent;
       private boolean enabledPreview = false;
  +    private boolean pushOnSiteFeed = false;
   
       /* -------------------------- Basic Overrides ------------------------------ */
   
  @@ -64,8 +65,8 @@
           String outcome = super.persist();
   
           // Create feed entries (needs identifiers assigned, so we run after persist())
  -        if (getInstance().getReadAccessLevel() == UserRoleAccessFactory.GUESTROLE_ACCESSLEVEL) {
  -            feedDAO.createFeedEntries(getInstance());
  +        if (outcome != null && getInstance().getReadAccessLevel() == UserRoleAccessFactory.GUESTROLE_ACCESSLEVEL) {
  +            feedDAO.createFeedEntries(isPushOnSiteFeed(), getInstance());
               getEntityManager().flush();
           }
   
  @@ -82,7 +83,7 @@
   
               // Update feed entries
               if (getInstance().getReadAccessLevel() == UserRoleAccessFactory.GUESTROLE_ACCESSLEVEL)
  -                feedDAO.updateFeedEntries(getInstance());
  +                feedDAO.updateFeedEntries(isPushOnSiteFeed(), getInstance());
   
               historicalCopy.setId(getInstance().getId());
               getNodeDAO().persistHistoricalNode(historicalCopy);
  @@ -156,6 +157,14 @@
           refreshMenuItems();
       }
   
  +    public boolean isPushOnSiteFeed() {
  +        return pushOnSiteFeed;
  +    }
  +
  +    public void setPushOnSiteFeed(boolean pushOnSiteFeed) {
  +        this.pushOnSiteFeed = pushOnSiteFeed;
  +    }
  +
       public void setShowPluginPrefs(boolean showPluginPrefs) {
           Contexts.getConversationContext().set("showPluginPreferences", showPluginPrefs);
   
  
  
  



More information about the jboss-cvs-commits mailing list