User: ecrutchfield
Date: 06/09/25 12:23:12
Modified: andromda-aspdotnet/src/main/java/org/andromda/cartridges/aspdotnet/metafacades
AspFinalStateLogicImpl.java
Log:
add getPath()
Revision Changes Path
1.2 +35 -0 cartridges/andromda-aspdotnet/src/main/java/org/andromda/cartridges/aspdotnet/metafacades/AspFinalStateLogicImpl.java
Index: AspFinalStateLogicImpl.java
===================================================================
RCS file: /cvsroot/andromdaplugins/cartridges/andromda-aspdotnet/src/main/java/org/andromda/cartridges/aspdotnet/metafacades/AspFinalStateLogicImpl.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -r1.1 -r1.2
--- AspFinalStateLogicImpl.java 17 Sep 2006 17:30:03 -0000 1.1
+++ AspFinalStateLogicImpl.java 25 Sep 2006 19:23:12 -0000 1.2
@@ -1,5 +1,7 @@
package org.andromda.cartridges.aspdotnet.metafacades;
+import org.andromda.metafacades.uml.UMLProfile;
+import org.andromda.metafacades.uml.FrontEndUseCase;
/**
* MetafacadeLogic implementation for org.andromda.cartridges.aspdotnet.metafacades.AspFinalState.
@@ -10,4 +12,37 @@
public AspFinalStateLogicImpl(Object metaObject, String context) {
super(metaObject, context);
}
+
+ /**
+ * @see org.andromda.cartridges.aspdotnet.metafacades.AspFinalState#getPath()
+ */
+ protected java.lang.String handleGetPath()
+ {
+ String fullPath = null;
+
+ FrontEndUseCase useCase = this.getTargetUseCase();
+ if (useCase == null)
+ {
+ // - perhaps this final state links outside of the UML model
+ final Object taggedValue = this.findTaggedValue(UMLProfile.TAGGEDVALUE_EXTERNAL_HYPERLINK);
+ if (taggedValue == null)
+ {
+ String name = getName();
+ if (name != null && (name.startsWith("/") || name.startsWith("http://") || name.startsWith("file:")))
+ {
+ fullPath = name;
+ }
+ }
+ else
+ {
+ fullPath = String.valueOf(taggedValue);
+ }
+ }
+ else if (useCase instanceof AspUseCase)
+ {
+ fullPath = ((AspUseCase)useCase).getFullyQualifiedNamePath();
+ }
+
+ return fullPath;
+ }
}
|