Skip to content

Commit fbfee7d

Browse files
Scope of export extended on TNodeType and Topologytemplate (on modelio side) + Dependency github.jknack added on modelio side
1 parent b4d3e00 commit fbfee7d

File tree

163 files changed

+3325
-3931
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+3325
-3931
lines changed

ToscaDesigner/pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,13 @@
3636
<scope>provided</scope>
3737
</dependency>
3838

39-
<dependency>
39+
<dependency>
4040
<groupId>com.github.jknack</groupId>
4141
<artifactId>handlebars</artifactId>
4242
<version>4.3.1</version>
4343
<type>jar</type>
4444
</dependency>
45+
4546
</dependencies>
4647

4748
<!-- // Build // -->

ToscaDesigner/src/main/conf/module.xml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,6 @@
22
<Module id="ToscaDesigner" class="fr.softeam.toscadesigner.impl.ToscaDesignerModule" binaryversion="5.4.01" version="0.0.1" schema-level="2" uid="942db9f9-6869-472c-b269-9ca7ec36a014" author="Softeam" image="" url="">
33
<ClassPath>
44
<PathEntry path="lib/${project.artifactId}-${project.version}.jar"/>
5-
<PathEntry path="lib/commons-text-1.11.0.jar"/>
6-
<PathEntry path="lib/nashorn-core-15.4.jar"/>
7-
<PathEntry path="lib/asm-7.3.1.jar"/>
8-
<PathEntry path="lib/asm-commons-7.3.1.jar"/>
9-
<PathEntry path="lib/asm-analysis-7.3.1.jar"/>
10-
<PathEntry path="lib/asm-tree-7.3.1.jar"/>
11-
<PathEntry path="lib/asm-util-7.3.1.jar"/>
12-
<PathEntry path="lib/antlr4-runtime-4.5.1-1.jar"/>
13-
<PathEntry path="lib/commons-lang3-3.1.jar"/>
14-
<PathEntry path="lib/rhino-1.7R4.jar"/>
155
<PathEntry path="lib/handlebars-4.3.1.jar"/>
166
<PathEntry path="lib/slf4j-api-1.7.32.jar"/>
177
</ClassPath>
@@ -1050,8 +1040,8 @@
10501040
</Command>
10511041
<Command id="Export" label="%command.Export.label" tooltip="%command.Export.tooltip" image="res/icon/gui/export.png" modify-model="false">
10521042
<Scope metaclass="Standard.Package" stereotype="ToscaDesigner#ToscaModel"/>
1053-
<Scope metaclass="Infrastructure.ModelElement" stereotype="ToscaDesigner#TNodeType"/>
1054-
<Scope metaclass="Infrastructure.ModelElement" stereotype="ToscaDesigner#TTopologyTemplate"/>
1043+
<Scope metaclass="Standard.Class" stereotype="ToscaDesigner#TNodeType"/>
1044+
<Scope metaclass="Standard.Package" stereotype="ToscaDesigner#TTopologyTemplate"/>
10551045
<Handler class="fr.softeam.toscadesigner.handlers.commands.ExportToscaModelCommand">
10561046
<HParameter name="name" value=""/>
10571047
</Handler>
-137 Bytes
Binary file not shown.

ToscaDesigner/src/main/java/fr/softeam/toscadesigner/api/IToscaDesignerPeerModule.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
import com.modeliosoft.modelio.javadesigner.annotations.objid;
44
import org.modelio.api.module.IPeerModule;
55

6-
@objid ("5c7f53bd-3f13-46f6-844a-597e7d912a8f")
6+
@objid ("74e6670d-6815-4830-a3a6-9bf0d327b10e")
77
public interface IToscaDesignerPeerModule extends IPeerModule {
8-
@objid ("9d3d705b-21b6-4f57-9c6c-5547875049c5")
8+
@objid ("9a1e43b5-4c1f-4d75-bf5c-3da290150f48")
99
public static final String MODULE_NAME = "ToscaDesigner";
1010

11-
@objid ("35d4cbd5-1a65-4c86-abf7-07c1dcfecf0e")
11+
@objid ("c95d056d-f16a-4546-b993-9a30c980c996")
1212
public static final String TOSCA_STYLE = "ToscaStyle";
1313
}
1414

