Coverage Report - org.mule.config.spring.parsers.assembly.configuration.ReusablePropertyConfiguration
 
Classes in this File Line Coverage Branch Coverage Complexity
ReusablePropertyConfiguration
0%
0/35
0%
0/2
1.05
 
 1  
 /*
 2  
  * $Id: ReusablePropertyConfiguration.java 11465 2008-03-21 17:49:44Z rossmason $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
 5  
  *
 6  
  * The software in this package is published under the terms of the CPAL v1.0
 7  
  * license, a copy of which has been included with this distribution in the
 8  
  * LICENSE.txt file.
 9  
  */
 10  
 
 11  
 package org.mule.config.spring.parsers.assembly.configuration;
 12  
 
 13  
 import java.util.Map;
 14  
 
 15  
 /**
 16  
  * Allow initial mutation; first call of reset stores values as reference and allows
 17  
  * further temporary mutation; further calls to reset return to reference.
 18  
  */
 19  
 public class ReusablePropertyConfiguration implements PropertyConfiguration
 20  
 {
 21  
 
 22  
     private PropertyConfiguration reference;
 23  
     private PropertyConfiguration delegate;
 24  
 
 25  
     public ReusablePropertyConfiguration()
 26  
     {
 27  0
         this(new SimplePropertyConfiguration());
 28  0
     }
 29  
 
 30  
     public ReusablePropertyConfiguration(PropertyConfiguration delegate)
 31  0
     {
 32  0
         this.delegate = delegate;
 33  0
     }
 34  
 
 35  
    public void reset()
 36  
     {
 37  0
         if (null == reference)
 38  
         {
 39  0
             reference = delegate;
 40  
         }
 41  0
         delegate = new TempWrapperPropertyConfiguration(reference);
 42  0
     }
 43  
 
 44  
     public void addReference(String propertyName)
 45  
     {
 46  0
         delegate.addReference(propertyName);
 47  0
     }
 48  
 
 49  
     public void addMapping(String propertyName, Map mappings)
 50  
     {
 51  0
         delegate.addMapping(propertyName, mappings);
 52  0
     }
 53  
 
 54  
     public void addMapping(String propertyName, String mappings)
 55  
     {
 56  0
         delegate.addMapping(propertyName, mappings);
 57  0
     }
 58  
 
 59  
     public void addMapping(String propertyName, ValueMap mappings)
 60  
     {
 61  0
         delegate.addMapping(propertyName, mappings);
 62  0
     }
 63  
 
 64  
     public void addAlias(String alias, String propertyName)
 65  
     {
 66  0
         delegate.addAlias(alias, propertyName);
 67  0
     }
 68  
 
 69  
     public void addCollection(String propertyName)
 70  
     {
 71  0
         delegate.addCollection(propertyName);
 72  0
     }
 73  
 
 74  
     public void addIgnored(String propertyName)
 75  
     {
 76  0
         delegate.addIgnored(propertyName);
 77  0
     }
 78  
 
 79  
     public void removeIgnored(String propertyName)
 80  
     {
 81  0
         delegate.removeIgnored(propertyName);
 82  0
     }
 83  
 
 84  
     public void setIgnoredDefault(boolean ignoreAll)
 85  
     {
 86  0
         delegate.setIgnoredDefault(ignoreAll);
 87  0
     }
 88  
 
 89  
     public String getAttributeMapping(String alias)
 90  
     {
 91  0
         return delegate.getAttributeMapping(alias);
 92  
     }
 93  
 
 94  
     public String getAttributeAlias(String mapping)
 95  
     {
 96  0
         return delegate.getAttributeAlias(mapping);
 97  
     }
 98  
 
 99  
     public boolean isCollection(String propertyName)
 100  
     {
 101  0
         return delegate.isCollection(propertyName);
 102  
     }
 103  
 
 104  
     public boolean isIgnored(String propertyName)
 105  
     {
 106  0
         return delegate.isIgnored(propertyName);
 107  
     }
 108  
 
 109  
     public boolean isReference(String attributeName)
 110  
     {
 111  0
         return delegate.isReference(attributeName);
 112  
     }
 113  
 
 114  
     public SingleProperty getSingleProperty(String propertyName)
 115  
     {
 116  0
         return new SinglePropertyWrapper(propertyName, this);
 117  
     }
 118  
 
 119  
     public String translateName(String oldName)
 120  
     {
 121  0
         return delegate.translateName(oldName);
 122  
     }
 123  
 
 124  
     public Object translateValue(String name, String value)
 125  
     {
 126  0
         return delegate.translateValue(name, value);
 127  
     }
 128  
 
 129  
 }