1 package org.andromda.metafacades.uml14;
2
3 import org.andromda.metafacades.uml.Entity;
4 import org.andromda.metafacades.uml.UMLMetafacadeProperties;
5 import org.apache.commons.lang.StringUtils;
6
7
8
9
10
11
12
13 public class ManageableEntityAttributeLogicImpl
14 extends ManageableEntityAttributeLogic
15 {
16 private static final long serialVersionUID = 34L;
17
18
19
20
21 public ManageableEntityAttributeLogicImpl(
22 Object metaObject,
23 String context)
24 {
25 super(metaObject, context);
26 }
27
28
29
30
31 @Override
32 protected boolean handleIsDisplay()
33 {
34 boolean display = true;
35
36
37 if (this.isIdentifier())
38 {
39 final String displayStrategy =
40 StringUtils.trimToNull(
41 (String)this.getConfiguredProperty(UMLMetafacadeProperties.MANAGEABLE_ID_DISPLAY_STRATEGY));
42
43
44 if ("never".equalsIgnoreCase(displayStrategy))
45 {
46 display = false;
47 }
48
49
50 else if ("always".equalsIgnoreCase(displayStrategy))
51 {
52 display = true;
53 }
54
55
56 else
57 {
58 display = ((Entity)this.getOwner()).isUsingAssignedIdentifier();
59 }
60 }
61
62 return display;
63 }
64
65
66
67
68 @Override
69 protected boolean handleIsManageableGetterAvailable()
70 {
71 return this.getType() != null && this.getType().isBlobType();
72 }
73 }