portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pau...@apache.org
Subject cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets PsmlBrowseAction.java
Date Mon, 12 Aug 2002 02:04:55 GMT
paulsp      2002/08/11 19:04:55

  Modified:    src/java/org/apache/jetspeed/modules/actions/portlets
                        PsmlBrowseAction.java
  Log:
    Housekeeping, as directed by checkStyle.  This involved adding space and
    removing imports.  No functional changes where made.
  
  Revision  Changes    Path
  1.6       +24 -30    jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/PsmlBrowseAction.java
  
  Index: PsmlBrowseAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/PsmlBrowseAction.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- PsmlBrowseAction.java	12 Aug 2002 01:52:58 -0000	1.5
  +++ PsmlBrowseAction.java	12 Aug 2002 02:04:55 -0000	1.6
  @@ -55,26 +55,17 @@
   package org.apache.jetspeed.modules.actions.portlets;
   
   //Jetspeed
  -import org.apache.jetspeed.modules.actions.portlets.security.SecurityConstants;
  -import org.apache.jetspeed.om.profile.BaseProfile;
  -import org.apache.jetspeed.om.profile.BaseProfileLocator;
   import org.apache.jetspeed.om.profile.Profile;
  -import org.apache.jetspeed.om.profile.ProfileException;
  -import org.apache.jetspeed.om.profile.ProfileLocator;
   import org.apache.jetspeed.om.profile.QueryLocator;
  -import org.apache.jetspeed.om.profile.psml.PsmlEntry;
   import org.apache.jetspeed.portal.portlets.VelocityPortlet;
   import org.apache.jetspeed.portal.portlets.browser.DatabaseBrowserIterator;
   import org.apache.jetspeed.services.Profiler;
  -import org.apache.jetspeed.services.PsmlManager;
   import org.apache.jetspeed.util.PortletConfigState;
   import org.apache.jetspeed.util.PortletSessionState;
   
   // Turbine stuff
   import org.apache.turbine.util.Log;
  -import org.apache.turbine.util.DynamicURI;
   import org.apache.turbine.util.RunData;
  -import org.apache.turbine.util.StringUtils;
   
   // Velocity Stuff
   import org.apache.velocity.context.Context;
  @@ -105,13 +96,13 @@
        * provide their own customization behavior.
        * Default is to use Portal base customizer action
        */
  -    protected void buildConfigureContext( VelocityPortlet portlet,
  -                                          Context context,
  -                                          RunData rundata )
  +    protected void buildConfigureContext(VelocityPortlet portlet,
  +                                         Context context,
  +                                         RunData rundata)
       {
           try
           {
  -            super.buildConfigureContext( portlet, context, rundata);
  +            super.buildConfigureContext(portlet, context, rundata);
           }
           catch (Exception ex)
           {
  @@ -124,19 +115,22 @@
        * Subclasses must override this method to provide default behavior
        * for the portlet action
        */
  -    protected void buildNormalContext( VelocityPortlet portlet,
  -                                       Context context,
  -                                       RunData rundata )
  +    protected void buildNormalContext(VelocityPortlet portlet,
  +                                      Context context,
  +                                      RunData rundata)
       {
  -        int start = rundata.getParameters().getInt("start",0);
  +        int start = rundata.getParameters().getInt("start", 0);
   
  -        if (start < 0) start = 0;
  +        if (start < 0)
  +        {
  +            start = 0;
  +        }
   
           String pageSize = PortletConfigState.getParameter(portlet, rundata, PAGE_SIZE,
"20");
           int size = Integer.parseInt(pageSize);
   
  -        int next = start+size+1;
  -        int prev = start-size-1;
  +        int next = start + size + 1;
  +        int prev = start - size - 1;
   
           //System.out.println("start="+start+" size="+size+" next="+next+" prev="+prev);
   
  @@ -146,18 +140,18 @@
           rundata.getUser().setTemp(PSML_REFRESH_FLAG, FALSE);
           //Get the iterator
           DatabaseBrowserIterator windowIterator =
  -            (DatabaseBrowserIterator)PortletSessionState.getAttribute(portlet, rundata,
PROFILE_ITERATOR);
  -        if (windowIterator == null || refreshFlag)
  +            (DatabaseBrowserIterator) PortletSessionState.getAttribute(portlet, rundata,
PROFILE_ITERATOR);
  +        if ((windowIterator == null) || refreshFlag)
           {
               int index = 0;
               Iterator i = Profiler.query(new QueryLocator(QueryLocator.QUERY_ALL));
               ArrayList entries = new ArrayList();
  -            while(i.hasNext())
  +            while (i.hasNext())
               {
  -                Profile profile = (Profile)i.next();
  +                Profile profile = (Profile) i.next();
                   //System.out.println("profile["+index+"]="+profile.getPath());
                   entries.add(profile);
  -                index ++;
  +                index++;
               }
               ArrayList entryType = new ArrayList();
               entryType.add("Profile");
  @@ -199,12 +193,12 @@
       {
           String pageSize = null;
   
  -        VelocityPortlet portlet = (VelocityPortlet)context.get("portlet");
  +        VelocityPortlet portlet = (VelocityPortlet) context.get("portlet");
           if (portlet != null)
           {
               String peid = portlet.getID();
  -            if(peid != null &&
  -               peid.equals(rundata.getParameters().getString(PEID)))
  +            if ((peid != null)
  +                && peid.equals(rundata.getParameters().getString(PEID)))
               {
                   pageSize = rundata.getParameters().getString(PAGE_SIZE);
               }
  @@ -215,7 +209,7 @@
               }
           }
   
  -        buildNormalContext( portlet, context, rundata);
  +        buildNormalContext(portlet, context, rundata);
       }
   
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:jetspeed-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:jetspeed-dev-help@jakarta.apache.org>


Mime
View raw message