1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | |
package org.apache.myfaces.config.impl.digester.elements; |
20 | |
|
21 | |
import java.util.ArrayList; |
22 | |
import java.util.List; |
23 | |
import java.util.Iterator; |
24 | |
import java.util.Collections; |
25 | |
|
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | 0 | public class Converter |
31 | |
{ |
32 | |
|
33 | |
private String converterId; |
34 | |
private String forClass; |
35 | |
private String converterClass; |
36 | 0 | private List<Property> _properties = null; |
37 | 0 | private List<Attribute> _attributes = null; |
38 | |
|
39 | |
|
40 | |
public String getConverterId() |
41 | |
{ |
42 | 0 | return converterId; |
43 | |
} |
44 | |
|
45 | |
|
46 | |
public void setConverterId(String converterId) |
47 | |
{ |
48 | 0 | this.converterId = converterId; |
49 | 0 | } |
50 | |
|
51 | |
|
52 | |
public String getForClass() |
53 | |
{ |
54 | 0 | return forClass; |
55 | |
} |
56 | |
|
57 | |
|
58 | |
public void setForClass(String forClass) |
59 | |
{ |
60 | 0 | this.forClass = forClass; |
61 | 0 | } |
62 | |
|
63 | |
|
64 | |
public String getConverterClass() |
65 | |
{ |
66 | 0 | return converterClass; |
67 | |
} |
68 | |
|
69 | |
|
70 | |
public void setConverterClass(String converterClass) |
71 | |
{ |
72 | 0 | this.converterClass = converterClass; |
73 | 0 | } |
74 | |
|
75 | |
public void addProperty(Property value) |
76 | |
{ |
77 | 0 | if(_properties==null) |
78 | 0 | _properties = new ArrayList<Property>(); |
79 | |
|
80 | 0 | _properties.add(value); |
81 | 0 | } |
82 | |
|
83 | |
public Iterator<Property> getProperties() |
84 | |
{ |
85 | 0 | if(_properties==null) |
86 | 0 | return Collections.EMPTY_LIST.iterator(); |
87 | |
|
88 | 0 | return _properties.iterator(); |
89 | |
} |
90 | |
|
91 | |
public void addAttribute(Attribute value) |
92 | |
{ |
93 | 0 | if(_attributes == null) |
94 | 0 | _attributes = new ArrayList<Attribute>(); |
95 | |
|
96 | 0 | _attributes.add(value); |
97 | 0 | } |
98 | |
|
99 | |
public Iterator<Attribute> getAttributes() |
100 | |
{ |
101 | 0 | if(_attributes==null) |
102 | 0 | return Collections.EMPTY_LIST.iterator(); |
103 | |
|
104 | 0 | return _attributes.iterator(); |
105 | |
} |
106 | |
} |