Coverage report

  %line %branch
org.apache.jetspeed.container.state.impl.PortletWindowRequestNavigationalStates
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.util.HashMap;
 20  
 import java.util.Iterator;
 21  
 import java.util.Map;
 22  
 
 23  
 import org.apache.pluto.om.window.PortletWindow;
 24  
 
 25  
 public class PortletWindowRequestNavigationalStates
 26  
 {
 27  
     private String characterEncoding;
 28  0
     private Map pwnStates = new HashMap();
 29  
     private PortletWindow maximizedWindow;
 30  
     private PortletWindow actionWindow;
 31  
     private PortletWindow resourceWindow;
 32  
     
 33  
     public PortletWindowRequestNavigationalStates(String characterEncoding)
 34  0
     {
 35  0
         this.characterEncoding = characterEncoding;
 36  0
     }
 37  
     
 38  
     public String getCharacterEncoding()
 39  
     {
 40  0
         return characterEncoding;
 41  
     }
 42  
     
 43  
     public Iterator getWindowIdIterator()
 44  
     {
 45  0
         return pwnStates.keySet().iterator();
 46  
     }
 47  
     
 48  
     public void removePortletWindowNavigationalState(String windowId)
 49  
     {        
 50  0
         boolean removed = pwnStates.remove(windowId) != null;
 51  0
         if (removed)
 52  
         {
 53  0
             if (maximizedWindow != null && windowId.equals(maximizedWindow.getId().toString()))
 54  
             {
 55  0
                 maximizedWindow = null;
 56  
             }
 57  0
             if (actionWindow != null && windowId.equals(actionWindow.getId().toString()))
 58  
             {
 59  0
                 actionWindow = null;
 60  
             }
 61  0
             if (resourceWindow != null && windowId.equals(actionWindow.getId().toString()))
 62  
             {
 63  0
                 resourceWindow = null;
 64  
             }
 65  
         }
 66  0
     }
 67  
     
 68  
     public PortletWindowRequestNavigationalState getPortletWindowNavigationalState(String windowId)
 69  
     {
 70  0
         return (PortletWindowRequestNavigationalState)pwnStates.get(windowId);
 71  
     }
 72  
     
 73  
     public void addPortletWindowNavigationalState(String windowId, PortletWindowRequestNavigationalState pwnState)
 74  
     {
 75  0
         pwnStates.put(windowId, pwnState);
 76  0
     }
 77  
     
 78  
     public PortletWindow getMaximizedWindow()
 79  
     {
 80  0
         return maximizedWindow;
 81  
     }
 82  
     
 83  
     public void setMaximizedWindow(PortletWindow maximizedWindow)
 84  
     {
 85  0
         this.maximizedWindow = maximizedWindow;
 86  0
     }
 87  
 
 88  
     public PortletWindow getActionWindow()
 89  
     {
 90  0
         return actionWindow;
 91  
     }
 92  
     public void setActionWindow(PortletWindow actionWindow)
 93  
     {
 94  0
         this.actionWindow = actionWindow;
 95  0
     }
 96  
     public void setResourceWindow(PortletWindow resourceWindow)
 97  
     {
 98  0
         this.resourceWindow = resourceWindow;
 99  0
     }
 100  
     public PortletWindow getResourceWindow()
 101  
     {
 102  0
         return resourceWindow;
 103  
     }
 104  
 }

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