aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/capability/CapabilityResolver.java
blob: 0a467ef876f1385167bda5ec3a81506678d080ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package org.openecomp.sdc.be.components.merge.capability;

import org.openecomp.sdc.be.model.CapabilityDefinition;
import org.openecomp.sdc.be.model.Component;
import org.openecomp.sdc.be.model.ComponentInstance;

import java.util.List;
import java.util.Map;

public interface CapabilityResolver {

    /**
     *
     * @param container the instance container
     * @param prevInstanceOrigNode the prev instance's original node type
     * @param cmptInstanceId the current instance id
     * @param prevCapabilities list of previous capabilities for which to find their corresponding new capabilities
     * @return a mapping between the prev capability to its corresponding new capability (if exists)
     */
    Map<CapabilityDefinition, CapabilityDefinition> resolvePrevCapToNewCapability(Component container, Component prevInstanceOrigNode, String cmptInstanceId, List<CapabilityDefinition> prevCapabilities);

    /**
     *
     * @param oldInstance the old instance of which its capabilities are to be mapped as the key
     * @param currInstance the curr instance of which its capabilities are to be mapped as the value
     * @return a mapping between the prev capability to its corresponding new capability (if exists)
     */
    Map<CapabilityDefinition, CapabilityDefinition> resolvePrevCapIdToNewCapability(ComponentInstance oldInstance, ComponentInstance currInstance);
}