01: /*
02: * BEGIN_HEADER - DO NOT EDIT
03: *
04: * The contents of this file are subject to the terms
05: * of the Common Development and Distribution License
06: * (the "License"). You may not use this file except
07: * in compliance with the License.
08: *
09: * You can obtain a copy of the license at
10: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
11: * See the License for the specific language governing
12: * permissions and limitations under the License.
13: *
14: * When distributing Covered Code, include this CDDL
15: * HEADER in each file and include the License file at
16: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
17: * If applicable add the following below this CDDL HEADER,
18: * with the fields enclosed by brackets "[]" replaced with
19: * your own identifying information: Portions Copyright
20: * [year] [name of copyright owner]
21: */
22:
23: /*
24: * @(#)ConfigElement.java
25: * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
26: *
27: * END_HEADER - DO NOT EDIT
28: */
29: package com.sun.jbi.binding.jms.config;
30:
31: import java.util.Iterator;
32:
33: /**
34: * Represents a configuration element. The configuration data can be visually
35: * represented as a tree, with several nodes and leaves. A configuration
36: * element represents a node element. All children of this node are the
37: * properties of the element and can be fetched using their name. All leaf
38: * children are stored as String instances and all node children are stored as
39: * ConfigElement instances.
40: *
41: * @author Sun Microsystems Inc.
42: */
43: public interface ConfigElement {
44: /**
45: * Gets the config element associated with property name.
46: *
47: * @param propertyName element's property name.
48: *
49: * @return associated property value as a ConfigElement instance.
50: */
51: ConfigElement getElement(String propertyName);
52:
53: /**
54: * Gets the values associated with property name.
55: *
56: * @param propertyName element's property name.
57: *
58: * @return associated ConfigElement instance list.
59: */
60: ConfigElement[] getElementList(String propertyName);
61:
62: /**
63: * Returns the configuration element name.
64: *
65: * @return the element name as a String.
66: */
67: String getElementName();
68:
69: /**
70: * Get the iterator containing the element's property names.
71: *
72: * @return an property name interator.
73: */
74: Iterator getKeys();
75:
76: /**
77: * Gets the value associated with property name.
78: *
79: * @param propertyName elements' property name.
80: *
81: * @return associated property value as a String.
82: */
83: String getProperty(String propertyName);
84:
85: /**
86: * Gets the values associated with property name.
87: *
88: * @param propertyName element's property name.
89: *
90: * @return associated property value list.
91: */
92: String[] getPropertyList(String propertyName);
93: }
|