Coverage report

  %line %branch
org.apache.jetspeed.container.state.impl.PortletWindowExtendedNavigationalState
0% 
0% 

 1  
 /*
 2  
  * Licensed to the Apache Software Foundation (ASF) under one or more
 3  
  * contributor license agreements.  See the NOTICE file distributed with
 4  
  * this work for additional information regarding copyright ownership.
 5  
  * The ASF licenses this file to You under the Apache License, Version 2.0
 6  
  * (the "License"); you may not use this file except in compliance with
 7  
  * the License.  You may obtain a copy of the License at
 8  
  * 
 9  
  *      http://www.apache.org/licenses/LICENSE-2.0
 10  
  * 
 11  
  * Unless required by applicable law or agreed to in writing, software
 12  
  * distributed under the License is distributed on an "AS IS" BASIS,
 13  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 14  
  * See the License for the specific language governing permissions and
 15  
  * limitations under the License.
 16  
  */
 17  
 package org.apache.jetspeed.container.state.impl;
 18  
 
 19  
 import java.io.Serializable;
 20  
 import java.util.HashMap;
 21  
 import java.util.Map;
 22  
 
 23  
 import javax.portlet.PortletMode;
 24  
 import javax.portlet.WindowState;
 25  
 
 26  
 /**
 27  
  * PortletWindowExtendedNavigationalState
 28  
  *
 29  
  * @author <a href="mailto:ate@apache.org">Ate Douma</a>
 30  
  * @version $Id: PortletWindowExtendedNavigationalState.java 551865 2007-06-29 12:13:10Z ate $
 31  
  */
 32  0
 public class PortletWindowExtendedNavigationalState extends PortletWindowBaseNavigationalState
 33  
 {
 34  0
     private static final class ModeStateKey implements Serializable
 35  
     {
 36  
         private final String mode;
 37  
         private final String state;
 38  
         private final int hashCode;
 39  
         
 40  
         public ModeStateKey(PortletMode mode, WindowState state)
 41  
         {
 42  
             this.mode = (mode != null ? mode.toString() : PortletMode.VIEW.toString()).intern() ;
 43  
             this.state = (state != null ? state.toString() : WindowState.NORMAL.toString()).intern();
 44  
             hashCode = this.mode.hashCode()+class="keyword">this.state.hashCode();
 45  
         }
 46  
         
 47  
         public boolean equals(Object obj)
 48  
         {
 49  
             if (obj != null && obj instanceof ModeStateKey)
 50  
             {
 51  
                 ModeStateKey key = (ModeStateKey)obj;
 52  
                 return mode.equals(key.mode) && state.equals(key.state);
 53  
             }
 54  
             return false;
 55  
         }
 56  
 
 57  
         public int hashCode()
 58  
         {
 59  
             return hashCode;
 60  
         }
 61  
     }
 62  
     
 63  
     private Map parametersMap;
 64  
     
 65  
     private Map decoratorActionEncodings;
 66  
         
 67  
     public Map getParametersMap()
 68  
     {
 69  0
         return parametersMap;
 70  
     }
 71  
 
 72  
     public void setParameters(String name, String[] values)
 73  
     {
 74  0
         if ( parametersMap == null )
 75  
         {
 76  0
             parametersMap = new HashMap();
 77  
         }
 78  0
         parametersMap.put(name, values);
 79  0
     }    
 80  
     
 81  
     public void setParametersMap(Map parametersMap)
 82  
     {
 83  0
         this.parametersMap = parametersMap;
 84  0
     }
 85  
     
 86  
     public void resetDecoratorActionEncodings()
 87  
     {
 88  0
         if (decoratorActionEncodings != null)
 89  
         {
 90  0
             decoratorActionEncodings.clear();
 91  
         }
 92  0
     }
 93  
     
 94  
     public void setDecoratorActionEncoding(PortletMode mode, WindowState state, String encoding)
 95  
     {
 96  0
         if (decoratorActionEncodings == null)
 97  
         {
 98  0
             decoratorActionEncodings = new HashMap(4);
 99  
         }
 100  0
         decoratorActionEncodings.put(new ModeStateKey(mode,state), encoding);
 101  0
     }
 102  
     
 103  
     public String getDecoratorActionEncoding(PortletMode mode, WindowState state)
 104  
     {
 105  0
         if (decoratorActionEncodings != null)
 106  
         {
 107  0
             return (String)decoratorActionEncodings.get(new ModeStateKey(mode,state));
 108  
         }
 109  0
         return null;
 110  
     }
 111  
 }

This report is generated by jcoverage, Maven and Maven JCoverage Plugin.