[jboss-cvs] jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/action ...
Christian Bauer
christian at hibernate.org
Sat Aug 25 15:15:11 EDT 2007
User: cbauer
Date: 07/08/25 15:15:11
Modified: examples/wiki/src/main/org/jboss/seam/wiki/core/action
DocumentHome.java
Log:
Making feed entry generation more selective
Revision Changes Path
1.20 +10 -1 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.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- DocumentHome.java 25 Aug 2007 17:59:24 -0000 1.19
+++ DocumentHome.java 25 Aug 2007 19:15:11 -0000 1.20
@@ -64,6 +64,7 @@
private boolean minorRevision;
private String formContent;
private boolean enabledPreview = false;
+ private boolean pushOnFeeds = false;
private boolean pushOnSiteFeed = false;
/* -------------------------- Basic Overrides ------------------------------ */
@@ -85,7 +86,7 @@
String outcome = super.persist();
// Create feed entries (needs identifiers assigned, so we run after persist())
- if (outcome != null && getInstance().getReadAccessLevel() == UserRoleAccessFactory.GUESTROLE_ACCESSLEVEL) {
+ if (outcome != null && getInstance().getReadAccessLevel() == UserRoleAccessFactory.GUESTROLE_ACCESSLEVEL && isPushOnFeeds()) {
feedDAO.createFeedEntry(isPushOnSiteFeed(), getInstance());
getEntityManager().flush();
}
@@ -171,6 +172,14 @@
syncFormToInstance(getParentDirectory());
}
+ public boolean isPushOnFeeds() {
+ return pushOnFeeds;
+ }
+
+ public void setPushOnFeeds(boolean pushOnFeeds) {
+ this.pushOnFeeds = pushOnFeeds;
+ }
+
public boolean isPushOnSiteFeed() {
return pushOnSiteFeed;
}
More information about the jboss-cvs-commits
mailing list