View Javadoc

1   /*
2    * $Id: SinglePropertyWrapper.java 10256 2008-01-08 15:20:25Z dfeist $
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  public class SinglePropertyWrapper implements SingleProperty
14  {
15  
16      private String oldName;
17      private PropertyConfiguration config;
18  
19      public SinglePropertyWrapper(String oldName, PropertyConfiguration config)
20      {
21          this.oldName = oldName;
22          this.config = config;
23      }
24  
25      public boolean isCollection()
26      {
27          return config.isCollection(oldName);
28      }
29  
30      public void setCollection()
31      {
32          config.addCollection(oldName);
33      }
34  
35      public boolean isIgnored()
36      {
37          return config.isIgnored(oldName);
38      }
39  
40      public void setIgnored()
41      {
42          config.addIgnored(oldName);
43      }
44  
45      public boolean isReference()
46      {
47          return config.isReference(oldName);
48      }
49  
50      public void setReference()
51      {
52          config.addReference(oldName);
53      }
54      
55  }