import java.util.Collections;
import java.util.EnumMap;
import java.util.HashSet;
+import java.util.Map;
import java.util.Properties;
import java.util.Set;
import org.onap.aai.babel.logging.ApplicationMsgs;
"Cannot generate artifacts. Widget configuration not found for %s";
public enum Type {
- SERVICE,
- VF,
- VFC,
- VSERVER,
- VOLUME,
- FLAVOR,
- TENANT,
- VOLUME_GROUP,
- LINT,
- L3_NET,
- VFMODULE,
- IMAGE,
- OAM_NETWORK,
- ALLOTTED_RESOURCE,
- TUNNEL_XCONNECT,
- CONFIGURATION,
- CR,
- INSTANCE_GROUP;
+ SERVICE, VF, VFC, VSERVER, VOLUME, FLAVOR, TENANT, VOLUME_GROUP, LINT, L3_NET, VFMODULE, IMAGE, OAM_NETWORK, ALLOTTED_RESOURCE, TUNNEL_XCONNECT, CONFIGURATION, CR, INSTANCE_GROUP;
}
private static Logger log = LogHelper.INSTANCE;
/**
* Gets widget.
*
- * @param type the type
+ * @param type
+ * the type
* @return the widget
*/
public static Widget getWidget(Type type) {
return widget;
}
+ @Override
+ public boolean isResource() {
+ return false;
+ }
+
public String getId() {
- String id = WidgetConfigurationUtil.getConfig().getProperty(ArtifactType.AAI.name() + ".model-version-id." + getName());
+ String id = WidgetConfigurationUtil.getConfig()
+ .getProperty(ArtifactType.AAI.name() + ".model-version-id." + getName());
if (id == null) {
throw new IllegalArgumentException(String.format(GENERATOR_AAI_CONFIGLPROP_NOT_FOUND,
ArtifactType.AAI.name() + ".model-version-id." + getName()));
}
public String getName() {
- ModelWidget widgetModel = this.getClass().getAnnotation(ModelWidget.class);
- return widgetModel.name();
+ return this.getClass().getAnnotation(ModelWidget.class).name();
}
/**
/**
* Equals method that compares Widget IDs.
*
- * @param obj the Widget object to compare
+ * @param obj
+ * the Widget object to compare
* @return whether or not obj is equal to this Widget
*/
@Override
/**
* Determine whether one or more keys belonging to this Widget appear in the specified Collection.
*
- * @param keys the keys
+ * @param keys
+ * the keys
* @return the boolean
*/
public boolean memberOf(Collection<String> keys) {
public boolean addWidget(Widget widget) {
return true;
}
+
+ @Override
+ public Map<String, Object> getProperties() {
+ return Collections.emptyMap();
+ }
}