1 package org.andromda.cartridges.jsf.metafacades;
2
3 import org.andromda.metafacades.uml.FrontEndUseCase;
4 import org.andromda.metafacades.uml.UMLProfile;
5
6
7
8
9
10
11 public class JSFFinalStateLogicImpl
12 extends JSFFinalStateLogic
13 {
14 private static final long serialVersionUID = 34L;
15
16
17
18
19 public JSFFinalStateLogicImpl(Object metaObject, String context)
20 {
21 super(metaObject, context);
22 }
23
24
25
26
27
28 protected String handleGetPath()
29 {
30 String fullPath = null;
31
32 FrontEndUseCase useCase = this.getTargetUseCase();
33 if (useCase == null)
34 {
35
36 final Object taggedValue = this.findTaggedValue(UMLProfile.TAGGEDVALUE_EXTERNAL_HYPERLINK);
37 if (taggedValue == null)
38 {
39 String name = getName();
40 if (name != null && (name.startsWith("/") || name.startsWith("http://") || name.startsWith("file:")))
41 {
42 fullPath = name;
43 }
44 }
45 else
46 {
47 fullPath = String.valueOf(taggedValue);
48 }
49 }
50 else if (useCase instanceof JSFUseCase)
51 {
52 fullPath = ((JSFUseCase)useCase).getPath();
53 }
54
55 return fullPath;
56 }
57 }