Author: xlawrence
Date: Fri Jul 13 14:58:02 2007
New Revision: 18002

URL: https://svndev.jahia.net/websvn/listing.php?sc=3D1&rev=3D18002&repname=
=3Djahia
Log:
added isDebugEneabled checks

Modified:
    branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/ajax/actionmenus/G=
etMenuItemsAction.java

Modified: branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/ajax/actionm=
enus/GetMenuItemsAction.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-SP=
-BRANCH/core/src/java/org/jahia/ajax/actionmenus/GetMenuItemsAction.java&re=
v=3D18002&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/ajax/actionmenus/G=
etMenuItemsAction.java (original)
+++ branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/ajax/actionmenus/G=
etMenuItemsAction.java Fri Jul 13 14:58:02 2007
@@ -32,12 +32,12 @@
 import org.jahia.gui.HTMLToolBox;
 import org.jahia.params.ProcessingContext;
 import org.jahia.registries.ServicesRegistry;
+import org.jahia.resourcebundle.JahiaResourceBundle;
 import org.jahia.services.acl.JahiaACLManagerService;
 import org.jahia.services.acl.JahiaBaseACL;
 import org.jahia.services.pages.JahiaPage;
 import org.jahia.services.usermanager.JahiaUser;
 import org.jahia.services.version.EntryLoadRequest;
-import org.jahia.resourcebundle.JahiaResourceBundle;
 =

 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
@@ -48,7 +48,7 @@
 /**
  * Gets the items of a specific Action Menu
  *
- * @version $Id: $
+ * @version $Id$
  */
 public class GetMenuItemsAction extends AjaxAction {
 =

@@ -89,7 +89,7 @@
                                  final HttpServletResponse response)
             throws IOException, ServletException {
 =

-        logger.debug("GetMenuItemsAction - execute");
+        if (logger.isDebugEnabled()) logger.debug("GetMenuItemsAction - ex=
ecute");
 =

         try {
             // Contains params that will have to given to the ParamBean Co=
nstructor for correct
@@ -120,7 +120,7 @@
             }
 =

             final int pid =3D jParams.getPageID();
-            logger.debug("jParams: pid =3D " + pid +
+            if (logger.isDebugEnabled()) logger.debug("jParams: pid =3D " =
+ pid +
                     ", user =3D " + currentUser.getName() +
                     ", mode =3D " + jParams.getOperationMode() +
                     ", lang =3D " + jParams.getLocale() +
@@ -129,7 +129,7 @@
             final String definitionID =3D getParameter(request, response, =
DEF);
             final String parentID =3D getParameter(request, response, PARE=
NT);
 =

-            logger.info("ProcessMenuRequest: objectType=3D" + objectType +
+            if (logger.isInfoEnabled()) logger.info("ProcessMenuRequest: o=
bjectType=3D" + objectType +
                     ", objectID=3D" + objectID +
                     ", definitionID=3D" + definitionID +
                     ", parentID=3D" + parentID +
@@ -168,7 +168,7 @@
                                 pid, Integer.parseInt(definitionID), 0);
                     }
                 }
-                logger.debug("ContainerListID: " + list.getID() + ", def: =
" +
+                if (logger.isDebugEnabled()) logger.debug("ContainerListID=
: " + list.getID() + ", def: " +
                         list.getDefinition().getID());
                 bean =3D new ContainerListBean(list, jParams);
 =

@@ -196,7 +196,7 @@
             // Get all the information regarding the Action entries
             final Map info =3D getActionsInfo(bean, jParams);
             // to display ajax response sended
-            logger.debug(getReadableInfo(info));
+            if (logger.isDebugEnabled()) logger.debug(getReadableInfo(info=
));
 =

             jParams.resetSubstituteEntryLoadRequest();
 =

@@ -223,7 +223,7 @@
             // Build and send the response message...
             sendResponse(xmlTagNames, xmlTagValues, response);
 =

-        } catch (Exception e) {
+        } catch (final Exception e) {
             logger.error("Unable to process the request !", e);
             if (! response.isCommitted()) {
                 response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_=
ERROR,
@@ -245,14 +245,14 @@
         final GuiBean gui =3D new GuiBean(jParams);
         final HTMLToolBox box =3D new HTMLToolBox(gui, jParams);
         final Map result =3D new HashMap();
-        final Locale locale=3DjParams.getLocale();
-        String domid =3D jParams.getParameter(DOMID);
-        String[] domidParams =3D domid.split(HTMLToolBox.ID_SEPARATOR);
+        final Locale locale =3D jParams.getLocale();
+        final String domid =3D jParams.getParameter(DOMID);
+        final String[] domidParams =3D domid.split(HTMLToolBox.ID_SEPARATO=
R);
         //see HTMLToolBox.buildUniqueContentID() for param and ordering de=
tails
         String lockIcon =3D ("null".equals(domidParams[5])) ? null : domid=
Params[5];
         if (lockIcon !=3D null)
             lockIcon =3D (String) HTMLToolBox.lockIconStore.get(new Intege=
r(lockIcon));
-        String useFieldSet =3D domidParams[6];
+        final String useFieldSet =3D domidParams[6];
         String resourceBundle =3D domidParams[7];
         String namePostFix =3D domidParams[8];
         if (namePostFix =3D=3D null || "null".equals(namePostFix)) {
@@ -315,7 +315,9 @@
                 String name =3D "";
                 try {
                     name =3D JahiaResourceBundle.getString(ResourceBundle.=
getBundle(resourceBundle, locale), curActionURIBean.getName() + namePostFix=
, locale);
-                } catch (MissingResourceException mre) { name =3D null; }
+                } catch (MissingResourceException mre) {
+                    name =3D null;
+                }
                 if (name =3D=3D null || name.length() =3D=3D 0) {
                     name =3D box.getResource(resourceBundle, curActionURIB=
ean.getName());
                 }
@@ -345,7 +347,6 @@
             result.put(AJAX_METHOD, methods.toString());
             result.put(AJAX_IMAGE, images.toString());
         }
-
         return result;
     }
 =


_______________________________________________
cvs_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/cvs_list

Reply via email to