01: /*
02: * $Id: SinglePropertyWrapper.java 10256 2008-01-08 15:20:25Z dfeist $
03: * --------------------------------------------------------------------------------------
04: * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
05: *
06: * The software in this package is published under the terms of the CPAL v1.0
07: * license, a copy of which has been included with this distribution in the
08: * LICENSE.txt file.
09: */
10:
11: package org.mule.config.spring.parsers.assembly.configuration;
12:
13: public class SinglePropertyWrapper implements SingleProperty {
14:
15: private String oldName;
16: private PropertyConfiguration config;
17:
18: public SinglePropertyWrapper(String oldName,
19: PropertyConfiguration config) {
20: this .oldName = oldName;
21: this .config = config;
22: }
23:
24: public boolean isCollection() {
25: return config.isCollection(oldName);
26: }
27:
28: public void setCollection() {
29: config.addCollection(oldName);
30: }
31:
32: public boolean isIgnored() {
33: return config.isIgnored(oldName);
34: }
35:
36: public void setIgnored() {
37: config.addIgnored(oldName);
38: }
39:
40: public boolean isReference() {
41: return config.isReference(oldName);
42: }
43:
44: public void setReference() {
45: config.addReference(oldName);
46: }
47:
48: }
|