ToscaDesigner/src/main/java/fr/softeam/toscadesigner/api/ToscaDesignerProxyFactory.java

Lines changed: 127 additions & 138 deletions
Large diffs are not rendered by default.

ToscaDesigner/src/main/java/fr/softeam/toscadesigner/api/ToscaDesignerStereotypes.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,39 @@
22

33
import com.modeliosoft.modelio.javadesigner.annotations.objid;
44

5-
@objid ("c6e7f0e7-7cf0-435d-805e-7dc036c88c3a")
5+
@objid ("e5b6c80e-23d0-4716-ada1-0c8bb41939fb")
66
public interface ToscaDesignerStereotypes {
7-
@objid ("4a5f9810-710a-453e-85e3-2fb2fae3107b")
7+
@objid ("796a67c6-deb5-4221-83e2-33e9050e3b8f")
88
public static final String TNODETYPE = "TNodeType";
99

10-
@objid ("29cdc9c8-62e2-47f3-a842-05bfcf66ceb4")
10+
@objid ("5685892b-e57c-43b7-accc-a0417f6c4505")
1111
public static final String TRELATIONSHIPTYPE = "TRelationshipType";
1212

13-
@objid ("124b385d-b194-42b0-91c6-6f143ee255f2")
13+
@objid ("ce3b7ccc-418c-4f70-a15a-ec3c0c4a4931")
1414
public static final String TARTIFACTTYPE = "TartifactType";
1515

16-
@objid ("ed147d17-d4bc-408e-8e66-fc901d163304")
16+
@objid ("d88b8a37-82cd-4c25-b85d-b419d04b53c9")
1717
public static final String TINTERFACE = "TInterface";
1818

19-
@objid ("bd79defd-ed98-4672-83c5-ea7fe7c02dca")
19+
@objid ("067a0872-c735-4cb5-af3f-1633fd300ab9")
2020
public static final String TGROUP = "TGroup";
2121

22-
@objid ("79f54f59-6d78-4fb2-ba04-c1730ccb1df4")
22+
@objid ("22831a04-0a5b-4065-9147-7153196b2758")
2323
public static final String TPOLICY = "TPolicy";
2424

25-
@objid ("8334f7b2-12df-4f61-a845-70848d78e7f1")
25+
@objid ("b0c00bfd-80b4-4b49-b4f2-7afa98be18d7")
2626
public static final String TPOLICY_TYPE = "TPolicyType";
2727

28-
@objid ("06ef7d01-24bb-44cd-8a53-7fe09d7a0b17")
28+
@objid ("c1852bdc-f8c2-462f-bc6d-0366bae72268")
2929
public static final String TCAPABILITY_DEFINITION = "TCapabilityDefinition";
3030

31-
@objid ("00bcce85-5b07-444e-9e4a-1f2f898464e2")
31+
@objid ("70a80f0a-e3e0-46db-a4ed-a217a61247a9")
3232
public static final String CAPABILITY_DEFINITIONS_TYPE = "CapabilityDefinitionsType";
3333

34-
@objid ("7b43b6c7-1303-4708-96e1-c751254b9515")
34+
@objid ("1b6471d1-8409-4785-8fa1-1e17b1aefd3e")
3535
public static final String TCAPABILITY_TYPE = "TCapabilityType";
3636

37-
@objid ("bbfea042-2dc9-43d1-b16a-a5aef188725a")
37+
@objid ("b05f2af3-3c33-40e3-ab2f-2b9198d43074")
3838
public static final String TOPERATION = "TOperation";
3939
}
4040

