01: /**
02: * Copyright 2006 Webmedia Group Ltd.
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: **/package org.araneaframework.jsp.support;
16:
17: import java.io.Serializable;
18: import java.util.Collections;
19: import java.util.Map;
20:
21: /**
22: * @author Jevgeni Kabanov (ekabanov <i>at</i> araneaframework <i>dot</i> org)
23: */
24: public class FormElementViewSelector implements Serializable {
25: public static final String FORM_ELEMENT_VIEW_SELECTOR_PROPERTY = "form.element.view.selector";
26:
27: /**
28: * Default URI of the taglib from where specified <code>tag</code> is searched.
29: */
30: public static final String DEFAULT_URI = "http://araneaframework.org/tag-library/standard";
31:
32: protected String tag;
33: protected Map attributes;
34: protected String uri;
35:
36: public FormElementViewSelector(String tagName, Map attributes) {
37: this .uri = DEFAULT_URI;
38: this .tag = tagName;
39: this .attributes = attributes == null ? Collections.EMPTY_MAP
40: : attributes;
41: }
42:
43: public FormElementViewSelector(String uri, String tag,
44: Map attributes) {
45: this .uri = uri;
46: this .tag = tag;
47: this .attributes = attributes == null ? Collections.EMPTY_MAP
48: : attributes;
49: }
50:
51: public Map getAttributes() {
52: return attributes;
53: }
54:
55: public String getTag() {
56: return tag;
57: }
58:
59: public String getUri() {
60: return uri;
61: }
62: }
|