01: /*
02: * Copyright 2004-2007 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.springframework.webflow.core.collection;
17:
18: import java.util.EventObject;
19:
20: /**
21: * Holder for information about the binding or unbinding event in an
22: * {@link AttributeMap}.
23: *
24: * @see AttributeMapBindingListener
25: *
26: * @author Ben Hale
27: */
28: public class AttributeMapBindingEvent extends EventObject {
29:
30: private String attributeName;
31:
32: private Object attributeValue;
33:
34: /**
35: * Creates an event for map binding that contains information about the
36: * event.
37: * @param source the source map that this attribute was bound in
38: * @param attributeName the name that this attribute was bound with
39: * @param attributeValue the attribute
40: */
41: public AttributeMapBindingEvent(AttributeMap source,
42: String attributeName, Object attributeValue) {
43: super (source);
44: this .source = source;
45: this .attributeName = attributeName;
46: this .attributeValue = attributeValue;
47: }
48:
49: /**
50: * Returns the name the attribute was bound with.
51: */
52: public String getAttributeName() {
53: return attributeName;
54: }
55:
56: /**
57: * Returns the value of the attribute.
58: */
59: public Object getAttributeValue() {
60: return attributeValue;
61: }
62: }
|