ToscaDesigner/src/main/java/fr/softeam/toscadesigner/api/automatic/standard/staticdiagram/ServiceTemplateDiagram.java

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,16 @@
3838
* <p>Stereotype description:
3939
* <br/><i>null</i></p>
4040
*/
41-
@objid ("6410d22d-7798-4501-8617-a7b9c2035a03")
41+
@objid ("5049fde7-05c9-4cd2-8278-b7b24eda1cc1")
4242
public class ServiceTemplateDiagram implements IMdaProxy {
43-
@objid ("a660f212-6572-4daf-b5c6-03a20df1e555")
43+
@objid ("12c4483d-bc7a-4186-ab57-81322bc93d06")
4444
public static final String STEREOTYPE_NAME = "ServiceTemplateDiagram";
4545

4646
/**
4747
* The underlying {@link StaticDiagram} represented by this proxy, never null.
48+
*
4849
*/
49-
@objid ("ed0c131a-3fc4-4ca0-b4c0-c65f8d802775")
50+
@objid ("d8f37e64-b21f-4287-af80-790e290f79f4")
5051
protected final StaticDiagram elt;
5152

5253
/**
@@ -56,17 +57,16 @@ public class ServiceTemplateDiagram implements IMdaProxy {
5657
* @param elt a model object
5758
* @return <code>true</code> if the instantiation can be carried out else <code>false</code>.
5859
*/
59-
@objid ("b66eb848-836b-4cc0-bf0e-18571e78623c")
60+
@objid ("04a8284b-200d-4328-a9e8-d4731a918b60")
6061
public static boolean canInstantiate(final MObject elt) {
6162
return ((elt instanceof StaticDiagram) && (ServiceTemplateDiagram.MdaTypes.STEREOTYPE_ELT!=null) && ((StaticDiagram) elt).isStereotyped(ServiceTemplateDiagram.MdaTypes.STEREOTYPE_ELT));
6263
}
6364

6465
/**
6566
* Create a new {@link StaticDiagram} stereotyped << ServiceTemplateDiagram >> then instantiate a {@link ServiceTemplateDiagram} proxy.
66-
*
6767
* @return a {@link ServiceTemplateDiagram} proxy on the created {@link StaticDiagram}.
6868
*/
69-
@objid ("0f13ace5-ee1e-4cc3-b93c-1221f0635f7e")
69+
@objid ("a2b2db89-eb94-4f34-ac40-c8fb8587804e")
7070
public static ServiceTemplateDiagram create(final IModelingSession session) {
7171
ModelElement e = (ModelElement)session.getModel().createElement("Standard.StaticDiagram");
7272
e.getExtension().add(ServiceTemplateDiagram.MdaTypes.STEREOTYPE_ELT);
@@ -80,7 +80,7 @@ public static ServiceTemplateDiagram create(final IModelingSession session) {
8080
* @param obj a StaticDiagram
8181
* @return a {@link ServiceTemplateDiagram} proxy or <i>null</i>.
8282
*/
83-
@objid ("5b16420e-ad2c-4a18-a325-56aadac7e355")
83+
@objid ("692fc1af-3ba3-4e5e-9540-a6d8c01cc0bf")
8484
public static ServiceTemplateDiagram instantiate(final StaticDiagram obj) {
8585
return ServiceTemplateDiagram.canInstantiate(obj) ? new ServiceTemplateDiagram(obj) : null;
8686
}
@@ -89,19 +89,19 @@ public static ServiceTemplateDiagram instantiate(final StaticDiagram obj) {
8989
* Tries to instantiate a {@link ServiceTemplateDiagram} proxy from a {@link StaticDiagram} stereotyped << ServiceTemplateDiagram >> checking its metaclass and its stereotype.
9090
* <p>
9191
* The method throws an {@link IllegalArgumentException} if the instantiation cannot be carried out.
92+
* @throws IllegalArgumentException if the instantiation cannot be carried out.
9293
* @param obj a {@link StaticDiagram}
9394
* @return a {@link ServiceTemplateDiagram} proxy.
94-
* @throws IllegalArgumentException if the instantiation cannot be carried out.
9595
*/
96-
@objid ("b20d0fd3-6c2b-4dff-9b55-2e389f3a6830")
96+
@objid ("77345f8b-fae5-4c99-8bd3-bb3ecaece8bc")
9797
public static ServiceTemplateDiagram safeInstantiate(final StaticDiagram obj) throws IllegalArgumentException {
9898
if (ServiceTemplateDiagram.canInstantiate(obj))
99-
return new ServiceTemplateDiagram(obj);
99+
return new ServiceTemplateDiagram(obj);
100100
else
101-
throw new IllegalArgumentException("ServiceTemplateDiagram: Cannot instantiate "+obj+": wrong element type or stereotype");
101+
throw new IllegalArgumentException("ServiceTemplateDiagram: Cannot instantiate "+obj+": wrong element type or stereotype");
102102
}
103103

104-
@objid ("4ca73717-faca-4172-9a8a-beade071c6f8")
104+
@objid ("b2a0a66a-a51a-4fa8-96e0-45a6815d3aa0")
105105
@Override
106106
public boolean equals(final Object obj) {
107107
if (this == obj) {
@@ -118,38 +118,37 @@ public boolean equals(final Object obj) {
118118
}
119119

120120
/**
121-
* Get the underlying {@link StaticDiagram}.
121+
* Get the underlying {@link StaticDiagram}.
122122
* @return the StaticDiagram represented by this proxy, never null.
123123
*/
124-
@objid ("1132f9c0-dc4e-4fc9-8e7a-7643062751c2")
124+
@objid ("073a3cf2-ac1b-47bb-b7d1-9cde7d69df6d")
125125
public StaticDiagram getElement() {
126126
return this.elt;
127127
}
128128

129-
@objid ("7d0169fa-35b2-4440-b6c0-cf609ad899a2")
129+
@objid ("3a2c3f61-7b68-43b2-835c-a107f84b98d1")
130130
@Override
131131
public int hashCode() {
132132
return 23 + ((this.elt == null) ? 0 : this.elt.hashCode());
133-
134133
}
135134

136-
@objid ("6e54c705-8076-4527-ac69-520bb2289746")
135+
@objid ("f7f95df7-7f5e-42cf-9b72-5b51a0e46e56")
137136
protected ServiceTemplateDiagram(final StaticDiagram elt) {
138137
this.elt = elt;
139138
}
140139

141-
@objid ("f4f8acbe-52e0-4947-9cbf-c86b468b39dc")
140+
@objid ("191b8e17-997c-4052-9414-00bacb5e5337")
142141
public static final class MdaTypes {
143-
@objid ("eec2ee5b-538a-44f0-aa7f-fabd905fc53e")
142+
@objid ("1523aab1-f0f5-4c99-bc40-fb05e3e4547b")
144143
public static Stereotype STEREOTYPE_ELT;
145144

146-
@objid ("faf6d0f7-c02c-4a26-9712-0ae58bd64575")
145+
@objid ("8a0cade5-4b49-4652-8e84-c53130d30c29")
147146
private static Stereotype MDAASSOCDEP;
148147

149-
@objid ("0cec0e46-84e3-4dc6-9ab5-502f1908ee83")
148+
@objid ("e9ce9a29-572a-4b54-a101-31ebd37fbb1f")
150149
private static TagType MDAASSOCDEP_ROLE;
151150

152-
@objid ("b22d0582-c5d0-45e8-b7b8-1a374af9e290")
151+
@objid ("0bc68a18-cf1d-49be-8f1e-d9def7349b37")
153152
public static void init(final IModelingSession session) throws MdaProxyException {
154153
List <MRef> missingRefs = new ArrayList<>();
155154
MRef mRef;
@@ -166,7 +165,6 @@ public static void init(final IModelingSession session) throws MdaProxyException
166165
if (MDAASSOCDEP_ROLE==null) missingRefs.add(mRef);
167166

168167
if (! missingRefs.isEmpty()) throw new MdaProxyException(MdaProxyException.MdaProxyExceptionReason.MISSING_MDA_ELEMENT, missingRefs);
169-
170168
}
171169

172170
}

ToscaDesigner/src/main/java/fr/softeam/toscadesigner/api/automatic/standard/staticdiagram/TopologyTemplateDiagram.java

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,16 @@
3838
* <p>Stereotype description:
3939
* <br/><i>null</i></p>
4040
*/
41-
@objid ("286165ac-7512-43ba-9422-87db8260929c")
41+
@objid ("5dc8afd0-4671-47d6-85bb-99c58ba3988c")
4242
public class TopologyTemplateDiagram implements IMdaProxy {
43-
@objid ("4a1895e6-642d-44f4-87a9-29108769711b")
43+
@objid ("5ab6d464-846c-4ba8-9f75-4479cb4dd4b7")
4444
public static final String STEREOTYPE_NAME = "TopologyTemplateDiagram";
4545

4646
/**
4747
* The underlying {@link StaticDiagram} represented by this proxy, never null.
48+
*
4849
*/
49-
@objid ("e99b02cf-9a61-4d2c-92e3-6de2668810ab")
50+
@objid ("9e8b5d43-ca27-41a9-a678-a2eadf075151")
5051
protected final StaticDiagram elt;
5152

5253
/**
@@ -56,17 +57,16 @@ public class TopologyTemplateDiagram implements IMdaProxy {
5657
* @param elt a model object
5758
* @return <code>true</code> if the instantiation can be carried out else <code>false</code>.
5859
*/
59-
@objid ("2d74e26d-79ce-4e15-80d0-117823fb3f04")
60+
@objid ("f0909bfa-199d-4332-9b13-e589e9a3a54e")
6061
public static boolean canInstantiate(final MObject elt) {
6162
return ((elt instanceof StaticDiagram) && (TopologyTemplateDiagram.MdaTypes.STEREOTYPE_ELT!=null) && ((StaticDiagram) elt).isStereotyped(TopologyTemplateDiagram.MdaTypes.STEREOTYPE_ELT));
6263
}
6364

6465
/**
6566
* Create a new {@link StaticDiagram} stereotyped << TopologyTemplateDiagram >> then instantiate a {@link TopologyTemplateDiagram} proxy.
66-
*
6767
* @return a {@link TopologyTemplateDiagram} proxy on the created {@link StaticDiagram}.
6868
*/
69-
@objid ("a79415cd-e0c0-46c3-b0ad-733f0a85865a")
69+
@objid ("6c0c3319-6bc6-44a9-9566-881dfe04d565")
7070
public static TopologyTemplateDiagram create(final IModelingSession session) {
7171
ModelElement e = (ModelElement)session.getModel().createElement("Standard.StaticDiagram");
7272
e.getExtension().add(TopologyTemplateDiagram.MdaTypes.STEREOTYPE_ELT);
@@ -80,7 +80,7 @@ public static TopologyTemplateDiagram create(final IModelingSession session) {
8080
* @param obj a StaticDiagram
8181
* @return a {@link TopologyTemplateDiagram} proxy or <i>null</i>.
8282
*/
83-
@objid ("565b7cb8-4bfa-4558-a2d1-45f08722c4a0")
83+
@objid ("9b93d52b-6851-49e0-a9e7-d2c920068828")
8484
public static TopologyTemplateDiagram instantiate(final StaticDiagram obj) {
8585
return TopologyTemplateDiagram.canInstantiate(obj) ? new TopologyTemplateDiagram(obj) : null;
8686
}
@@ -89,19 +89,19 @@ public static TopologyTemplateDiagram instantiate(final StaticDiagram obj) {
8989
* Tries to instantiate a {@link TopologyTemplateDiagram} proxy from a {@link StaticDiagram} stereotyped << TopologyTemplateDiagram >> checking its metaclass and its stereotype.
9090
* <p>
9191
* The method throws an {@link IllegalArgumentException} if the instantiation cannot be carried out.
92+
* @throws IllegalArgumentException if the instantiation cannot be carried out.
9293
* @param obj a {@link StaticDiagram}
9394
* @return a {@link TopologyTemplateDiagram} proxy.
94-
* @throws IllegalArgumentException if the instantiation cannot be carried out.
9595
*/
96-
@objid ("1cb5f0c6-6793-447a-99ab-8883d3af4746")
96+
@objid ("14500d3c-b98d-4b94-85a6-878bc0069dd5")
9797
public static TopologyTemplateDiagram safeInstantiate(final StaticDiagram obj) throws IllegalArgumentException {
9898
if (TopologyTemplateDiagram.canInstantiate(obj))
99-
return new TopologyTemplateDiagram(obj);
99+
return new TopologyTemplateDiagram(obj);
100100
else
101-
throw new IllegalArgumentException("TopologyTemplateDiagram: Cannot instantiate "+obj+": wrong element type or stereotype");
101+
throw new IllegalArgumentException("TopologyTemplateDiagram: Cannot instantiate "+obj+": wrong element type or stereotype");
102102
}
103103

104-
@objid ("8a4d4fe3-ee1a-408b-ab42-9cabc9c1878c")
104+
@objid ("16eceb3d-253a-4c8f-a9c1-f1c86c25a88c")
105105
@Override
106106
public boolean equals(final Object obj) {
107107
if (this == obj) {
@@ -118,38 +118,37 @@ public boolean equals(final Object obj) {
118118
}
119119

120120
/**
121-
* Get the underlying {@link StaticDiagram}.
121+
* Get the underlying {@link StaticDiagram}.
122122
* @return the StaticDiagram represented by this proxy, never null.
123123
*/
124-
@objid ("be2380f7-4455-4f61-9472-553e4d503b0b")
124+
@objid ("718b1ecd-8448-4d62-93a5-0778c7fe3d26")
125125
public StaticDiagram getElement() {
126126
return this.elt;
127127
}
128128

129-
@objid ("2665e2f5-995a-46c6-870d-e3d2be2d6f44")
129+
@objid ("e1b4ae58-58a1-4156-9310-a357b98ae09b")
130130
@Override
131131
public int hashCode() {
132132
return 23 + ((this.elt == null) ? 0 : this.elt.hashCode());
133-
134133
}
135134

136-
@objid ("82862029-1469-4cfd-84e3-ba6c9b93b32d")
135+
@objid ("5f172643-d636-40bc-ae5a-5981380ef64f")
137136
protected TopologyTemplateDiagram(final StaticDiagram elt) {
138137
this.elt = elt;
139138
}
140139

141-
@objid ("b174b93b-03dc-4c73-8ed4-38e19e154add")
140+
@objid ("6206bfca-0c44-4000-871e-5bf04527a702")
142141
public static final class MdaTypes {
143-
@objid ("98cd72c2-ac84-4486-8ca2-1b436f405423")
142+
@objid ("800f4002-840a-473f-982d-68b4978b315b")
144143
public static Stereotype STEREOTYPE_ELT;
145144

146-
@objid ("0c72be6e-d42e-4c2e-b796-df5834b37321")
145+
@objid ("3309329e-43da-4a7a-941a-1ca5af550232")
147146
private static Stereotype MDAASSOCDEP;
148147

149-
@objid ("2c897f16-b8bd-4d44-a5ed-fcf752a31ba5")
148+
@objid ("10f060b5-1a48-4815-8ba7-b85a641a3f9a")
150149
private static TagType MDAASSOCDEP_ROLE;
151150

152-
@objid ("1e02d21e-1ed4-4133-ba37-27546160adf1")
151+
@objid ("b44dc0a6-aa7e-48d5-bde1-5e4419cae510")
153152
public static void init(final IModelingSession session) throws MdaProxyException {
154153
List <MRef> missingRefs = new ArrayList<>();
155154
MRef mRef;
@@ -166,7 +165,6 @@ public static void init(final IModelingSession session) throws MdaProxyException
166165
if (MDAASSOCDEP_ROLE==null) missingRefs.add(mRef);
167166

168167
if (! missingRefs.isEmpty()) throw new MdaProxyException(MdaProxyException.MdaProxyExceptionReason.MISSING_MDA_ELEMENT, missingRefs);
169-
170168
}
171169

172170
}

0 commit comments

Comments
 (0)