1 package com.silvermindsoftware.hitch.config;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 import com.silvermindsoftware.hitch.ReadOnly;
20
21
22
23
24 public class BoundComponentConfig {
25
26 private Class type = void.class;
27 private String componentFieldName;
28 private String modelPropertyName;
29 private Class handlerClass = void.class;
30 private String[] handlerParameters = new String[]{};
31 private ReadOnly readOnly = ReadOnly.DEFAULT;
32
33 public BoundComponentConfig(String sharedPropertyName) {
34
35 this.componentFieldName = sharedPropertyName;
36 this.modelPropertyName = sharedPropertyName;
37
38 }
39
40 public BoundComponentConfig(String sharedPropertyName, Class handlerClass) {
41
42 this.componentFieldName = sharedPropertyName;
43 this.modelPropertyName = sharedPropertyName;
44 this.handlerClass = handlerClass;
45
46 }
47
48 public BoundComponentConfig(String sharedPropertyName, String[] handlerParameters) {
49
50 this.componentFieldName = sharedPropertyName;
51 this.modelPropertyName = sharedPropertyName;
52 this.handlerParameters = handlerParameters;
53
54 }
55
56 public BoundComponentConfig(String sharedPropertyName, Class handlerClass, String[] handlerParameters) {
57
58 this.componentFieldName = sharedPropertyName;
59 this.modelPropertyName = sharedPropertyName;
60 this.handlerClass = handlerClass;
61 this.handlerParameters = handlerParameters;
62
63 }
64
65 public BoundComponentConfig(String componentFieldName, String modelPropertyName) {
66
67 this.componentFieldName = componentFieldName;
68 this.modelPropertyName = modelPropertyName;
69
70 }
71
72 public BoundComponentConfig(String componentFieldName, String modelPropertyName, Class handlerClass) {
73
74 this.componentFieldName = componentFieldName;
75 this.modelPropertyName = modelPropertyName;
76 this.handlerClass = handlerClass;
77
78 }
79
80 public BoundComponentConfig(String componentFieldName, String modelPropertyName, String[] handlerParameters) {
81
82 this.componentFieldName = componentFieldName;
83 this.modelPropertyName = modelPropertyName;
84 this.handlerParameters = handlerParameters;
85
86 }
87
88 public BoundComponentConfig(String componentFieldName, String modelPropertyName, Class handlerClass, String[] handlerParameters) {
89
90 this.componentFieldName = componentFieldName;
91 this.modelPropertyName = modelPropertyName;
92 this.handlerClass = handlerClass;
93 this.handlerParameters = handlerParameters;
94
95 }
96
97 public BoundComponentConfig(String componentFieldName, String modelPropertyName, Class handlerClass, String[] handlerParameters, ReadOnly readOnly, Class type) {
98
99 this.componentFieldName = componentFieldName;
100 this.modelPropertyName = modelPropertyName;
101 this.handlerClass = handlerClass;
102 this.handlerParameters = handlerParameters;
103 this.readOnly = readOnly;
104 this.type = type;
105
106 }
107
108 public String getComponentFieldName() {
109 return componentFieldName;
110 }
111
112 public String getModelPropertyName() {
113 return modelPropertyName;
114 }
115
116 public Class getHandlerClass() {
117 return handlerClass;
118 }
119
120 public String[] getHandlerParameters() {
121 return handlerParameters;
122 }
123
124 public ReadOnly getReadOnly() {
125 return readOnly;
126 }
127
128 public Class getType() {
129 return type;
130 }
131
132 }