KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > webflow > core > collection > AttributeMapBindingEvent


1 /*
2  * Copyright 2002-2006 the original author or authors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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 JavaDoc;
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 JavaDoc {
29
30     private String JavaDoc attributeName;
31
32     private Object JavaDoc 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, String JavaDoc attributeName, Object JavaDoc attributeValue) {
42         super(source);
43         this.source = source;
44         this.attributeName = attributeName;
45         this.attributeValue = attributeValue;
46     }
47
48     /**
49      * Returns the name the attribute was bound with.
50      */

51     public String JavaDoc getAttributeName() {
52         return attributeName;
53     }
54
55     /**
56      * Returns the value of the attribute.
57      */

58     public Object JavaDoc getAttributeValue() {
59         return attributeValue;
60     }
61 }
Popular Tags