roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agillil...@apache.org
Subject svn commit: r413759 - /incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/authoring/struts/actions/YourWebsitesAction.java
Date Mon, 12 Jun 2006 23:00:35 GMT
Author: agilliland
Date: Mon Jun 12 16:00:34 2006
New Revision: 413759

URL: http://svn.apache.org/viewvc?rev=413759&view=rev
Log:
code reformatting.


Modified:
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/authoring/struts/actions/YourWebsitesAction.java

Modified: incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/authoring/struts/actions/YourWebsitesAction.java
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/authoring/struts/actions/YourWebsitesAction.java?rev=413759&r1=413758&r2=413759&view=diff
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/authoring/struts/actions/YourWebsitesAction.java
(original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/authoring/struts/actions/YourWebsitesAction.java
Mon Jun 12 16:00:34 2006
@@ -1,28 +1,27 @@
 /*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-*  contributor license agreements.  The ASF licenses this file to You
-* under the Apache License, Version 2.0 (the "License"); you may not
-* use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.  For additional information regarding
-* copyright in this work, please see the NOTICE file in the top level
-* directory of this distribution.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  The ASF licenses this file to You
+ * under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.  For additional information regarding
+ * copyright in this work, please see the NOTICE file in the top level
+ * directory of this distribution.
+ */
+
 package org.apache.roller.ui.authoring.struts.actions;
 
 import java.util.ArrayList;
 import java.util.List;
-
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.struts.action.ActionForm;
@@ -44,16 +43,17 @@
 import org.apache.roller.ui.core.RollerSession;
 import org.apache.roller.ui.authoring.struts.formbeans.YourWebsitesForm;
 
+
 /**
  * Allows user to view and pick from list of his/her websites.
- * 
+ *
  * @struts.action path="/roller-ui/authoring/yourWebsites" name="yourWebsitesForm" parameter="method"
  * @struts.action-forward name="yourWebsites.page" path=".YourWebsites"
  */
-public class YourWebsitesAction extends DispatchAction
-{
-    private static Log mLogger = 
-        LogFactory.getFactory().getInstance(YourWebsitesAction.class);
+public class YourWebsitesAction extends DispatchAction {
+    
+    private static Log mLogger = LogFactory.getLog(YourWebsitesAction.class);
+    
     
     /** If method param is not specified, use HTTP verb to pick method to call */
     public ActionForward unspecified(
@@ -61,42 +61,40 @@
             ActionForm          actionForm,
             HttpServletRequest  request,
             HttpServletResponse response)
-            throws Exception
-    {
-        if (request.getMethod().equals("GET"))
-        {
+            throws Exception {
+        if (request.getMethod().equals("GET")) {
             return edit(mapping, actionForm, request, response);
         }
         return edit(mapping, actionForm, request, response);
     }
     
+    
     public ActionForward edit(
             ActionMapping       mapping,
             ActionForm          actionForm,
             HttpServletRequest  request,
             HttpServletResponse response)
-            throws Exception
-    {
+            throws Exception {
         request.setAttribute("model",
                 new YourWebsitesPageModel(request, response, mapping));
         
         ActionForward forward = mapping.findForward("yourWebsites.page");
         return forward;
     }
-        
+    
+    
     public ActionForward accept(
             ActionMapping       mapping,
             ActionForm          actionForm,
             HttpServletRequest  request,
             HttpServletResponse response)
-            throws Exception
-    {
+            throws Exception {
         YourWebsitesForm form = (YourWebsitesForm)actionForm;
         
         UserManager userMgr = RollerFactory.getRoller().getUserManager();
         PermissionsData perms = userMgr.getPermissions(form.getInviteId());
         
-        // TODO ROLLER_2.0: notify inviter that invitee has accepted invitation  
+        // TODO ROLLER_2.0: notify inviter that invitee has accepted invitation
         // TODO EXCEPTIONS: better exception handling
         perms.setPending(false);
         userMgr.savePermissions(perms);
@@ -112,14 +110,14 @@
         ActionForward forward = mapping.findForward("yourWebsites.page");
         return forward;
     }
-        
+    
+    
     public ActionForward decline(
             ActionMapping       mapping,
             ActionForm          actionForm,
             HttpServletRequest  request,
             HttpServletResponse response)
-            throws Exception
-    {
+            throws Exception {
         YourWebsitesForm form = (YourWebsitesForm)actionForm;
         
         UserManager userMgr = RollerFactory.getRoller().getUserManager();
@@ -140,14 +138,14 @@
         ActionForward forward = mapping.findForward("yourWebsites.page");
         return forward;
     }
-   
+    
+    
     public ActionForward resign(
             ActionMapping       mapping,
             ActionForm          actionForm,
             HttpServletRequest  request,
             HttpServletResponse response)
-            throws Exception
-    {
+            throws Exception {
         YourWebsitesForm form = (YourWebsitesForm)actionForm;
         
         RollerSession rses = RollerSession.getRollerSession(request);
@@ -158,8 +156,7 @@
         UserManager userMgr = RollerFactory.getRoller().getUserManager();
         PermissionsData perms = userMgr.getPermissions(website, user);
         
-        if (perms != null) 
-        {
+        if (perms != null) {
             // TODO ROLLER_2.0: notify website members that user has resigned
             // TODO EXCEPTIONS: better exception handling
             userMgr.removePermissions(perms);
@@ -177,8 +174,8 @@
         return forward;
     }
     
-    public static class YourWebsitesPageModel extends BasePageModel
-    {
+    
+    public static class YourWebsitesPageModel extends BasePageModel {
         private boolean planetAggregatorEnabled = false;
         private boolean groupBloggingEnabled = false;
         private List permissions = new ArrayList();
@@ -186,52 +183,47 @@
         private int userWeblogCount = 0;
         
         public YourWebsitesPageModel(HttpServletRequest request,
-          HttpServletResponse response, ActionMapping mapping) throws RollerException
-        {
+                HttpServletResponse response, ActionMapping mapping) throws RollerException
{
             super("yourWebsites.title", request, response, mapping);
             Roller roller = RollerFactory.getRoller();
             RollerSession rollerSession = RollerSession.getRollerSession(request);
             UserData user = rollerSession.getAuthenticatedUser();
             permissions = roller.getUserManager().getAllPermissions(user);
             userWeblogCount = permissions.size();
-            pendings = roller.getUserManager().getPendingPermissions(user); 
-            groupBloggingEnabled = 
-                RollerConfig.getBooleanProperty("groupblogging.enabled");
+            pendings = roller.getUserManager().getPendingPermissions(user);
+            groupBloggingEnabled =
+                    RollerConfig.getBooleanProperty("groupblogging.enabled");
             setPlanetAggregatorEnabled(RollerConfig.getBooleanProperty("planet.aggregator.enabled"));
         }
-        public List getPermissions()
-        {
+        public List getPermissions() {
             return permissions;
         }
-        public void setPermissions(List permissions)
-        {
+        public void setPermissions(List permissions) {
             this.permissions = permissions;
         }
-        public List getPendings()
-        {
+        public List getPendings() {
             return pendings;
         }
-        public void setPendings(List pendings)
-        {
+        public void setPendings(List pendings) {
             this.pendings = pendings;
         }
-
+        
         public boolean isGroupBloggingEnabled() {
             return groupBloggingEnabled;
         }
-
+        
         public void setGroupBloggingEnabled(boolean groupBloggingEnabled) {
             this.groupBloggingEnabled = groupBloggingEnabled;
         }
-
+        
         public boolean isPlanetAggregatorEnabled() {
             return planetAggregatorEnabled;
         }
-
+        
         public void setPlanetAggregatorEnabled(boolean planetAggregatorEnabled) {
             this.planetAggregatorEnabled = planetAggregatorEnabled;
         }
-
+        
         public int getUserWeblogCount() {
             return userWeblogCount;
         }
@@ -239,4 +231,5 @@
             userWeblogCount = count;
         }
     }
+    
 }



Mime
View raw message