Author: gmazza
Date: Sat Feb 22 11:48:12 2014
New Revision: 1570824
URL: http://svn.apache.org/r1570824
Log:
Simplification of CategoryAdd.
Modified:
roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogCategory.java
roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/Categories.java
roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/CategoryAdd.java
Modified:
roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogCategory.java
URL:
http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogCategory.java?rev=1570824&r1=1570823&r2=1570824&view=diff
==============================================================================
---
roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogCategory.java
(original)
+++
roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogCategory.java
Sat Feb 22 11:48:12 2014
@@ -170,8 +170,7 @@ public class WeblogCategory implements S
}
/**
- * Retrieve all weblog entries in this category and, optionally, include
- * weblog entries all sub-categories.
+ * Retrieve all weblog entries in this category.
*
* @param publishedOnly True if desired to return only published entries
* @return List of WeblogEntryData objects.
@@ -183,8 +182,7 @@ public class WeblogCategory implements S
}
/**
- * Determine if category is in use. Returns true if any weblog entries
- * use this category or any of its subcategories.
+ * Returns true if category is in use.
*/
public boolean isInUse() {
try {
Modified:
roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/Categories.java
URL:
http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/Categories.java?rev=1570824&r1=1570823&r2=1570824&view=diff
==============================================================================
---
roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/Categories.java
(original)
+++
roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/Categories.java
Sat Feb 22 11:48:12 2014
@@ -87,7 +87,7 @@ public class Categories extends UIAction
}
public String move() {
- // no-op today as subcategories no longer supported
+ // TODO: Handle reordering of categories
return execute();
}
Modified:
roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/CategoryAdd.java
URL:
http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/CategoryAdd.java?rev=1570824&r1=1570823&r2=1570824&view=diff
==============================================================================
---
roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/CategoryAdd.java
(original)
+++
roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/CategoryAdd.java
Sat Feb 22 11:48:12 2014
@@ -34,18 +34,12 @@ import org.apache.struts2.interceptor.va
/**
- * Add a new subCategory to an existing Category.
+ * Add a new WeblogCategory to the weblog
*/
public class CategoryAdd extends UIAction {
private static Log log = LogFactory.getLog(CategoryAdd.class);
- // the id of the Category we are adding the new subCategory into
- private String categoryId = null;
-
- // the category we are adding the new subcategory into
- private WeblogCategory category = null;
-
// bean for managing form data
private CategoryBean bean = new CategoryBean();
@@ -60,17 +54,6 @@ public class CategoryAdd extends UIActio
return Collections.singletonList(WeblogPermission.ADMIN);
}
- public void myPrepare() {
- try {
- WeblogEntryManager wmgr =
WebloggerFactory.getWeblogger().getWeblogEntryManager();
- if(!StringUtils.isEmpty(getCategoryId())) {
- setCategory(wmgr.getWeblogCategory(getCategoryId()));
- }
- } catch (WebloggerException ex) {
- log.error("Error looking up category", ex);
- }
- }
-
/**
* Show category form.
*/
@@ -128,22 +111,6 @@ public class CategoryAdd extends UIActio
}
}
- public String getCategoryId() {
- return categoryId;
- }
-
- public void setCategoryId(String categoryId) {
- this.categoryId = categoryId;
- }
-
- public WeblogCategory getCategory() {
- return category;
- }
-
- public void setCategory(WeblogCategory category) {
- this.category = category;
- }
-
public CategoryBean getBean() {
return bean;
}