Coverage report

  %line %branch
org.apache.jetspeed.prefs.impl.NodeImplProxy
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" 
 13  
  * BASIS, 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  
 
 18  
 package org.apache.jetspeed.prefs.impl;
 19  
 
 20  
 
 21  
 import java.sql.Timestamp;
 22  
 import java.util.Collection;
 23  
 
 24  
 import org.apache.jetspeed.prefs.om.Node;
 25  
 
 26  
 public class NodeImplProxy implements  Node
 27  
 {
 28  0
     private Node node = null;
 29  0
     private boolean dirty = false;
 30  
     private static PersistenceBrokerPreferencesProvider provider;
 31  
 
 32  
 
 33  
     protected Object clone() throws CloneNotSupportedException
 34  
 	{
 35  0
 		return super.clone();
 36  
 	}
 37  
 
 38  
 	public Timestamp getCreationDate()
 39  
 	{
 40  0
 		return getNode().getCreationDate();
 41  
 		}
 42  
 
 43  
 	public String getFullPath()
 44  
 	{
 45  0
 		return getNode().getFullPath();
 46  
 	}
 47  
 
 48  
 	public Timestamp getModifiedDate()
 49  
 	{
 50  0
 		return getNode().getModifiedDate();
 51  
 	}
 52  
 
 53  
 	public long getNodeId()
 54  
 	{
 55  0
 		return getNode().getNodeId();
 56  
 	}
 57  
 
 58  
 	public Collection getNodeKeys()
 59  
 	{
 60  0
 		return getNode().getNodeKeys();
 61  
 	}
 62  
 
 63  
 	public String getNodeName()
 64  
 	{
 65  0
 		return getNode().getNodeName();
 66  
 	}
 67  
 
 68  
 	public Collection getNodeProperties()
 69  
 	{
 70  0
 		return getNode().getNodeProperties();	
 71  
 	}
 72  
 
 73  
 	public int getNodeType()
 74  
 	{
 75  0
 		return getNode().getNodeType();
 76  
 	}
 77  
 
 78  
 	public Long getParentNodeId()
 79  
 	{
 80  0
 		return getNode().getParentNodeId();
 81  
 	}
 82  
 
 83  
 	public void setCreationDate(Timestamp creationDate)
 84  
 	{
 85  0
 		getNode().setCreationDate(creationDate);		
 86  0
 	}
 87  
 
 88  
 	public void setFullPath(String fullPath)
 89  
 	{
 90  0
 		getNode().setFullPath(fullPath);		
 91  0
 	}
 92  
 
 93  
 	public void setModifiedDate(Timestamp modifiedDate)
 94  
 	{
 95  0
 		getNode().setModifiedDate(modifiedDate);		
 96  0
 	}
 97  
 
 98  
 	public void setNodeId(long nodeId)
 99  
 	{
 100  0
 		getNode().setNodeId(nodeId);		
 101  0
 	}
 102  
 
 103  
 	public void setNodeKeys(Collection nodeKeys)
 104  
 	{
 105  0
 		getNode().setNodeKeys(nodeKeys);
 106  0
 	}
 107  
 
 108  
 	public void setNodeName(String nodeName)
 109  
 	{
 110  0
 		getNode().setNodeName(nodeName);
 111  
 		
 112  0
 	}
 113  
 
 114  
 	public void setNodeProperties(Collection nodeProperties)
 115  
 	{
 116  0
 		getNode().setNodeProperties(nodeProperties);		
 117  0
 	}
 118  
 
 119  
 	public void setNodeType(int nodeType)
 120  
 	{
 121  0
 		getNode().setNodeType(nodeType);		
 122  0
 	}
 123  
 
 124  
 	public void setParentNodeId(Long parentNodeId)
 125  
 	{
 126  0
 		getNode().setParentNodeId(parentNodeId);
 127  0
 	}
 128  
 
 129  
 	public NodeImplProxy(Node node)
 130  0
     {
 131  0
         this.node = node;
 132  0
     }
 133  
 
 134  
     public static void setProvider(PersistenceBrokerPreferencesProvider p)
 135  
     {
 136  0
     	provider = p;
 137  0
     }
 138  
     
 139  
     public Node getNode() 
 140  
     {
 141  0
         if (dirty)
 142  0
         	reset();
 143  0
         return node;
 144  
     }
 145  
     
 146  
 
 147  
     protected void invalidate()
 148  
     {
 149  0
         this.dirty = true;
 150  0
     }
 151  
     
 152  
     public void setNode(Node node)
 153  
     {
 154  0
     	this.node = node;
 155  0
     }
 156  
     protected void reset()
 157  
     {
 158  
     	try
 159  
     	{
 160  0
     		provider.redoNode(this,node.getFullPath(), node.getNodeType());
 161  0
     		dirty = false;
 162  
     	}
 163  0
     	catch (Exception e)
 164  
     	{
 165  0
     		e.printStackTrace();
 166  0
     		node = null;
 167  0
     	}
 168  0
     }
 169  
     
 170  
 
 171  
 }

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