diff options
author | 2017-12-20 14:30:43 +0200 | |
---|---|---|
committer | 2017-12-21 11:12:33 +0000 | |
commit | 8e9c0653dd6c6862123c9609ae34e1206d86456e (patch) | |
tree | 5eeef00ec0677133baa439ca8d7ffd7aca4804b6 /openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-api/src/main/java/org/openecomp/convertor | |
parent | 785ebcc95de3e064e843bec04ba7a209d854fc7c (diff) |
Add collaboration feature
Issue-ID: SDC-767
Change-Id: I14fb4c1f54086ed03a56a7ff7fab9ecd40381795
Signed-off-by: talig <talig@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-api/src/main/java/org/openecomp/convertor')
-rw-r--r-- | openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-api/src/main/java/org/openecomp/convertor/ElementConvertor.java | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-api/src/main/java/org/openecomp/convertor/ElementConvertor.java b/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-api/src/main/java/org/openecomp/convertor/ElementConvertor.java new file mode 100644 index 0000000000..68c709826f --- /dev/null +++ b/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-api/src/main/java/org/openecomp/convertor/ElementConvertor.java @@ -0,0 +1,37 @@ +package org.openecomp.convertor; + +import com.amdocs.zusammen.adaptor.inbound.api.types.item.Element; +import com.amdocs.zusammen.adaptor.inbound.api.types.item.ElementInfo; +import com.amdocs.zusammen.datatypes.item.Item; +import com.amdocs.zusammen.datatypes.item.ItemVersion; +import org.openecomp.sdc.datatypes.model.ElementType; +import org.openecomp.types.ElementPropertyName; + +public abstract class ElementConvertor<T> { + + public static ElementType getElementType(Element element) { + return ElementType + .valueOf(element.getInfo().getProperty(ElementPropertyName.elementType.name())); + } + + public static String getElementName(Element element) { + return element.getInfo().getName(); + } + + + abstract public T convert(Element element); + + public T convert( ElementInfo elementInfo) { + throw new UnsupportedOperationException("convert elementInfo item is not supported "); + } + + + public T convert( Item item) { + throw new UnsupportedOperationException("convert from item is not supported "); + } + + + public T convert( ItemVersion itemVersion) { + throw new UnsupportedOperationException("convert from itemVersion is not supported "); + } +} |