aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans
diff options
context:
space:
mode:
Diffstat (limited to 'vid-app-common/src/main/java/org/openecomp/vid/asdc/beans')
-rwxr-xr-xvid-app-common/src/main/java/org/openecomp/vid/asdc/beans/Artifact.java314
-rwxr-xr-xvid-app-common/src/main/java/org/openecomp/vid/asdc/beans/Resource.java429
-rwxr-xr-xvid-app-common/src/main/java/org/openecomp/vid/asdc/beans/Service.java351
-rwxr-xr-xvid-app-common/src/main/java/org/openecomp/vid/asdc/beans/SubResource.java175
-rwxr-xr-xvid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Capability.java140
-rwxr-xr-xvid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Constraint.java199
-rwxr-xr-xvid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Group.java135
-rwxr-xr-xvid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Import.java48
-rwxr-xr-xvid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Input.java166
-rwxr-xr-xvid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/NodeTemplate.java117
-rwxr-xr-xvid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Property.java157
-rwxr-xr-xvid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Requirement.java120
-rwxr-xr-xvid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Schema.java53
-rwxr-xr-xvid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/SubstitutionMappings.java101
-rwxr-xr-xvid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/TopologyTemplate.java124
-rwxr-xr-xvid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaCsar.java101
-rwxr-xr-xvid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaMeta.java122
-rwxr-xr-xvid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaMetadata.java461
-rwxr-xr-xvid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaModel.java166
19 files changed, 3479 insertions, 0 deletions
diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/Artifact.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/Artifact.java
new file mode 100755
index 000000000..d24d1232a
--- /dev/null
+++ b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/Artifact.java
@@ -0,0 +1,314 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.vid.asdc.beans;
+
+import java.util.UUID;
+
+/**
+ * The Class Artifact.
+ */
+public class Artifact {
+
+/*
+ * SDC has widened this to a String type for 1610.
+ public enum Type {
+ HEAT,
+ HEAT_ENV,
+ HEAT_VOL,
+ HEAT_NET,
+ HEAT_NESTED,
+ HEAT_ARTIFACT,
+ YANG_XML,
+ VNF_CATALOG,
+ VF_LICENSE,
+ VENDOR_LICENSE,
+ ASSET_INVENTORY_PROFILE,
+ ASSET_QUERY_SPEC,
+ APPC_CONFIG,
+ VF_MODULES_METADATA,
+ DCAE_TOSCA,
+ DCAE_JSON,
+ DCAE_EMF,
+ DCAE_DOC,
+ DCAE_BLUEPRINT,
+ DCAE_EVENT,
+ DCAE_INVENTORY_TOSCA,
+ DCAE_INVENTORY_JSON,
+ DCAE_INVENTORY_EMF,
+ DCAE_INVENTORY_DOC,
+ DCAE_INVENTORY_BLUEPRINT,
+ DCAE_INVENTORY_EVENT,
+ OTHER,
+ AAI_SERVICE_MODEL //HEY! READ ME! YES, YOU! I AM A TEMPORARY FIX, PLEASE REMOVE ME BECAUSE I AM A FRAUD. I DON'T BELONG HERE.
+ //Warm Regards,
+ // *The* Artifact.Type.AAI_SERVICE_MODEL Constant
+ }
+ */
+
+ /** The artifact name. */
+ private String artifactName;
+
+ /** The artifact label. */
+ private String artifactLabel;
+
+ /** The artifact group type. */
+ private String artifactGroupType;
+
+ /** The artifact type. */
+ private String artifactType;
+
+ /** The artifact URL. */
+ private String artifactURL;
+
+ /** The artifact description. */
+ private String artifactDescription;
+
+ /** The artifact timeout. */
+ private int artifactTimeout;
+
+ /** The artifact checksum. */
+ private String artifactChecksum;
+
+ /** The artifact UUID. */
+ private String artifactUUID;
+
+ /** The artifact version. */
+ private String artifactVersion;
+
+ /** The generated from UUID. */
+ private String generatedFromUUID;
+
+ /**
+ * Gets the artifact name.
+ *
+ * @return the artifact name
+ */
+ public String getArtifactName() {
+ return artifactName;
+ }
+
+ /**
+ * Gets the artifact type.
+ *
+ * @return the artifact type
+ */
+ public String getArtifactType() {
+ return artifactType;
+ }
+ /**
+ * Gets the artifact group type.
+ *
+ * @return the artifact group type
+ */
+ public String getArtifactGroupType() {
+ return artifactGroupType;
+ }
+
+ /**
+ * Gets the artifact label.
+ *
+ * @return the artifact label
+ */
+ public String getArtifactLabel() {
+ return artifactLabel;
+ }
+ /**
+ * Gets the artifact URL.
+ *
+ * @return the artifact URL
+ */
+ public String getArtifactURL() {
+ return artifactURL;
+ }
+
+ /**
+ * Gets the artifact description.
+ *
+ * @return the artifact description
+ */
+ public String getArtifactDescription() {
+ return artifactDescription;
+ }
+
+ /**
+ * Gets the artifact timeout.
+ *
+ * @return the artifact timeout
+ */
+ public int getArtifactTimeout() {
+ return artifactTimeout;
+ }
+
+ /**
+ * Gets the artifact checksum.
+ *
+ * @return the artifact checksum
+ */
+ public String getArtifactChecksum() {
+ return artifactChecksum;
+ }
+
+ /**
+ * Gets the artifact UUID.
+ *
+ * @return the artifact UUID
+ */
+ public String getArtifactUUID() {
+ return artifactUUID;
+ }
+
+ /**
+ * Gets the artifact version.
+ *
+ * @return the artifact version
+ */
+ public String getArtifactVersion() {
+ return artifactVersion;
+ }
+
+ /**
+ * Gets the generated from UUID.
+ *
+ * @return the generated from UUID
+ */
+ public String getGeneratedFromUUID() {
+ return generatedFromUUID;
+ }
+
+ /**
+ * Sets the artifact name.
+ *
+ * @param artifactName the new artifact name
+ */
+ public void setArtifactName(String artifactName) {
+ this.artifactName = artifactName;
+ }
+
+ /**
+ * Sets the artifact type.
+ *
+ * @param artifactType the new artifact type
+ */
+ public void setArtifactType(String artifactType) {
+ this.artifactType = artifactType;
+ }
+ /**
+ * Sets the artifact group type.
+ *
+ * @param artifactGroupType the new artifact group type
+ */
+ public void setArtifactGroupType(String artifactGroupType) {
+ this.artifactGroupType = artifactGroupType;
+ }
+ /**
+ * Sets the artifact label.
+ *
+ * @param artifactGroupType the new artifact label
+ */
+ public void setArtifactLabel(String artifactLabel) {
+ this.artifactLabel = artifactLabel;
+ }
+ /**
+ * Sets the artifact URL.
+ *
+ * @param artifactURL the new artifact URL
+ */
+ public void setArtifactURL(String artifactURL) {
+ this.artifactURL = artifactURL;
+ }
+
+ /**
+ * Sets the artifact description.
+ *
+ * @param artifactDescription the new artifact description
+ */
+ public void setArtifactDescription(String artifactDescription) {
+ this.artifactDescription = artifactDescription;
+ }
+
+ /**
+ * Sets the artifact timeout.
+ *
+ * @param artifactTimeout the new artifact timeout
+ */
+ public void setArtifactTimeout(int artifactTimeout) {
+ this.artifactTimeout = artifactTimeout;
+ }
+
+ /**
+ * Sets the artifact checksum.
+ *
+ * @param artifactChecksum the new artifact checksum
+ */
+ public void setArtifactChecksum(String artifactChecksum) {
+ this.artifactChecksum = artifactChecksum;
+ }
+
+ /**
+ * Sets the artifact UUID.
+ *
+ * @param artifactUUID the new artifact UUID
+ */
+ public void setArtifactUUID(String artifactUUID) {
+ this.artifactUUID = artifactUUID;
+ }
+
+ /**
+ * Sets the artifact version.
+ *
+ * @param artifactVersion the new artifact version
+ */
+ public void setArtifactVersion(String artifactVersion) {
+ this.artifactVersion = artifactVersion;
+ }
+
+ /**
+ * Sets the generated from UUID.
+ *
+ * @param generatedFromUUID the new generated from UUID
+ */
+ public void setGeneratedFromUUID(String generatedFromUUID) {
+ this.generatedFromUUID = generatedFromUUID;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode() {
+ final UUID uuid = UUID.fromString(getArtifactUUID());
+
+ return uuid.hashCode();
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object o) {
+ if (o == this) return true;
+ if (!(o instanceof Artifact)) return false;
+
+ final Artifact artifact = (Artifact) o;
+
+ return (artifact.getArtifactUUID().equals(getArtifactUUID()));
+ }
+}
diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/Resource.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/Resource.java
new file mode 100755
index 000000000..3911c699a
--- /dev/null
+++ b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/Resource.java
@@ -0,0 +1,429 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.vid.asdc.beans;
+
+import java.util.Collection;
+import java.util.UUID;
+
+/**
+ * The Class Resource.
+ */
+public class Resource {
+
+ /**
+ * The Enum Type.
+ */
+ public enum Type {
+
+ /** The vf. */
+ VF,
+
+ /** The vfc. */
+ VFC,
+
+ /** The cp. */
+ CP,
+
+ /** The vl. */
+ VL,
+
+ /** The vfcmt. */
+ VFCMT
+ }
+
+ /**
+ * The Enum LifecycleState.
+ */
+ public enum LifecycleState {
+
+ /** The not certified checkout. */
+ NOT_CERTIFIED_CHECKOUT,
+
+ /** The not certified checkin. */
+ NOT_CERTIFIED_CHECKIN,
+
+ /** The ready for certification. */
+ READY_FOR_CERTIFICATION,
+
+ /** The certification in progress. */
+ CERTIFICATION_IN_PROGRESS,
+
+ /** The certified. */
+ CERTIFIED
+ }
+
+ /** The uuid. */
+ private String uuid;
+
+ /** The invariant UUID. */
+ private String invariantUUID;
+
+ /** The name. */
+ private String name;
+
+ /** The description. */
+ private String description;
+
+ /** The version. */
+ private String version;
+
+ /** The tosca model URL. */
+ private String toscaModelURL;
+
+ /** The category. */
+ private String category;
+
+ /** The sub category. */
+ private String subCategory;
+
+ /** The resource type. */
+ private Resource.Type resourceType;
+
+ /** The lifecycle state. */
+ private Resource.LifecycleState lifecycleState;
+
+ /** The last updater user ID. */
+ private String lastUpdaterUserId;
+
+ /** The last updater full name. */
+ private String lastUpdaterFullName;
+
+ /** The tosca model. */
+ private String toscaModel;
+
+ /** The tosca resource name. */
+ private String toscaResourceName;
+
+ /** The artifacts. */
+ private Collection<Artifact> artifacts;
+
+ /** The resources. */
+ private Collection<SubResource> resources;
+
+ /**
+ * Gets the uuid.
+ *
+ * @return the uuid
+ */
+ public String getUuid() {
+ return uuid;
+ }
+
+ /**
+ * Gets the invariant UUID.
+ *
+ * @return the invariant UUID
+ */
+ public String getInvariantUUID() {
+ return invariantUUID;
+ }
+
+ /**
+ * Gets the name.
+ *
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Gets the description.
+ *
+ * @return the description
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * Gets the version.
+ *
+ * @return the version
+ */
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ * Gets the tosca model URL.
+ *
+ * @return the tosca model URL
+ */
+ public String getToscaModelURL() {
+ return toscaModelURL;
+ }
+
+ /**
+ * Gets the category.
+ *
+ * @return the category
+ */
+ public String getCategory() {
+ return category;
+ }
+
+ /**
+ * Gets the sub category.
+ *
+ * @return the sub category
+ */
+ public String getSubCategory() {
+ return subCategory;
+ }
+
+ /**
+ * Gets the resource type.
+ *
+ * @return the resource type
+ */
+ public Resource.Type getResourceType() {
+ return resourceType;
+ }
+
+ /**
+ * Gets the lifecycle state.
+ *
+ * @return the lifecycle state
+ */
+ public Resource.LifecycleState getLifecycleState() {
+ return lifecycleState;
+ }
+
+ /**
+ * Gets the last updater user ID.
+ *
+ * @return the last updater user ID
+ */
+ public String getLastUpdaterUserId() {
+ return lastUpdaterUserId;
+ }
+
+ /**
+ * Gets the last updater full name.
+ *
+ * @return the last updater full name
+ */
+ public String getLastUpdaterFullName() {
+ return lastUpdaterFullName;
+ }
+
+ /**
+ * Gets the tosca model.
+ *
+ * @return the tosca model
+ */
+ public String getToscaModel() {
+ return toscaModel;
+ }
+
+ /**
+ * Gets the tosca resource name.
+ *
+ * @return the tosca resource name
+ */
+ public String getToscaResourceName() {
+ return toscaResourceName;
+ }
+
+ /**
+ * Gets the artifacts.
+ *
+ * @return the artifacts
+ */
+ public Collection<Artifact> getArtifacts() {
+ return artifacts;
+ }
+
+ /**
+ * Gets the resources.
+ *
+ * @return the resources
+ */
+ public Collection<SubResource> getResources() {
+ return resources;
+ }
+
+ /**
+ * Sets the uuid.
+ *
+ * @param uuid the new uuid
+ */
+ public void setUuid(String uuid) {
+ this.uuid = uuid;
+ }
+
+ /**
+ * Sets the invariant UUID.
+ *
+ * @param invariantUUID the new invariant UUID
+ */
+ public void setInvariantUUID(String invariantUUID) {
+ this.invariantUUID = invariantUUID;
+ }
+
+ /**
+ * Sets the name.
+ *
+ * @param name the new name
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+ /**
+ * Sets the description.
+ *
+ * @param name the new description
+ */
+ public void setDescription(String description) {
+ this.description = description;
+ }
+ /**
+ * Sets the version.
+ *
+ * @param version the new version
+ */
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ /**
+ * Sets the tosca model URL.
+ *
+ * @param toscaModelURL the new tosca model URL
+ */
+ public void setToscaModelURL(String toscaModelURL) {
+ this.toscaModelURL = toscaModelURL;
+ }
+
+ /**
+ * Sets the category.
+ *
+ * @param category the new category
+ */
+ public void setCategory(String category) {
+ this.category = category;
+ }
+
+ /**
+ * Sets the sub category.
+ *
+ * @param subCategory the new sub category
+ */
+ public void setSubCategory(String subCategory) {
+ this.subCategory = subCategory;
+ }
+
+ /**
+ * Sets the resource type.
+ *
+ * @param resourceType the new resource type
+ */
+ public void setResourceType(Resource.Type resourceType) {
+ this.resourceType = resourceType;
+ }
+
+ /**
+ * Sets the lifecycle state.
+ *
+ * @param lifecycleState the new lifecycle state
+ */
+ public void setLifecycleState(Resource.LifecycleState lifecycleState) {
+ this.lifecycleState = lifecycleState;
+ }
+
+ /**
+ * Sets the last updater user ID.
+ *
+ * @param lastUpdaterUserId the new last updater user ID
+ */
+ public void setLastUpdaterUserId(String lastUpdaterUserId) {
+ this.lastUpdaterUserId = lastUpdaterUserId;
+ }
+
+ /**
+ * Sets the last updater full name.
+ *
+ * @param lastUpdaterFullName the new last updater full name
+ */
+ public void setLastUpdaterFullName(String lastUpdaterFullName) {
+ this.lastUpdaterFullName = lastUpdaterFullName;
+ }
+
+ /**
+ * Sets the tosca model.
+ *
+ * @param toscaModel the new tosca model
+ */
+ public void setToscaModel(String toscaModel) {
+ this.toscaModel = toscaModel;
+ }
+
+ /**
+ * Sets the tosca resource name.
+ *
+ * @param toscaResourceName the new tosca resource name
+ */
+ public void setToscaResourceName(String toscaResourceName) {
+ this.toscaResourceName = toscaResourceName;
+ }
+
+ /**
+ * Sets the artifacts.
+ *
+ * @param artifacts the new artifacts
+ */
+ public void setArtifacts(Collection<Artifact> artifacts) {
+ this.artifacts = artifacts;
+ }
+
+ /**
+ * Sets the resources.
+ *
+ * @param resources the new resources
+ */
+ public void setResources(Collection<SubResource> resources) {
+ this.resources = resources;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode() {
+ final UUID uuid = UUID.fromString(getUuid());
+
+ return uuid.hashCode();
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object o) {
+ if (o == this) return true;
+ if (!(o instanceof Resource)) return false;
+
+ final Resource resource = (Resource) o;
+
+ return (resource.getUuid().equals(getUuid()));
+ }
+}
diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/Service.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/Service.java
new file mode 100755
index 000000000..fa898e56a
--- /dev/null
+++ b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/Service.java
@@ -0,0 +1,351 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.vid.asdc.beans;
+
+import java.util.Collection;
+import java.util.UUID;
+/**
+ * The Class Service.
+ */
+public class Service {
+
+ /**
+ * The Enum DistributionStatus.
+ */
+ public enum DistributionStatus {
+
+ /** The distribution not approved. */
+ DISTRIBUTION_NOT_APPROVED,
+
+ /** The distribution approved. */
+ DISTRIBUTION_APPROVED,
+
+ /** The distributed. */
+ DISTRIBUTED,
+
+ /** The distribution rejected. */
+ DISTRIBUTION_REJECTED
+ }
+
+ /**
+ * The Enum LifecycleState.
+ */
+ public enum LifecycleState {
+
+ /** The not certified checkout. */
+ NOT_CERTIFIED_CHECKOUT,
+
+ /** The not certified checkin. */
+ NOT_CERTIFIED_CHECKIN,
+
+ /** The ready for certification. */
+ READY_FOR_CERTIFICATION,
+
+ /** The certification in progress. */
+ CERTIFICATION_IN_PROGRESS,
+
+ /** The certified. */
+ CERTIFIED
+ }
+
+ /** The uuid. */
+ private String uuid;
+
+ /** The invariant UUID. */
+ private String invariantUUID;
+
+ /** The name. */
+ private String name;
+
+ /** The version. */
+ private String version;
+
+ /** The tosca model URL. */
+ private String toscaModelURL;
+
+ /** The category. */
+ private String category;
+
+ /** The lifecycle state. */
+ private Service.LifecycleState lifecycleState;
+
+ /** The last updater user uid. */
+ private String lastUpdaterUserId;
+
+ /** The last updater full name. */
+ private String lastUpdaterFullName;
+
+ /** The distribution status. */
+ private Service.DistributionStatus distributionStatus;
+
+ /** The artifacts. */
+ private Collection<Artifact> artifacts;
+
+ /** The resources. */
+ private Collection<SubResource> resources;
+
+ /**
+ * Gets the uuid.
+ *
+ * @return the uuid
+ */
+ public String getUuid() {
+ return uuid;
+ }
+
+ /**
+ * Gets the invariant UUID.
+ *
+ * @return the invariant UUID
+ */
+ public String getInvariantUUID() {
+ return invariantUUID;
+ }
+
+ /**
+ * Gets the name.
+ *
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Gets the version.
+ *
+ * @return the version
+ */
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ * Gets the tosca model URL.
+ *
+ * @return the tosca model URL
+ */
+ public String getToscaModelURL() {
+ return toscaModelURL;
+ }
+
+ /**
+ * Gets the category.
+ *
+ * @return the category
+ */
+ public String getCategory() {
+ return category;
+ }
+
+ /**
+ * Gets the lifecycle state.
+ *
+ * @return the lifecycle state
+ */
+ public Service.LifecycleState getLifecycleState() {
+ return lifecycleState;
+ }
+
+ /**
+ * Gets the last updater user uid.
+ *
+ * @return the last updater user uid
+ */
+ public String getLastUpdaterUserId() {
+ return lastUpdaterUserId;
+ }
+
+ /**
+ * Gets the last updater full name.
+ *
+ * @return the last updater full name
+ */
+ public String getLastUpdaterFullName() {
+ return lastUpdaterFullName;
+ }
+
+ /**
+ * Gets the distribution status.
+ *
+ * @return the distribution status
+ */
+ public Service.DistributionStatus getDistributionStatus() {
+ return distributionStatus;
+ }
+
+ /**
+ * Gets the artifacts.
+ *
+ * @return the artifacts
+ */
+ public Collection<Artifact> getArtifacts() {
+ return artifacts;
+ }
+
+ /**
+ * Gets the resources.
+ *
+ * @return the resources
+ */
+ public Collection<SubResource> getResources() {
+ return resources;
+ }
+
+ /**
+ * Sets the uuid.
+ *
+ * @param uuid the new uuid
+ */
+ public void setUuid(String uuid) {
+ this.uuid = uuid;
+ }
+
+ /**
+ * Sets the invariant UUID.
+ *
+ * @param invariantUUID the new invariant UUID
+ */
+ public void setInvariantUUID(String invariantUUID) {
+ this.invariantUUID = invariantUUID;
+ }
+
+ /**
+ * Sets the name.
+ *
+ * @param name the new name
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * Sets the version.
+ *
+ * @param version the new version
+ */
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ /**
+ * Sets the tosca model URL.
+ *
+ * @param toscaModelURL the new tosca model URL
+ */
+ public void setToscaModelURL(String toscaModelURL) {
+ this.toscaModelURL = toscaModelURL;
+ }
+
+ /**
+ * Sets the category.
+ *
+ * @param category the new category
+ */
+ public void setCategory(String category) {
+ this.category = category;
+ }
+
+ /**
+ * Sets the lifecycle state.
+ *
+ * @param lifecycleState the new lifecycle state
+ */
+ public void setLifecycleState(Service.LifecycleState lifecycleState) {
+ this.lifecycleState = lifecycleState;
+ }
+
+ /**
+ * Sets the last updater user uid.
+ *
+ * @param lastUpdaterUserId the new last updater user uid
+ */
+ public void set(String lastUpdaterUserId) {
+ this.lastUpdaterUserId = lastUpdaterUserId;
+ }
+
+ /**
+ * Sets the last updater full name.
+ *
+ * @param lastUpdaterFullName the new last updater full name
+ */
+ public void setLastUpdaterFullName(String lastUpdaterFullName) {
+ this.lastUpdaterFullName = lastUpdaterFullName;
+ }
+
+ /**
+ * Sets the distribution status.
+ *
+ * @param distributionStatus the new distribution status
+ */
+ public void setDistributionStatus(Service.DistributionStatus distributionStatus) {
+ this.distributionStatus = distributionStatus;
+ }
+
+ /**
+ * Sets the artifacts.
+ *
+ * @param artifacts the new artifacts
+ */
+ public void setArtifacts(Collection<Artifact> artifacts) {
+ this.artifacts = artifacts;
+ }
+
+ /**
+ * Sets the resources.
+ *
+ * @param resources the new resources
+ */
+ public void setResources(Collection<SubResource> resources) {
+ this.resources = resources;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+ return uuid;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode() {
+ final UUID uuid = UUID.fromString(getUuid());
+
+ return uuid.hashCode();
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object o) {
+ if (o == this) return true;
+ if (!(o instanceof Service)) return false;
+
+ final Service service = (Service) o;
+
+ return (service.getUuid().equals(getUuid()));
+ }
+}
diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/SubResource.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/SubResource.java
new file mode 100755
index 000000000..6d7fb41b1
--- /dev/null
+++ b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/SubResource.java
@@ -0,0 +1,175 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.vid.asdc.beans;
+
+import java.util.Collection;
+/**
+ * The Class SubResource.
+ */
+public class SubResource {
+
+ /** The resource instance name. */
+ private String resourceInstanceName;
+
+ /** The resource name. */
+ private String resourceName;
+
+ /** The resource invariant UUID. */
+ private String resourceInvariantUUID;
+
+ /** The resource version. */
+ private String resourceVersion;
+
+ /** The resource type. */
+ private String resourceType;
+
+ /** The resource UUID. */
+ private String resourceUUID;
+
+ /** The artifacts. */
+ private Collection<Artifact> artifacts;
+
+ /**
+ * Gets the resource instance name.
+ *
+ * @return the resource instance name
+ */
+ public String getResourceInstanceName() {
+ return resourceInstanceName;
+ }
+
+ /**
+ * Gets the resource name.
+ *
+ * @return the resource name
+ */
+ public String getResourceName() {
+ return resourceName;
+ }
+
+ /**
+ * Gets the resource invariant UUID.
+ *
+ * @return the resource invariant UUID
+ */
+ public String getResourceInvariantUUID() {
+ return resourceInvariantUUID;
+ }
+
+ /**
+ * Gets the resource version.
+ *
+ * @return the resource version
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Gets the resoucre type.
+ *
+ * @return the resoucre type
+ */
+ public String getResoucreType() {
+ return resourceType;
+ }
+
+ /**
+ * Gets the resource UUID.
+ *
+ * @return the resource UUID
+ */
+ public String getResourceUUID() {
+ return resourceUUID;
+ }
+
+ /**
+ * Gets the artifacts.
+ *
+ * @return the artifacts
+ */
+ public Collection<Artifact> getArtifacts() {
+ return artifacts;
+ }
+
+ /**
+ * Sets the resource instance name.
+ *
+ * @param resourceInstanceName the new resource instance name
+ */
+ public void setResourceInstanceName(String resourceInstanceName) {
+ this.resourceInstanceName = resourceInstanceName;
+ }
+
+ /**
+ * Sets the resource name.
+ *
+ * @param resourceName the new resource name
+ */
+ public void setResourceName(String resourceName) {
+ this.resourceName = resourceName;
+ }
+
+ /**
+ * Sets the resource invariant UUID.
+ *
+ * @param resourceInvariantUUID the new resource invariant UUID
+ */
+ public void setResourceInvariantUUID(String resourceInvariantUUID) {
+ this.resourceInvariantUUID = resourceInvariantUUID;
+ }
+
+ /**
+ * Sets the resource version.
+ *
+ * @param resourceVersion the new resource version
+ */
+ public void setResourceVersion(String resourceVersion) {
+ this.resourceVersion = resourceVersion;
+ }
+
+ /**
+ * Sets the resoucre type.
+ *
+ * @param resourceType the new resoucre type
+ */
+ public void setResoucreType(String resourceType) {
+ this.resourceType = resourceType;
+ }
+
+ /**
+ * Sets the resource UUID.
+ *
+ * @param resourceUUID the new resource UUID
+ */
+ public void setResourceUUID(String resourceUUID) {
+ this.resourceUUID = resourceUUID;
+ }
+
+ /**
+ * Sets the artifacts.
+ *
+ * @param artifacts the new artifacts
+ */
+ public void setArtifacts(Collection<Artifact> artifacts) {
+ this.artifacts = artifacts;
+ }
+}
diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Capability.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Capability.java
new file mode 100755
index 000000000..21a50d3bb
--- /dev/null
+++ b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Capability.java
@@ -0,0 +1,140 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.vid.asdc.beans.tosca;
+
+import java.util.Collection;
+import java.util.Map;
+
+/**
+ * The Class Capability.
+ */
+public class Capability {
+
+ /** The type. */
+ private String type; //FIXME: Make an enumeration?
+
+ /** The description. */
+ private String description;
+
+ /** The occurrences. */
+ private Collection<String> occurrences; //FIXME: Make an enumeration?
+
+ /** The properties. */
+ private Map<String, Property> properties;
+
+ /** The valid source types. */
+ private Collection<String> valid_source_types; //FIXME: Make an enumeration?
+
+ /**
+ * Instantiates a new capability.
+ */
+ public Capability() {}
+
+ /**
+ * Gets the type.
+ *
+ * @return the type
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * Gets the description.
+ *
+ * @return the description
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * Gets the occurrences.
+ *
+ * @return the occurrences
+ */
+ public Collection<String> getOccurrences() {
+ return occurrences;
+ }
+
+ /**
+ * Gets the properties.
+ *
+ * @return the properties
+ */
+ public Map<String, Property> getProperties() {
+ return properties;
+ }
+
+ /**
+ * Gets the valid source types.
+ *
+ * @return the valid source types
+ */
+ public Collection<String> getValid_source_types() {
+ return valid_source_types;
+ }
+
+ /**
+ * Sets the type.
+ *
+ * @param type the new type
+ */
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ * Sets the description.
+ *
+ * @param description the new description
+ */
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ /**
+ * Sets the occurrences.
+ *
+ * @param occurrences the new occurrences
+ */
+ public void setOccurrences(Collection<String> occurrences) {
+ this.occurrences = occurrences;
+ }
+
+ /**
+ * Sets the properties.
+ *
+ * @param properties the properties
+ */
+ public void setProperties(Map<String, Property> properties) {
+ this.properties = properties;
+ }
+
+ /**
+ * Sets the valid source types.
+ *
+ * @param valid_source_types the new valid source types
+ */
+ public void setValid_source_types(Collection<String> valid_source_types) {
+ this.valid_source_types = valid_source_types;
+ }
+}
diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Constraint.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Constraint.java
new file mode 100755
index 000000000..b68b51a09
--- /dev/null
+++ b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Constraint.java
@@ -0,0 +1,199 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.vid.asdc.beans.tosca;
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * The Class Constraint.
+ */
+
+public class Constraint {
+ private List<Object> valid_values;
+ private Object equal;
+ private Object greater_than;
+ private Object greater_or_equal;
+ private Object less_than;
+ private Object less_or_equal;
+ private List<Object> in_range;
+ private Object length;
+ private Object min_length;
+ private Object max_length;
+
+ /**
+ * Instantiates a new Constraint.
+ */
+ public Constraint() {
+ valid_values = new ArrayList<Object>();
+ in_range = new ArrayList<Object>();
+ }
+
+ /**
+ * Gets the valid_values.
+ *
+ * @return the valid_values
+ */
+ public List<Object> getvalid_values() {
+ return valid_values;
+ }
+ /**
+ * Gets equal.
+ *
+ * @return equal
+ */
+ public Object getEqual() {
+ return equal;
+ }
+ /**
+ * Gets greater_than.
+ *
+ * @return greater_than
+ */
+ public Object getGreater_than() {
+ return greater_than;
+ }
+ /**
+ * Gets greater_or_equal.
+ *
+ * @return greater_or_equal
+ */
+ public Object getGreater_or_equal() {
+ return greater_or_equal;
+ }
+ /**
+ * Gets less_than.
+ *
+ * @return less_than
+ */
+ public Object getLess_than() {
+ return less_than;
+ }
+ /**
+ * Gets less_or_equal.
+ *
+ * @return less_or_equal
+ */
+ public Object getLess_or_equal() {
+ return less_or_equal;
+ }
+ /**
+ * Gets in_range.
+ *
+ * @return in_range
+ */
+ public List<Object> getIn_range() {
+ return in_range;
+ }
+ /**
+ * Gets length.
+ *
+ * @return length
+ */
+ public Object getLength() {
+ return length;
+ }
+ /**
+ * Gets min_length.
+ *
+ * @return min_length
+ */
+ public Object getMin_length() {
+ return min_length;
+ }
+ /**
+ * Gets max_length.
+ *
+ * @return max_length
+ */
+ public Object getMax_length() {
+ return max_length;
+ }
+ /**
+ * Sets the valid_values.
+ *
+ * @param op the new valid_values
+ */
+ public void setvalid_values(List<Object> vlist) {
+ this.valid_values = vlist;
+ }
+ /**
+ * Sets equal.
+ *
+ * @param e the new equal
+ */
+ public void setEqual(Object e) {
+ this.equal = e;
+ }
+ /**
+ * Sets greater_than.
+ *
+ * @param e the new greater_than
+ */
+ public void setGreater_than(Object e) {
+ this.greater_than = e;
+ }
+ /**
+ * Sets less_than.
+ *
+ * @param e the new less_than
+ */
+ public void setLess_than(Object e) {
+ this.less_than = e;
+ }
+ /**
+ * Sets in_range.
+ *
+ * @param e the new in_range
+ */
+ public void setIn_range(List<Object> e) {
+ this.in_range = e;
+ }
+ /**
+ * Sets length.
+ *
+ * @param e the length
+ */
+ public void setLength(Object e) {
+ this.length = e;
+ }
+ /**
+ * Sets min_length.
+ *
+ * @param e the min_length
+ */
+ public void setMin_length(Object e) {
+ this.min_length = e;
+ }
+ /**
+ * Sets max_length.
+ *
+ * @param e the max_length
+ */
+ public void setMax_length(Object e) {
+ this.max_length = e;
+ }
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+ return "valid_values=" + valid_values;
+ }
+}
diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Group.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Group.java
new file mode 100755
index 000000000..275db3c0d
--- /dev/null
+++ b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Group.java
@@ -0,0 +1,135 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.vid.asdc.beans.tosca;
+
+import java.util.Collection;
+import java.util.Map;
+
+/**
+ * The Class Group.
+ */
+public class Group {
+
+ /** The type. */
+ private String type;
+
+ /** The members. */
+ private Collection<String> members;
+
+ /** The metadata. */
+ private ToscaMetadata metadata;
+
+ /** The vf module type. */
+ private String vf_module_type;
+
+ /** The properties. */
+ private Map<String, Object> properties;
+
+ /**
+ * Gets the metadata.
+ *
+ * @return the metadata
+ */
+ public ToscaMetadata getMetadata() {
+ return metadata;
+ }
+
+ /**
+ * Sets the metadata.
+ *
+ * @param metadata the new metadata
+ */
+ public void setMetadata(ToscaMetadata metadata) {
+ this.metadata = metadata;
+ }
+
+ /**
+ * Gets the members.
+ *
+ * @return the members
+ */
+ public Collection<String> getMembers() {
+ return members;
+ }
+
+ /**
+ * Sets the members.
+ *
+ * @param members the new members
+ */
+ public void setMembers(Collection<String> members) {
+ this.members = members;
+ }
+
+ /**
+ * Gets the type.
+ *
+ * @return the type
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * Sets the type.
+ *
+ * @param type the new type
+ */
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ * Gets the vf module type.
+ *
+ * @return the vf module type
+ */
+ public String getvf_module_type() {
+ return vf_module_type;
+ }
+
+ /**
+ * Sets the vf module type.
+ *
+ * @param vf_module_type the new vf module type
+ */
+ public void setvf_module_type(String vf_module_type) {
+ this.vf_module_type = vf_module_type;
+ }
+
+ /**
+ * Gets the properties.
+ *
+ * @return the properties
+ */
+ public Map<String, Object> getProperties() {
+ return properties;
+ }
+
+ /**
+ * Sets the properties.
+ *
+ * @param properties the properties
+ */
+ public void setProperties(Map<String, Object> properties) {
+ this.properties = properties;
+ }
+}
diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Import.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Import.java
new file mode 100755
index 000000000..33f317579
--- /dev/null
+++ b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Import.java
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.vid.asdc.beans.tosca;
+
+/**
+ * The Class Import.
+ */
+public class Import {
+
+ /** The file. */
+ private String file;
+
+ /**
+ * Gets the file.
+ *
+ * @return the file
+ */
+ public String getFile() {
+ return file;
+ }
+
+ /**
+ * Sets the file.
+ *
+ * @param file the new file
+ */
+ public void setFile(String file) {
+ this.file = file;
+ }
+}
diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Input.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Input.java
new file mode 100755
index 000000000..f98820716
--- /dev/null
+++ b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Input.java
@@ -0,0 +1,166 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.vid.asdc.beans.tosca;
+
+import java.util.List;
+import java.util.ArrayList;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class Input.
+ */
+public class Input {
+
+ /** The type. */
+ private String type;
+
+ /** The description. */
+ private String description;
+
+ /** The default. */
+ private Object _default;
+
+ /** The entry schema. */
+ private Input entry_schema;
+
+ /** The constraints */
+ private List<Constraint> constraints;
+
+ /** The required field. If not set, the default is true */
+ private boolean required = true;
+
+ /**
+ * Instantiates a new input.
+ */
+ public Input() {
+ constraints = new ArrayList<Constraint>();
+ }
+
+ /**
+ * Gets the type.
+ *
+ * @return the type
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * Sets the type.
+ *
+ * @param type the new type
+ */
+ public void setType(String type) {
+ this.type = type;
+ }
+ /**
+ * Gets the required field.
+ *
+ * @return the required field
+ */
+ public boolean getRequired() {
+ return required;
+ }
+ /**
+ * Sets the required value.
+ *
+ * @param required the new required value
+ */
+ public void setRequired(boolean required) {
+ this.required = required;
+ }
+ /**
+ * Gets the description.
+ *
+ * @return the description
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * Sets the description.
+ *
+ * @param description the new description
+ */
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ /**
+ * Gets the default.
+ *
+ * @return the default
+ */
+ public Object getDefault() {
+ return _default;
+ }
+
+ /**
+ * Sets the default.
+ *
+ * @param _default the new default
+ */
+ public void setDefault(Object _default) {
+ this._default = _default;
+ }
+
+ /**
+ * Gets the entry schema.
+ *
+ * @return the entry schema
+ */
+ public Input getentry_schema() {
+ return entry_schema;
+ }
+ /**
+ * Sets the entry schema.
+ *
+ * @param the entry schema
+ */
+ public void setentry_schema(Input s) {
+ this.entry_schema = s;
+ }
+ /**
+ * Sets the constraints.
+ *
+ * @param c the new constraints
+ */
+ public void setConstraints(List<Constraint> c) {
+ this.constraints = c;
+ }
+ /**
+ * Gets the constraints
+ *
+ * @return the constraints
+ */
+ public List<Constraint> getConstraints() {
+ return constraints;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+ return "type=" + type + ",description=" + description + ",default=" + _default;
+ }
+}
diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/NodeTemplate.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/NodeTemplate.java
new file mode 100755
index 000000000..73eead93f
--- /dev/null
+++ b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/NodeTemplate.java
@@ -0,0 +1,117 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.vid.asdc.beans.tosca;
+
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * The Class NodeTemplate.
+ */
+public class NodeTemplate {
+
+ /** The type. */
+ private String type;
+
+ /** The metadata. */
+ private ToscaMetadata metadata;
+
+ /** The properties. */
+ private Map<String, Object> properties; //HEAT?
+
+ /** The requirements. */
+ private Object requirements;
+
+ public NodeTemplate () {
+ properties = new HashMap<String,Object>();
+ }
+ /**
+ * Gets the type.
+ *
+ * @return the type
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * Sets the type.
+ *
+ * @param type the new type
+ */
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ * Gets the metadata.
+ *
+ * @return the metadata
+ */
+ public ToscaMetadata getMetadata() {
+ return metadata;
+ }
+
+ /**
+ * Sets the metadata.
+ *
+ * @param metadata the new metadata
+ */
+ public void setMetadata(ToscaMetadata metadata) {
+ this.metadata = metadata;
+ }
+
+ /**
+ * Gets the properties.
+ *
+ * @return the properties
+ */
+ public Map<String, Object> getProperties() {
+ return properties;
+ }
+
+ /**
+ * Sets the properties.
+ *
+ * @param properties the properties
+ */
+ public void setProperties(Map<String, Object> properties) {
+ this.properties = properties;
+ }
+
+ /**
+ * Gets the requirements.
+ *
+ * @return the requirements
+ */
+ public Object getRequirements() {
+ return requirements;
+ }
+
+ /**
+ * Sets the requirements.
+ *
+ * @param requirements the new requirements
+ */
+ public void setRequirements(Object requirements) {
+ this.requirements = requirements;
+ }
+}
diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Property.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Property.java
new file mode 100755
index 000000000..c8f048ced
--- /dev/null
+++ b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Property.java
@@ -0,0 +1,157 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.vid.asdc.beans.tosca;
+
+/**
+ * The Class Property.
+ */
+public class Property {
+
+ /** The type. */
+ private String type;
+
+ /** The description. */
+ private String description;
+
+ /** The entry schema. */
+ private Schema entry_schema;
+
+ /** The default. */
+ private String _default;
+
+ /** The required. */
+ private boolean required;
+
+ /**
+ * Instantiates a new property.
+ */
+ private Property() {}
+
+ /**
+ * Gets the type.
+ *
+ * @return the type
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * Gets the description.
+ *
+ * @return the description
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * Gets the entry schema.
+ *
+ * @return the entry schema
+ */
+ public Schema getEntry_schema() {
+ return entry_schema;
+ }
+
+ /**
+ * Gets the default.
+ *
+ * @return the default
+ */
+ public String get_default() {
+ return _default;
+ }
+
+ /**
+ * Sets the type.
+ *
+ * @param type the new type
+ */
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ * Sets the description.
+ *
+ * @param description the new description
+ */
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ /**
+ * Sets the entry schema.
+ *
+ * @param entry_schema the new entry schema
+ */
+ public void setEntry_schema(Schema entry_schema) {
+ this.entry_schema = entry_schema;
+ }
+
+ /**
+ * Sets the default.
+ *
+ * @param _default the new default
+ */
+ public void set_default(String _default) {
+ this._default = _default;
+ }
+
+ /**
+ * Gets the default.
+ *
+ * @return the default
+ */
+ public String getDefault() {
+ return _default;
+ }
+
+ /**
+ * Checks if is required.
+ *
+ * @return true, if is required
+ */
+ public boolean isRequired() {
+ return required;
+ }
+
+ /**
+ * Sets the default.
+ *
+ * @param _default the new default
+ */
+ public void setDefault(String _default) {
+ this._default = _default;
+ }
+
+ /**
+ * Sets the required.
+ *
+ * @param required the new required
+ */
+ public void setRequired(boolean required) {
+ this.required = required;
+ }
+
+
+}
diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Requirement.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Requirement.java
new file mode 100755
index 000000000..fce41ec6e
--- /dev/null
+++ b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Requirement.java
@@ -0,0 +1,120 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.vid.asdc.beans.tosca;
+
+import java.util.Collection;
+
+/**
+ * The Class Requirement.
+ */
+public class Requirement {
+
+ /** The occurrences. */
+ private Collection<String> occurrences;
+
+ /** The capability. */
+ private String capability;
+
+ /** The node. */
+ private String node;
+
+ /** The relationship. */
+ private String relationship;
+
+ /**
+ * Instantiates a new requirement.
+ */
+ private Requirement() {}
+
+ /**
+ * Gets the occurrences.
+ *
+ * @return the occurrences
+ */
+ public Collection<String> getOccurrences() {
+ return occurrences;
+ }
+
+ /**
+ * Gets the capability.
+ *
+ * @return the capability
+ */
+ public String getCapability() {
+ return capability;
+ }
+
+ /**
+ * Gets the node.
+ *
+ * @return the node
+ */
+ public String getNode() {
+ return node;
+ }
+
+ /**
+ * Gets the relationship.
+ *
+ * @return the relationship
+ */
+ public String getRelationship() {
+ return relationship;
+ }
+
+ /**
+ * Sets the occurrences.
+ *
+ * @param occurrences the new occurrences
+ */
+ public void setOccurrences(Collection<String> occurrences) {
+ this.occurrences = occurrences;
+ }
+
+ /**
+ * Sets the capability.
+ *
+ * @param capability the new capability
+ */
+ public void setCapability(String capability) {
+ this.capability = capability;
+ }
+
+ /**
+ * Sets the node.
+ *
+ * @param node the new node
+ */
+ public void setNode(String node) {
+ this.node = node;
+ }
+
+ /**
+ * Sets the relationship.
+ *
+ * @param relationship the new relationship
+ */
+ public void setRelationship(String relationship) {
+ this.relationship = relationship;
+ }
+
+
+}
diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Schema.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Schema.java
new file mode 100755
index 000000000..bd3a2f0a5
--- /dev/null
+++ b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Schema.java
@@ -0,0 +1,53 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.vid.asdc.beans.tosca;
+
+/**
+ * The Class Schema.
+ */
+public class Schema {
+
+ /** The type. */
+ public String type;
+
+ /**
+ * Instantiates a new schema.
+ */
+ public Schema() {}
+
+ /**
+ * Gets the type.
+ *
+ * @return the type
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * Sets the type.
+ *
+ * @param type the new type
+ */
+ public void setType(String type) {
+ this.type = type;
+ }
+}
diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/SubstitutionMappings.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/SubstitutionMappings.java
new file mode 100755
index 000000000..026f29bbe
--- /dev/null
+++ b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/SubstitutionMappings.java
@@ -0,0 +1,101 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.vid.asdc.beans.tosca;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * The Class SubstitutionMappings.
+ */
+public class SubstitutionMappings {
+
+ /** The node type. */
+ private String node_type;
+
+ /** The capabilities. */
+ private Map<String, Object> capabilities;
+
+ /** The requirements. */
+ private Map<String, Object> requirements;
+
+ /**
+ * Instantiates a new substitution mappings.
+ */
+ public SubstitutionMappings() {
+ capabilities = new HashMap<String, Object> ();
+ requirements = new HashMap<String, Object> ();
+ }
+
+ /**
+ * Gets the node type.
+ *
+ * @return the node type
+ */
+ public String getnode_type() {
+ return node_type;
+ }
+
+ /**
+ * Sets the node type.
+ *
+ * @param node_type the new node type
+ */
+ public void setnode_type(String node_type) {
+ this.node_type = node_type;
+ }
+
+ /**
+ * Gets the capabilities.
+ *
+ * @return the capabilities
+ */
+ public Map<String, Object> getCapabilities() {
+ return capabilities;
+ }
+
+ /**
+ * Sets the capabilities.
+ *
+ * @param capabilities the capabilities
+ */
+ public void setCapabilities(Map<String, Object> capabilities) {
+ this.capabilities = capabilities;
+ }
+
+ /**
+ * Gets the requirements.
+ *
+ * @return the requirements
+ */
+ public Map<String, Object> getRequirements() {
+ return requirements;
+ }
+
+ /**
+ * Sets the requirements.
+ *
+ * @param requirements the requirements
+ */
+ public void setRequirements(Map<String, Object> requirements) {
+ this.requirements = requirements;
+ }
+}
diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/TopologyTemplate.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/TopologyTemplate.java
new file mode 100755
index 000000000..ce7ce5755
--- /dev/null
+++ b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/TopologyTemplate.java
@@ -0,0 +1,124 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.vid.asdc.beans.tosca;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * The Class TopologyTemplate.
+ */
+public class TopologyTemplate {
+
+ /** The substitution mappings. */
+ private SubstitutionMappings substitution_mappings;
+
+ /** The inputs. */
+ private Map<String, Input> inputs;
+
+ /** The node templates. */
+ private Map<String, NodeTemplate> node_templates;
+
+ /** The groups. */
+ private Map<String, Group> groups;
+
+ /**
+ * Instantiates a new topology template.
+ */
+ public TopologyTemplate() {
+ substitution_mappings = new SubstitutionMappings();
+ inputs = new HashMap<String, Input> ();
+ node_templates = new HashMap<String, NodeTemplate> ();
+ groups = new HashMap<String, Group> ();
+ }
+
+ /**
+ * Gets the substitution mappings.
+ *
+ * @return the substitution mappings
+ */
+ public SubstitutionMappings getsubstitution_mappings() {
+ return this.substitution_mappings;
+ }
+
+ /**
+ * Sets the substitution mappings.
+ *
+ * @param substitution_mappings the new substitution mappings
+ */
+ public void setsubstitution_mappings(SubstitutionMappings substitution_mappings) {
+ this.substitution_mappings = substitution_mappings;
+ }
+
+ /**
+ * Gets the inputs.
+ *
+ * @return the inputs
+ */
+ public Map<String, Input> getInputs() {
+ return inputs;
+ }
+
+ /**
+ * Sets the inputs.
+ *
+ * @param inputs the inputs
+ */
+ public void setInputs(Map<String, Input> inputs) {
+ this.inputs = inputs;
+ }
+
+ /**
+ * Gets the node templates.
+ *
+ * @return the node templates
+ */
+ public Map<String, NodeTemplate> getnode_templates() {
+ return node_templates;
+ }
+
+ /**
+ * Setnode templates.
+ *
+ * @param node_templates the node templates
+ */
+ public void setnode_templates(Map<String, NodeTemplate> node_templates) {
+ this.node_templates = node_templates;
+ }
+
+ /**
+ * Gets the groups.
+ *
+ * @return the groups
+ */
+ public Map<String, Group> getGroups() {
+ return groups;
+ }
+
+ /**
+ * Sets the groups.
+ *
+ * @param groups the groups
+ */
+ public void setGroups(Map<String, Group> groups) {
+ this.groups = groups;
+ }
+}
diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaCsar.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaCsar.java
new file mode 100755
index 000000000..cca4ae7c2
--- /dev/null
+++ b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaCsar.java
@@ -0,0 +1,101 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.vid.asdc.beans.tosca;
+
+import java.util.Collection;
+import java.util.LinkedList;
+
+/**
+ * The Class ToscaCsar.
+ */
+public class ToscaCsar {
+
+ /** The parent. */
+ private final ToscaModel parent;
+
+ /** The children. */
+ private final Collection<ToscaModel> children;
+
+ /**
+ * The Class Builder.
+ */
+ public static class Builder {
+
+ /** The parent. */
+ private final ToscaModel parent;
+
+ /** The children. */
+ private Collection<ToscaModel> children = new LinkedList<ToscaModel> ();
+
+ /**
+ * Instantiates a new builder.
+ *
+ * @param parent the parent
+ */
+ public Builder(ToscaModel parent) {
+ this.parent = parent;
+ }
+
+ /**
+ * Adds the vnf.
+ *
+ * @param child the child
+ * @return the builder
+ */
+ public Builder addVnf(ToscaModel child) {
+ children.add(child);
+ return this;
+ }
+
+ /**
+ * Builds the.
+ *
+ * @return the tosca csar
+ */
+ public ToscaCsar build() {
+ return new ToscaCsar(this);
+ }
+ }
+
+ /**
+ * Instantiates a new tosca csar.
+ *
+ * @param builder the builder
+ */
+ public ToscaCsar(Builder builder) {
+ this.parent = builder.parent;
+ this.children = builder.children;
+ }
+
+ /**
+ * Gets the parent.
+ *
+ * @return the parent
+ */
+ public ToscaModel getParent() { return parent; }
+
+ /**
+ * Gets the children.
+ *
+ * @return the children
+ */
+ public Collection<ToscaModel> getChildren() { return children; }
+}
diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaMeta.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaMeta.java
new file mode 100755
index 000000000..66938372e
--- /dev/null
+++ b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaMeta.java
@@ -0,0 +1,122 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.vid.asdc.beans.tosca;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.openecomp.vid.asdc.AsdcCatalogException;
+
+/**
+ * The Class ToscaMeta.
+ */
+public class ToscaMeta {
+
+ /** The metadata. */
+ private final Map<String, String> metadata;
+
+ /**
+ * Instantiates a new tosca meta.
+ *
+ * @param builder the builder
+ * @throws IOException Signals that an I/O exception has occurred.
+ * @throws AsdcCatalogException the asdc catalog exception
+ */
+ private ToscaMeta(Builder builder) throws IOException, AsdcCatalogException {
+ metadata = new HashMap<String, String> ();
+
+ read(builder.inputStream);
+ }
+
+ /**
+ * The Class Builder.
+ */
+ public static class Builder {
+
+ /** The input stream. */
+ private final InputStream inputStream;
+
+ /**
+ * Instantiates a new builder.
+ *
+ * @param inputStream the input stream
+ */
+ public Builder(InputStream inputStream) {
+ this.inputStream = inputStream;
+ }
+
+ /**
+ * Builds the.
+ *
+ * @return the tosca meta
+ * @throws IOException Signals that an I/O exception has occurred.
+ * @throws AsdcCatalogException the asdc catalog exception
+ */
+ public ToscaMeta build() throws IOException, AsdcCatalogException {
+ return new ToscaMeta(this);
+ }
+ }
+
+ /**
+ * Gets the.
+ *
+ * @param property the property
+ * @return the string
+ */
+ public String get(String property) {
+ return metadata.get(property);
+ }
+
+ /**
+ * Read.
+ *
+ * @param inputStream the input stream
+ * @throws IOException Signals that an I/O exception has occurred.
+ * @throws AsdcCatalogException the asdc catalog exception
+ */
+ private void read(InputStream inputStream) throws IOException, AsdcCatalogException {
+
+ final BufferedReader br = new BufferedReader(new InputStreamReader(inputStream));
+
+ String line;
+
+ try {
+ while ((line = br.readLine()) != null) {
+ final String[] entry = line.split(":");
+
+ if (entry.length != 2) throw new AsdcCatalogException("TOSCA.meta file cannot be parsed (more than 1 colon found on a single line");
+ if (!entry[1].startsWith(" ")) throw new AsdcCatalogException("TOSCA.meta file cannot be parsed (: not immediately followed by ' ')");
+
+ metadata.put(entry[0], entry[1].substring(1));
+ }
+ } catch (IOException e) {
+ metadata.clear();
+ throw e;
+ } catch (AsdcCatalogException e) {
+ metadata.clear();
+ throw e;
+ }
+ }
+}
diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaMetadata.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaMetadata.java
new file mode 100755
index 000000000..d42c1f150
--- /dev/null
+++ b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaMetadata.java
@@ -0,0 +1,461 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.vid.asdc.beans.tosca;
+
+/**
+ * The Class ToscaMetadata.
+ */
+public class ToscaMetadata {
+
+ /** The template name. */
+ private String template_name;
+
+ /** The invariant UUID. */
+ private String invariantUUID;
+
+ /** The customization UUID. */
+ private String customizationUUID;
+
+ /** The uuid. */
+ private String uuid;
+
+ /** The version. */
+ private String version;
+
+ /** The name. */
+ private String name;
+
+ /** The description. */
+ private String description;
+
+ /** The category. */
+ private String category;
+
+ /** The subcategory. */
+ private String subcategory;
+
+ /** The type. */
+ private String type;
+
+ /** The resource vendor. */
+ private String resourceVendor;
+
+ /** The resource vendor release. */
+ private String resourceVendorRelease;
+
+ /** The service ecomp naming. */
+ private String serviceEcompNaming;
+
+ /** The ecomp generated naming - duplicate for serviceEcompNaming */
+ private boolean ecompGeneratedNaming;
+
+ /** The naming policy */
+ private String namingPolicy;
+
+ /** The service homing. */
+ private boolean serviceHoming;
+
+ /** The vf module model name. */
+ //ToscaMetadata for VF Modules
+ private String vfModuleModelName;
+
+ /** The vf module model invariant UUID. */
+ private String vfModuleModelInvariantUUID;
+
+ /** The vf module model customization UUID. */
+ private String vfModuleModelCustomizationUUID;
+
+ /** The vf module model UUID. */
+ private String vfModuleModelUUID;
+
+ /** The vf module model version. */
+ private String vfModuleModelVersion;
+
+ /**
+ * Instantiates a new tosca metadata.
+ */
+ public ToscaMetadata() {}
+
+ /**
+ * Gets the type.
+ *
+ * @return the type
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * Gets the invariant UUID.
+ *
+ * @return the invariant UUID
+ */
+ public String getInvariantUUID() {
+ return invariantUUID;
+ }
+ /**
+ * Gets the customization UUID.
+ *
+ * @return the customization UUID
+ */
+ public String getCustomizationUUID() {
+ return customizationUUID;
+ }
+ /**
+ * Gets the uuid.
+ *
+ * @return the uuid
+ */
+ public String getUUID() {
+ return uuid;
+ }
+
+ /**
+ * Gets the version.
+ *
+ * @return the version
+ */
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ * Gets the name.
+ *
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Gets the description.
+ *
+ * @return the description
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * Gets the category.
+ *
+ * @return the category
+ */
+ public String getCategory() {
+ return category;
+ }
+
+ /**
+ * Gets the subcategory.
+ *
+ * @return the subcategory
+ */
+ public String getSubcategory() {
+ return subcategory;
+ }
+
+ /**
+ * Gets the resource vendor.
+ *
+ * @return the resource vendor
+ */
+ public String getResourceVendor() {
+ return resourceVendor;
+ }
+
+ /**
+ * Gets the resource vendor release.
+ *
+ * @return the resource vendor release
+ */
+ public String getResourceVendorRelease() {
+ return resourceVendorRelease;
+ }
+
+ /**
+ * Returns the value of service ecomp naming.
+ *
+ * @return serviceEcompNaming
+ */
+ public String getServiceEcompNaming() {
+ return serviceEcompNaming;
+ }
+ /**
+ * Returns the value of the naming policy.
+ *
+ * @return namingPolicy
+ */
+ public String getNamingPolicy() {
+ return namingPolicy;
+ }
+ /**
+ * Checks if is service homing.
+ *
+ * @return true, if is service homing
+ */
+ public boolean isServiceHoming() {
+ return serviceHoming;
+ }
+ /**
+ * Checks if is ecomp generated naming.
+ *
+ * @return true, if ecomp generated naming is true
+ */
+ public boolean isEcompGeneratedNaming() {
+ return ecompGeneratedNaming;
+ }
+ /**
+ * Sets the type.
+ *
+ * @param type the new type
+ */
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ * Sets the invariant UUID.
+ *
+ * @param invariantUUID the new invariant UUID
+ */
+ public void setInvariantUUID(String invariantUUID) {
+ this.invariantUUID = invariantUUID;
+ }
+ /**
+ * Sets the naming policy.
+ *
+ * @param namingPolicy the new naming policy
+ */
+ public void setNamingPolicy(String namingPolicy) {
+ this.namingPolicy = namingPolicy;
+ }
+ /**
+ * Sets the uuid.
+ *
+ * @param uuid the new uuid
+ */
+ public void setUUID(String uuid) {
+ this.uuid = uuid;
+ }
+ /**
+ * Sets the customization uuid.
+ *
+ * @param u the new customization uuid
+ */
+ public void setCustomizationUUID(String u) {
+ this.customizationUUID = u;
+ }
+ /**
+ * Sets the version.
+ *
+ * @param version the new version
+ */
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ /**
+ * Sets the name.
+ *
+ * @param name the new name
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * Sets the description.
+ *
+ * @param description the new description
+ */
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ /**
+ * Sets the category.
+ *
+ * @param category the new category
+ */
+ public void setCategory(String category) {
+ this.category = category;
+ }
+
+ /**
+ * Sets the service ecomp naming.
+ *
+ * @param serviceEcompNaming the new service ecomp naming
+ */
+ public void setServiceEcompNaming(String serviceEcompNaming) {
+ this.serviceEcompNaming = serviceEcompNaming;
+ }
+
+ /**
+ * Sets the service homing.
+ *
+ * @param serviceHoming the new service homing
+ */
+ public void setServiceHoming(boolean serviceHoming) {
+ this.serviceHoming = serviceHoming;
+ }
+ /**
+ * Sets the ecomp generated naming.
+ *
+ * @param ecompGeneratedNaming the new ecomp generated naming
+ */
+ public void setEcompGeneratedNaming(boolean ecompGeneratedNaming) {
+ this.ecompGeneratedNaming = ecompGeneratedNaming;
+ }
+ /**
+ * Gets the template name.
+ *
+ * @return the template name
+ */
+ public String gettemplate_name() {
+ return template_name;
+ }
+
+ /**
+ * Sets the template name.
+ *
+ * @param template_name the new template name
+ */
+ public void settemplate_name(String template_name) {
+ this.template_name = template_name;
+ }
+
+ /**
+ * Sets the subcategory.
+ *
+ * @param subcategory the new subcategory
+ */
+ public void setSubcategory(String subcategory) {
+ this.subcategory = subcategory;
+ }
+
+ /**
+ * Sets the resource vendor.
+ *
+ * @param resourceVendor the new resource vendor
+ */
+ public void setResourceVendor(String resourceVendor) {
+ this.resourceVendor = resourceVendor;
+ }
+
+ /**
+ * Sets the resource vendor release.
+ *
+ * @param resourceVendorRelease the new resource vendor release
+ */
+ public void setResourceVendorRelease(String resourceVendorRelease) {
+ this.resourceVendorRelease = resourceVendorRelease;
+ }
+
+ /**
+ * Gets the vf module model name.
+ *
+ * @return the vf module model name
+ */
+ public String getVfModuleModelName() {
+ return vfModuleModelName;
+ }
+
+ /**
+ * Sets the vf module model name.
+ *
+ * @param vfModuleModelName the new vf module model name
+ */
+ public void setVfModuleModelName(String vfModuleModelName) {
+ this.vfModuleModelName = vfModuleModelName;
+ }
+
+ /**
+ * Gets the vf module model invariant UUID.
+ *
+ * @return the vf module model invariant UUID
+ */
+ public String getVfModuleModelInvariantUUID() {
+ return vfModuleModelInvariantUUID;
+ }
+
+ /**
+ * Sets the vf module model invariant UUID.
+ *
+ * @param vfModuleModelInvariantUUID the new vf module model invariant UUID
+ */
+ public void setVfModuleModelInvariantUUID(String vfModuleModelInvariantUUID) {
+ this.vfModuleModelInvariantUUID = vfModuleModelInvariantUUID;
+ }
+
+ /**
+ * Gets the vf module model UUID.
+ *
+ * @return the vf module model UUID
+ */
+ public String getVfModuleModelUUID() {
+ return vfModuleModelUUID;
+ }
+
+ /**
+ * Sets the vf module model UUID.
+ *
+ * @param vfModuleModelUUID the new vf module model UUID
+ */
+ public void setVfModuleModelUUID(String vfModuleModelUUID) {
+ this.vfModuleModelUUID = vfModuleModelUUID;
+ }
+
+ /**
+ * Gets the vf module model version.
+ *
+ * @return the vf module model version
+ */
+ public String getVfModuleModelVersion() {
+ return vfModuleModelVersion;
+ }
+
+ /**
+ * Sets the vf module model version.
+ *
+ * @param vfModuleModelVersion the new vf module model version
+ */
+ public void setVfModuleModelVersion(String vfModuleModelVersion) {
+ this.vfModuleModelVersion = vfModuleModelVersion;
+ }
+ /**
+ * Sets the vf module customization uuid.
+ *
+ * @param u the new vf module model customization uuid
+ */
+ public void setVfModuleModelCustomizationUUID(String u) {
+ this.vfModuleModelCustomizationUUID = u;
+ }
+ /**
+ * Gets the vf module model customization uuid.
+ *
+ * @return the vf module model customization uuid
+ */
+ public String getVfModuleModelCustomizationUUID() {
+
+ return vfModuleModelCustomizationUUID;
+ }
+}
diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaModel.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaModel.java
new file mode 100755
index 000000000..c9e42f291
--- /dev/null
+++ b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaModel.java
@@ -0,0 +1,166 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.vid.asdc.beans.tosca;
+
+import java.util.Collection;
+import java.util.LinkedList;
+import java.util.Map;
+
+/**
+ * The Class ToscaModel.
+ */
+public class ToscaModel {
+
+ /** The tosca definitions version. */
+ private String tosca_definitions_version;
+
+ /** The description. */
+ private String description;
+
+ /** The metadata. */
+ private ToscaMetadata metadata;
+
+ /** The topology template. */
+ private TopologyTemplate topology_template;
+
+ /** The imports. */
+ private Collection<Map<String, Map<String, String>>> imports;
+
+ /** The node types. */
+ private Map<String, Object> node_types;
+
+ /**
+ * Instantiates a new tosca model.
+ */
+ public ToscaModel() {
+ metadata = new ToscaMetadata();
+ topology_template = new TopologyTemplate();
+ imports = new LinkedList<Map<String, Map<String, String>>> ();
+ }
+
+ /**
+ * Gets the metadata.
+ *
+ * @return the metadata
+ */
+ public ToscaMetadata getMetadata() {
+ return metadata;
+ }
+
+ /**
+ * Sets the metadata.
+ *
+ * @param metadata the new metadata
+ */
+ public void setMetadata(ToscaMetadata metadata) {
+ this.metadata = metadata;
+ }
+
+ /**
+ * Gets the tosca definitions version.
+ *
+ * @return the tosca definitions version
+ */
+ public String gettosca_definitions_version() {
+ return tosca_definitions_version;
+ }
+
+ /**
+ * Sets the tosca definitions version.
+ *
+ * @param tosca_definitions_version the new tosca definitions version
+ */
+ public void settosca_definitions_version(String tosca_definitions_version) {
+ this.tosca_definitions_version = tosca_definitions_version;
+ }
+
+ /**
+ * Gets the topology template.
+ *
+ * @return the topology template
+ */
+ public TopologyTemplate gettopology_template() {
+ return topology_template;
+ }
+
+ /**
+ * Sets the topology template.
+ *
+ * @param topology_template the new topology template
+ */
+ public void settopology_template(TopologyTemplate topology_template) {
+ this.topology_template = topology_template;
+ }
+
+ /**
+ * Gets the description.
+ *
+ * @return the description
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * Sets the description.
+ *
+ * @param description the new description
+ */
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ /**
+ * Gets the imports.
+ *
+ * @return the imports
+ */
+ public Collection<Map<String, Map<String, String>>> getImports() {
+ return imports;
+ }
+
+ /**
+ * Sets the imports.
+ *
+ * @param imports the imports
+ */
+ public void setImports(Collection<Map<String, Map<String, String>>> imports) {
+ this.imports = imports;
+ }
+
+ /**
+ * Gets the node types.
+ *
+ * @return the node types
+ */
+ public Map<String, Object> getnode_types() {
+ return node_types;
+ }
+
+ /**
+ * Setnode types.
+ *
+ * @param node_types the node types
+ */
+ public void setnode_types(Map<String, Object> node_types) {
+ this.node_types = node_types;
+ }
+}