model.modelDescription = value;
}
},
+ ORCHESTRATION_TYPE("instantiationType"){
+ @Override
+ public void populate(Model model, String value) {
+ model.instantiationType = value;
+ }
+ },
NAME_AND_DESCRIPTION("providing_service_name") {
@Override
public void populate(Model model, String value) {
private String modelNameVersionId; // model-version-id
private String modelVersion;
private String modelDescription;
-
+ private String instantiationType;
protected Set<Resource> resources = new HashSet<>();
protected Set<Widget> widgets = new HashSet<>();
public abstract boolean addWidget(Widget resource) throws XmlArtifactGenerationException;
+ /**
+ * @return the Widget Type of this model.
+ */
public abstract WidgetType getWidgetType();
public abstract String getModelTypeName();
+ /**
+ * Check whether the model's Widget Type matches the supplied type.
+ *
+ * @param type
+ * the Widget Type to compare
+ * @return true if the Widget Type of this model matches the supplied type
+ */
+ public boolean hasWidgetType(String type) {
+ return getWidgetType() == WidgetType.valueOf(type);
+ }
+
public boolean addResource(Resource resource) {
return resources.add(resource);
}
return modelNameVersionId;
}
+ public String getInstantiationType() {
+ return instantiationType;
+ }
+
/**
* Gets widget version id.
*
* @throws XmlArtifactGenerationException
*/
public String getWidgetId() throws XmlArtifactGenerationException {
- return Widget.getWidget(getWidgetType()).getId();
+ return Widget.createWidget(getWidgetType()).getId();
}
/**
* @throws XmlArtifactGenerationException
*/
public String getWidgetInvariantId() throws XmlArtifactGenerationException {
- return Widget.getWidget(getWidgetType()).getWidgetId();
+ return Widget.createWidget(getWidgetType()).getWidgetId();
}
/**
* the model ident info
*/
public void populateModelIdentificationInformation(Map<String, String> modelIdentInfo) {
+ if (modelIdentInfo == null) {
+ return;
+ }
Iterator<String> iter = modelIdentInfo.keySet().iterator();
String property;
while (iter.hasNext()) {