1 package org.andromda.cartridges.spring.metafacades;
2
3 import org.andromda.utils.StringUtilsHelper;
4 import org.apache.commons.lang.StringUtils;
5
6
7
8
9
10
11 public class SpringQueueLogicImpl
12 extends SpringQueueLogic
13 {
14 private static final long serialVersionUID = 34L;
15
16
17
18
19
20
21 public SpringQueueLogicImpl (Object metaObject, String context)
22 {
23 super (metaObject, context);
24 }
25
26
27
28
29
30 protected String handleGetBeanName()
31 {
32 return StringUtilsHelper.lowerCamelCaseName(this.getName());
33 }
34
35
36
37
38
39 protected String handleGetTemplateBeanName()
40 {
41 return StringUtilsHelper.lowerCamelCaseName(this.getTemplatePattern().replaceAll(
42 "\\{0\\}",
43 this.getName()));
44 }
45
46
47
48
49
50 protected String handleGetTemplateGetterName()
51 {
52 return "get" + StringUtils.capitalize(this.getTemplateBeanName());
53 }
54
55
56
57
58
59 protected String handleGetTemplateSetterName()
60 {
61 return "set" + StringUtils.capitalize(this.getTemplateBeanName());
62 }
63
64
65
66
67
68
69 private String getTemplatePattern()
70 {
71 return String.valueOf(this.getConfiguredProperty(SpringGlobals.JMS_DESTINATION_TEMPLATE_PATTERN));
72 }
73 }