01: /*
02: * Copyright 2005-2006 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
05: * in compliance with the License. You may obtain a copy of the License at
06: *
07: * http://www.apache.org/licenses/LICENSE-2.0
08: *
09: * Unless required by applicable law or agreed to in writing, software distributed under the License
10: * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11: * or implied. See the License for the specific language governing permissions and limitations under
12: * the License.
13: */
14:
15: package org.strecks.bind.internal;
16:
17: import java.util.Map;
18:
19: import org.strecks.bind.handler.BindHandler;
20: import org.strecks.converter.Converter;
21: import org.strecks.converter.handler.ConversionHandler;
22: import org.strecks.util.Assert;
23:
24: /**
25: * Encapsulates result of reading bind-related annotations. Includes <code>BindHandlers</code> and
26: * <code>Converters</code> for each property
27: * @author Phil Zoio
28: */
29: public class BindConvertInfo {
30:
31: private Map<String, BindHandler> bindMap;
32:
33: private Map<String, Converter> converterMap;
34:
35: public BindConvertInfo(Map<String, BindHandler> bindMap,
36: Map<String, Converter> converterMap,
37: ConversionHandler conversionHandler) {
38: super ();
39: Assert.notNull(bindMap);
40: Assert.notNull(converterMap);
41: Assert.notNull(conversionHandler);
42:
43: this .bindMap = bindMap;
44: this .converterMap = converterMap;
45: this .conversionHandler = conversionHandler;
46: }
47:
48: private ConversionHandler conversionHandler;
49:
50: public Map<String, BindHandler> getBindMap() {
51: return bindMap;
52: }
53:
54: public void setBindMap(Map<String, BindHandler> bindMap) {
55: this .bindMap = bindMap;
56: }
57:
58: public Map<String, Converter> getConverterMap() {
59: return converterMap;
60: }
61:
62: public void setConverterMap(Map<String, Converter> converterMap) {
63: this .converterMap = converterMap;
64: }
65:
66: public ConversionHandler getConversionHandler() {
67: return conversionHandler;
68: }
69:
70: }
|