From 8e8a726b70e8161ab9d1c1659b6589d0af8c2e4f Mon Sep 17 00:00:00 2001 From: shrek2000 Date: Tue, 20 Feb 2018 16:00:48 +0200 Subject: Workflow Operation Data model for workflow operations. Issue-ID: SDC-990 Change-Id: If13cca8c03368652e6cb3a8c3d48151b6ddcda74 Signed-off-by: shrek2000 --- .../java/org/openecomp/sdc/be/model/Resource.java | 23 +++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'catalog-model/src/main/java') diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/Resource.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/Resource.java index d48718bbff..786c11f636 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/Resource.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/Resource.java @@ -29,11 +29,9 @@ import org.openecomp.sdc.be.dao.utils.MapUtil; import org.openecomp.sdc.be.datatypes.components.ResourceMetadataDataDefinition; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; - +import org.openecomp.sdc.be.datatypes.elements.WorkflowOperationDataDefinition; public class Resource extends Component implements Serializable { - /** - * - */ + private static final long serialVersionUID = -6811540567661368482L; public static final String ROOT_RESOURCE = "tosca.nodes.Root"; @@ -60,6 +58,8 @@ public class Resource extends Component implements Serializable { private List defaultCapabilities; + private Map workflowOperations; + // private List additionalInformation; /** @@ -153,6 +153,13 @@ public class Resource extends Component implements Serializable { .setLicenseType(licenseType); } + public Map getWorkflowOperations() { + return workflowOperations; + } + + public void setWorkflowOperations(Map workflowOperations) { + this.workflowOperations = workflowOperations; + } @Override public int hashCode() { @@ -168,6 +175,7 @@ public class Resource extends Component implements Serializable { result = prime * result + ((interfaces == null) ? 0 : interfaces.hashCode()); result = prime * result + ((properties == null) ? 0 : properties.hashCode()); result = prime * result + ((derivedList == null) ? 0 : derivedList.hashCode()); + result = prime * result + ((workflowOperations == null) ? 0 : workflowOperations.hashCode()); // result = prime * result + ((requirements == null) ? 0 : // requirements.hashCode()); return result; @@ -213,7 +221,11 @@ public class Resource extends Component implements Serializable { return false; } else if (!properties.equals(other.properties)) return false; - + if (workflowOperations == null) { + if (other.workflowOperations != null) + return false; + } else if (!workflowOperations.equals(other.workflowOperations)) + return false; return super.equals(obj); } @@ -224,6 +236,7 @@ public class Resource extends Component implements Serializable { // + ", capabilities=" + capabilities + ", requirements=" + // requirements + ", defaultCapabilities=" + defaultCapabilities + ", additionalInformation=" + additionalInformation + + ", workflowOperations=" + workflowOperations + "Metadata [" + getComponentMetadataDefinition().getMetadataDataDefinition().toString() + "]"; } -- cgit 1.2.3-korg