package org.onap.so.bpmn.core.domain;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonRootName;
import org.onap.so.bpmn.core.json.JsonDecomposingException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
private List<AllottedResource> allottedResources;
@JsonProperty("configResource")
private List<ConfigResource> configResources;
+ @JsonProperty("serviceInfo")
+ private ServiceInfo serviceInfo;
+ @JsonProperty("serviceProxy")
+ private List<ServiceProxy> serviceProxy;
public ServiceDecomposition() {
super();
this.serviceRole = serviceDecomposition.getServiceRole();
this.serviceType = serviceDecomposition.getServiceType();
this.configResources = serviceDecomposition.getConfigResources();
+ this.serviceProxy = serviceDecomposition.getServiceProxy();
+ this.serviceInfo = serviceDecomposition.getServiceInfo();
}
/**
this.project = serviceDecomposition.getProject();
this.owningEntity = serviceDecomposition.getOwningEntity();
+ this.serviceProxy = serviceDecomposition.getServiceProxy();
+ this.serviceInfo = serviceDecomposition.getServiceInfo();
}
/**
* Constructor taking a Service Decomposition JSON serialization
- *
+ *
* @param catalogRestOutput
* @param serviceInstanceId
*/
* Return just the service model portion of the Service Decomposition as a Java object. The service model object
* should support retrieval as JSON string that is formatted correctly for sending serviceModelInfo to Building
* Blocks.
- *
+ *
* @return
*/
public ModelInfo getModelInfo() {
this.sdncVersion = sdncVersion;
}
+ public ServiceInfo getServiceInfo() {
+ return serviceInfo;
+ }
+
+ public void setServiceInfo(ServiceInfo serviceInfo) {
+ this.serviceInfo = serviceInfo;
+ }
+
+ public List<ServiceProxy> getServiceProxy() {
+ return serviceProxy;
+ }
+
+ public void setServiceProxy(List<ServiceProxy> serviceProxy) {
+ this.serviceProxy = serviceProxy;
+ }
+
// *****
// *****
/**
* This method returns one combined list of Resources of All Types
- *
+ *
* @return
*/
@JsonIgnore
/**
* Returns a JSON list of all Network Resource structures (i.e. the serialized NetworkDecomposition objects).
- *
+ *
* @return
*/
@JsonIgnore
/**
* Returns a JSON list of all VnfResource structures (i.e. the serialized VnfResource objects).
- *
+ *
* @return
*/
@JsonIgnore
/**
* Returns a JSON list of all Allotted Resource structures (i.e. the serialized AllottedResource objects).
- *
+ *
* @return
*/
@JsonIgnore
/**
* Returns a JSON list of all Config Resource structures (i.e. the serialized ConfigResource objects).
- *
+ *
* @return
*/
@JsonIgnore
// Methods to add Resource to the list
/**
* Add VNF resource to the list
- *
+ *
* @param vnfResource
*/
public void addVnfResource(Resource vnfResource) {
/**
* Add Network resource to the list
- *
+ *
* @param networkResource
*/
public void addNetworkResource(Resource networkResource) {
/**
* Add Allotted resource to the list
- *
+ *
* @param allottedResource
*/
public void addAllottedResource(Resource allottedResource) {
/**
* Add Config resource to the list
- *
+ *
* @param allottedResource
*/
public void addConfigResource(Resource configResource) {
* Add resource to the list Given a ResourceDecomposition (subclass) object, add it to the Service Decomposition (in
* the appropriate category, e.g. as a VNF, Network, or Allotted Resource). As dependencies are not currently
* supported, add it to the end of any ordered lists.
- *
+ *
* @param resource
*/
public void addResource(Resource resource) {
/**
* Add resource to the list
- *
+ *
* @param jsonResource
*/
public void addVnfResource(String jsonResource) throws JsonDecomposingException {
/**
* Add resource to the list
- *
+ *
* @param jsonResource
*/
public void addNetworkResource(String jsonResource) throws JsonDecomposingException {
/**
* Add resource to the list
- *
+ *
* @param Resource
*/
public void addAllottedResource(String jsonResource) throws JsonDecomposingException {
/**
* Add resource to the list
- *
+ *
* @param Resource
*/
public void addConfigResource(String jsonResource) throws JsonDecomposingException {
* Given a ResourceDecomposition (subclass) object, locate it in the Service Decomposition by its unique ID, and
* replace the current version with the new one. This method should support concurrency control via an
* auto-incrementing field in the ResourceDecomposition class.
- *
+ *
* @param newResource
* @return TRUE if replacement was a success
*/
/**
* Given a ResourceDecomposition as a JSON string, locate it in the Service Decomposition by its unique ID, and
* replace the current version with the new one.
- *
+ *
* @param jsonString
* @return
*/
/**
* Given a resource object ID, locate it in the Service Decomposition by its unique ID, and delete it.
- *
+ *
* @param resource
* @return TRUE if delete was a success
*/
/**
* Generic method to get List of Resource objects based on input resource's resourceType
- *
+ *
* @param resource
* @return List matching the resourceType of resource
*/
/**
* Generic method to set List of ResourceDecomposition objects
- *
+ *
* @param resources
* @return
*/