1 package org.andromda.cartridges.jsf2.metafacades;
2
3 import org.andromda.cartridges.jsf2.JSFGlobals;
4 import org.andromda.utils.StringUtilsHelper;
5 import org.apache.commons.lang.ObjectUtils;
6 import org.apache.commons.lang.StringUtils;
7
8
9
10
11
12
13 public class JSFEnumerationLogicImpl
14 extends JSFEnumerationLogic
15 {
16 private static final long serialVersionUID = 34L;
17
18
19
20
21 public JSFEnumerationLogicImpl(Object metaObject, String context)
22 {
23 super(metaObject, context);
24 }
25
26
27
28
29
30 protected String handleGetConverterName()
31 {
32 return StringUtils.replace(
33 ObjectUtils.toString(this.getConfiguredProperty(JSFGlobals.CONVERTER_PATTERN)),
34 "{0}",
35 this.getName());
36 }
37
38
39
40
41
42 protected String handleGetFullyQualifiedConverterName()
43 {
44 return this.getPackageName() + "." + this.getConverterName();
45 }
46
47
48
49
50
51 protected String handleGetConverterPath()
52 {
53 return this.getFullyQualifiedConverterName().replace('.', '/');
54 }
55
56
57
58
59
60 protected String handleGetMessageKey()
61 {
62 return StringUtilsHelper.toResourceMessageKey(getName());
63 }
64 }