X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fonap%2Faai%2Fbabel%2Fxml%2Fgenerator%2Fmodel%2FWidget.java;h=2decc8cfc0091fd591f22204a3112dbfa77c9293;hb=5a6fd49a6aca3a567464527335b107746e28f3bd;hp=44beb6597a339f0b5cdb6f7c7d451d36ebf6ef8e;hpb=f03e49cdf5c8d54733416ab244826b9429c9c86c;p=aai%2Fbabel.git diff --git a/src/main/java/org/onap/aai/babel/xml/generator/model/Widget.java b/src/main/java/org/onap/aai/babel/xml/generator/model/Widget.java index 44beb65..2decc8c 100644 --- a/src/main/java/org/onap/aai/babel/xml/generator/model/Widget.java +++ b/src/main/java/org/onap/aai/babel/xml/generator/model/Widget.java @@ -24,7 +24,6 @@ package org.onap.aai.babel.xml.generator.model; import java.util.Collection; import java.util.Collections; import java.util.HashSet; -import java.util.Map; import java.util.Properties; import java.util.Set; import org.onap.aai.babel.xml.generator.XmlArtifactGenerationException; @@ -58,7 +57,7 @@ public class Widget extends Model { * Copy Constructor. * * @param baseWidget - * @throws XmlArtifactGenerationException + * @throws XmlArtifactGenerationException */ public Widget(Widget baseWidget) throws XmlArtifactGenerationException { this(baseWidget.getWidgetType(), baseWidget.getName(), baseWidget.getDeleteFlag()); @@ -76,7 +75,7 @@ public class Widget extends Model { * @param type * the type * @return a new widget of the specified type - * @throws XmlArtifactGenerationException + * @throws XmlArtifactGenerationException * if there is no configuration defined for the specified type */ public static Widget getWidget(Type type) throws XmlArtifactGenerationException { @@ -87,11 +86,6 @@ public class Widget extends Model { return widget; } - @Override - public boolean isResource() { - return false; - } - public String getId() { String id = WidgetConfigurationUtil.getConfig() .getProperty(ArtifactType.AAI.name() + ".model-version-id." + getName()); @@ -187,11 +181,6 @@ public class Widget extends Model { return true; } - @Override - public Map getProperties() { - return Collections.emptyMap(); - } - @Override public String toString() { return getName() + " Widget keys=" + keys + ", resources=" + resources + ", widgets=" + widgets; @@ -201,4 +190,20 @@ public class Widget extends Model { public boolean getDeleteFlag() { return deleteFlag; } + + @Override + public String getModelTypeName() { + throw new IllegalAccessException(GENERATOR_AAI_ERROR_UNSUPPORTED_WIDGET_OPERATION); + } + + @Override + public String getModelId() { + throw new IllegalAccessException(GENERATOR_AAI_ERROR_UNSUPPORTED_WIDGET_OPERATION); + } + + @Override + public String getModelNameVersionId() { + throw new IllegalAccessException(GENERATOR_AAI_ERROR_UNSUPPORTED_WIDGET_OPERATION); + } + }