roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gma...@apache.org
Subject svn commit: r1615853 - /roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryRemove.java
Date Tue, 05 Aug 2014 02:44:35 GMT
Author: gmazza
Date: Tue Aug  5 02:44:34 2014
New Revision: 1615853

URL: http://svn.apache.org/r1615853
Log:
Switch from tabs to spaces in EntryRemove.

Modified:
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryRemove.java

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryRemove.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryRemove.java?rev=1615853&r1=1615852&r2=1615853&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryRemove.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryRemove.java
Tue Aug  5 02:44:34 2014
@@ -37,100 +37,100 @@ import java.util.List;
  */
 public class EntryRemove extends UIAction {
 
-	private static Log log = LogFactory.getLog(EntryRemove.class);
+    private static Log log = LogFactory.getLog(EntryRemove.class);
 
-	// id of entry to remove
-	private String removeId = null;
+    // id of entry to remove
+    private String removeId = null;
 
-	// entry object to remove
-	private WeblogEntry removeEntry = null;
+    // entry object to remove
+    private WeblogEntry removeEntry = null;
 
-	public EntryRemove() {
+    public EntryRemove() {
         // actionName defined in struts.xml as it's different based on the caller
-		this.desiredMenu = "editor";
-		this.pageTitle = "weblogEdit.deleteEntry";
-	}
-
-	public void myPrepare() {
-		if (getRemoveId() != null) {
-			try {
-				WeblogEntryManager wmgr = WebloggerFactory.getWeblogger()
-						.getWeblogEntryManager();
-				setRemoveEntry(wmgr.getWeblogEntry(getRemoveId()));
-			} catch (WebloggerException ex) {
-				log.error("Error looking up entry by id - " + getRemoveId(), ex);
-			}
-		}
-	}
-
-	public String execute() {
-		return INPUT;
-	}
-
-	public String remove() {
-
-		if (getRemoveEntry() != null) {
-			try {
-				WeblogEntry entry = getRemoveEntry();
+        this.desiredMenu = "editor";
+        this.pageTitle = "weblogEdit.deleteEntry";
+    }
+
+    public void myPrepare() {
+        if (getRemoveId() != null) {
+            try {
+                WeblogEntryManager wmgr = WebloggerFactory.getWeblogger()
+                        .getWeblogEntryManager();
+                setRemoveEntry(wmgr.getWeblogEntry(getRemoveId()));
+            } catch (WebloggerException ex) {
+                log.error("Error looking up entry by id - " + getRemoveId(), ex);
+            }
+        }
+    }
+
+    public String execute() {
+        return INPUT;
+    }
+
+    public String remove() {
+
+        if (getRemoveEntry() != null) {
+            try {
+                WeblogEntry entry = getRemoveEntry();
                 IndexManager manager = WebloggerFactory.getWeblogger().getIndexManager();
 
-				try {
-					// remove the entry from the search index
-					// TODO: can we do this in a better way?
-					WeblogEntry.PubStatus originalStatus = entry.getStatus();
-					entry.setStatus(WeblogEntry.PubStatus.DRAFT);
-					manager.addEntryReIndexOperation(entry);
-					entry.setStatus(originalStatus);
-				} catch (WebloggerException ex) {
-					log.warn("Trouble triggering entry indexing", ex);
-				}
+                try {
+                    // remove the entry from the search index
+                    // TODO: can we do this in a better way?
+                    WeblogEntry.PubStatus originalStatus = entry.getStatus();
+                    entry.setStatus(WeblogEntry.PubStatus.DRAFT);
+                    manager.addEntryReIndexOperation(entry);
+                    entry.setStatus(originalStatus);
+                } catch (WebloggerException ex) {
+                    log.warn("Trouble triggering entry indexing", ex);
+                }
 
-				// remove from search index
-				if (entry.isPublished()) {
+                // remove from search index
+                if (entry.isPublished()) {
                     manager.removeEntryIndexOperation(entry);
-				}
+                }
 
-				// flush caches
-				CacheManager.invalidate(entry);
+                // flush caches
+                CacheManager.invalidate(entry);
 
-				// remove entry itself
-				WeblogEntryManager wmgr = WebloggerFactory.getWeblogger()
-						.getWeblogEntryManager();
-				wmgr.removeWeblogEntry(entry);
-				WebloggerFactory.getWeblogger().flush();
-
-				// note to user
-				addMessage("weblogEdit.entryRemoved", entry.getTitle());
-
-				return SUCCESS;
-
-			} catch (Exception e) {
-				log.error("Error removing entry " + getRemoveId(), e);
-				addError("generic.error.check.logs");
-			}
+                // remove entry itself
+                WeblogEntryManager wmgr = WebloggerFactory.getWeblogger()
+                        .getWeblogEntryManager();
+                wmgr.removeWeblogEntry(entry);
+                WebloggerFactory.getWeblogger().flush();
+
+                // note to user
+                addMessage("weblogEdit.entryRemoved", entry.getTitle());
+
+                return SUCCESS;
+
+            } catch (Exception e) {
+                log.error("Error removing entry " + getRemoveId(), e);
+                addError("generic.error.check.logs");
+            }
         } else {
-			addError("weblogEntry.notFound");
-			return ERROR;
-		}
-
-		return INPUT;
-	}
-
-	public String getRemoveId() {
-		return removeId;
-	}
-
-	public void setRemoveId(String removeId) {
-		this.removeId = removeId;
-	}
-
-	public WeblogEntry getRemoveEntry() {
-		return removeEntry;
-	}
-
-	public void setRemoveEntry(WeblogEntry removeEntry) {
-		this.removeEntry = removeEntry;
-	}
+            addError("weblogEntry.notFound");
+            return ERROR;
+        }
+
+        return INPUT;
+    }
+
+    public String getRemoveId() {
+        return removeId;
+    }
+
+    public void setRemoveId(String removeId) {
+        this.removeId = removeId;
+    }
+
+    public WeblogEntry getRemoveEntry() {
+        return removeEntry;
+    }
+
+    public void setRemoveEntry(WeblogEntry removeEntry) {
+        this.removeEntry = removeEntry;
+    }
 
     // allow LIMITED users to delete their own draft/pending blog entries
     @Override



Mime
View raw message