return null;
}
}
+
+ public static boolean isAtomicComponent(Component component) {
+ ComponentTypeEnum componentType = component.getComponentType();
+ if (!componentType.equals(ComponentTypeEnum.RESOURCE)) {
+ return false;
+ }
+ Resource resource = (Resource) component;
+ ResourceTypeEnum resType = resource.getResourceType();
+ return isAtomicComponent(resType);
+ }
+
+ public static boolean isAtomicComponent(ResourceTypeEnum resourceType) {
+ if (resourceType == null || resourceType == ResourceTypeEnum.VF || resourceType == ResourceTypeEnum.PNF || resourceType == ResourceTypeEnum.CVFC)
+ return false;
+ return true;
+ }
// **********************************************************
public static VertexTypeEnum getVertexType(Component component) {
return vertexType;
}
- public static boolean isAtomicComponent(ResourceTypeEnum resourceType) {
- if (resourceType == null || resourceType == ResourceTypeEnum.VF || resourceType == ResourceTypeEnum.PNF || resourceType == ResourceTypeEnum.CVFC)
- return false;
- return true;
- }
+
private static Service convertToService(ToscaElement toscaElement) {
Service service = new Service();
relationshipPair.setCapabilityOwnerId(relation.getCapabilityOwnerId());
relationshipPair.setCapabilityUid(relation.getCapabilityId());
+ relationshipPair.setCapability(relation.getCapability());
relationshipPair.setRequirementOwnerId(relation.getRequirementOwnerId());
relationshipPair.setRequirementUid(relation.getRequirementId());
relationshipPair.setRequirement(relation.getRequirement());
toscaElement.setMetadataValue(JsonPresentationFields.CONTACT_ID, component.getContactId());
}
- public static boolean isAtomicComponent(Component component) {
- ComponentTypeEnum componentType = component.getComponentType();
- if (!componentType.equals(ComponentTypeEnum.RESOURCE)) {
- return false;
- }
- Resource resource = (Resource) component;
- ResourceTypeEnum resType = resource.getResourceType();
- if (resType == ResourceTypeEnum.VFC || resType == ResourceTypeEnum.VFCMT || resType == ResourceTypeEnum.VL || resType == ResourceTypeEnum.CP || resType == ResourceTypeEnum.ABSTRACT) {
- return true;
- }
- return false;
- }
+
private static void setComponentInstancesToComponent(TopologyTemplate topologyTemplate, Component component) {