portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject cvs commit: jakarta-jetspeed-2/components/profiler/src/java/org/apache/jetspeed/profiler/rules/impl NavigationCriterionResolver.java StandardProfilingRule.java StandardResolver.java RoleFallbackProfilingRule.java PathSessionResolver.java AbstractProfilingRule.java PathResolver.java
Date Wed, 03 Nov 2004 19:40:45 GMT
taylor      2004/11/03 11:40:45

  Modified:    components/profiler/src/java/org/apache/jetspeed/profiler/rules/impl
                        StandardProfilingRule.java StandardResolver.java
                        RoleFallbackProfilingRule.java
                        PathSessionResolver.java AbstractProfilingRule.java
                        PathResolver.java
  Added:       components/profiler/src/java/org/apache/jetspeed/profiler/rules/impl
                        NavigationCriterionResolver.java
  Log:
  profile criteria and locators can now have a isNavigation property to indicate that the
property instructs the locator interpreter to navigate to an explicit folder using the property
value as the location
  added new NavigationCriterion
  
  Revision  Changes    Path
  1.4       +3 -2      jakarta-jetspeed-2/components/profiler/src/java/org/apache/jetspeed/profiler/rules/impl/StandardProfilingRule.java
  
  Index: StandardProfilingRule.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/profiler/src/java/org/apache/jetspeed/profiler/rules/impl/StandardProfilingRule.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StandardProfilingRule.java	23 Sep 2004 19:47:28 -0000	1.3
  +++ StandardProfilingRule.java	3 Nov 2004 19:40:45 -0000	1.4
  @@ -98,7 +98,8 @@
               {
                   String value = resolver.resolve(context, criterion);
                   boolean isControl = resolver.isControl(criterion);
  -                locator.add(criterion, isControl, value);
  +                boolean isNavigation = resolver.isNavigation(criterion);              
 
  +                locator.add(criterion, isControl, isNavigation, value);
               }                
           }               
                
  
  
  
  1.6       +6 -1      jakarta-jetspeed-2/components/profiler/src/java/org/apache/jetspeed/profiler/rules/impl/StandardResolver.java
  
  Index: StandardResolver.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/profiler/src/java/org/apache/jetspeed/profiler/rules/impl/StandardResolver.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- StandardResolver.java	15 Oct 2004 22:58:43 -0000	1.5
  +++ StandardResolver.java	3 Nov 2004 19:40:45 -0000	1.6
  @@ -64,6 +64,11 @@
           }
           return true;
       }
  +
  +    public boolean isNavigation(RuleCriterion criterion)
  +    {
  +        return false;
  +    }
       
       protected String resolvePrincipals(RequestContext context, RuleCriterion criterion,
Subject subject, Class classe)
       {
  
  
  
  1.6       +4 -3      jakarta-jetspeed-2/components/profiler/src/java/org/apache/jetspeed/profiler/rules/impl/RoleFallbackProfilingRule.java
  
  Index: RoleFallbackProfilingRule.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/profiler/src/java/org/apache/jetspeed/profiler/rules/impl/RoleFallbackProfilingRule.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- RoleFallbackProfilingRule.java	27 Sep 2004 19:52:31 -0000	1.5
  +++ RoleFallbackProfilingRule.java	3 Nov 2004 19:40:45 -0000	1.6
  @@ -115,6 +115,7 @@
               {
                   String value = resolver.resolve(context, criterion);
                   boolean isControl = resolver.isControl(criterion);
  +                boolean isNavigation = resolver.isNavigation(criterion);
                   if (value != null && (resolver instanceof RoleCriterionResolver
||
                           resolver instanceof GroupCriterionResolver))
                       {
  @@ -122,12 +123,12 @@
                           while (tokenizer.hasMoreTokens())
                           {
                               String token = (String)tokenizer.nextToken();
  -                            locator.add(criterion, isControl, token);
  +                            locator.add(criterion, isControl, isNavigation, token);
                           }
                       }
                       else
                       {
  -                        locator.add(criterion, isControl, value);
  +                        locator.add(criterion, isControl, isNavigation, value);
                       }
               }                
           }               
  
  
  
  1.4       +7 -1      jakarta-jetspeed-2/components/profiler/src/java/org/apache/jetspeed/profiler/rules/impl/PathSessionResolver.java
  
  Index: PathSessionResolver.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/profiler/src/java/org/apache/jetspeed/profiler/rules/impl/PathSessionResolver.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PathSessionResolver.java	23 Sep 2004 19:47:28 -0000	1.3
  +++ PathSessionResolver.java	3 Nov 2004 19:40:45 -0000	1.4
  @@ -64,4 +64,10 @@
       {
           return false;
       }
  +    
  +    public boolean isNavigation(RuleCriterion criterion)
  +    {
  +        return false;
  +    }
  +    
   }
  
  
  
  1.4       +2 -1      jakarta-jetspeed-2/components/profiler/src/java/org/apache/jetspeed/profiler/rules/impl/AbstractProfilingRule.java
  
  Index: AbstractProfilingRule.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/profiler/src/java/org/apache/jetspeed/profiler/rules/impl/AbstractProfilingRule.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AbstractProfilingRule.java	26 Oct 2004 19:02:30 -0000	1.3
  +++ AbstractProfilingRule.java	3 Nov 2004 19:40:45 -0000	1.4
  @@ -60,6 +60,7 @@
           resolvers.put(RuleCriterionResolver.COUNTRY, new CountryCriterionResolver());
           resolvers.put(RuleCriterionResolver.GROUP_ROLE_USER, new GroupRoleUserCriterionResolver());
           resolvers.put(RuleCriterionResolver.USER_ATTRIBUTE, new UserAttributeResolver());
  +        resolvers.put(RuleCriterionResolver.NAVIGATION, new NavigationCriterionResolver());
       }
       
       protected ProfileLocator getLocatorFromCache(String key)
  
  
  
  1.4       +7 -1      jakarta-jetspeed-2/components/profiler/src/java/org/apache/jetspeed/profiler/rules/impl/PathResolver.java
  
  Index: PathResolver.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/profiler/src/java/org/apache/jetspeed/profiler/rules/impl/PathResolver.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PathResolver.java	23 Sep 2004 19:47:28 -0000	1.3
  +++ PathResolver.java	3 Nov 2004 19:40:45 -0000	1.4
  @@ -59,4 +59,10 @@
       {
           return false;
       }
  +    
  +    public boolean isNavigation(RuleCriterion criterion)
  +    {
  +        return false;
  +    }
  +    
   }
  
  
  
  1.1                  jakarta-jetspeed-2/components/profiler/src/java/org/apache/jetspeed/profiler/rules/impl/NavigationCriterionResolver.java
  
  Index: NavigationCriterionResolver.java
  ===================================================================
  /*
   * Copyright 2000-2004 The Apache Software Foundation.
   * 
   * Licensed 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.
   */
  package org.apache.jetspeed.profiler.rules.impl;
  
  import org.apache.jetspeed.profiler.rules.RuleCriterion;
  import org.apache.jetspeed.profiler.rules.RuleCriterionResolver;
  
  
  /**
   * NavigationCriterionResolver
   * 
   * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
   * @version $Id: NavigationCriterionResolver.java,v 1.1 2004/11/03 19:40:45 taylor Exp $
   */
  public class NavigationCriterionResolver extends HardCodedResolver implements
          RuleCriterionResolver
  {
      public boolean isNavigation(RuleCriterion criterion)
      {
          return true;
      }
  
      public boolean isControl(RuleCriterion criterion)
      {
          return false;
      }
      
  }
  
  
  

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


Mime
View raw message