Reducing onboarding backend maven build time
[sdc.git] / catalog-be / src / main / java / org / openecomp / sdc / be / tosca / utils / OperationArtifactUtil.java
1 package org.openecomp.sdc.be.tosca.utils;
2
3 import java.io.File;
4 import org.openecomp.sdc.be.datatypes.elements.OperationDataDefinition;
5 import org.openecomp.sdc.be.tosca.CsarUtils;
6
7 public class OperationArtifactUtil {
8
9     /**
10      * This method assumes that operation.getImplementation() is not NULL  ( it should be verified by the caller method)
11      *
12      * @param componentName component's normalized name
13      * @param interfaceType the specific interface name
14      * @param operation     teh specific operation name
15      * @return the full path including file name for operation's artifacts
16      */
17
18     public static String createOperationArtifactPath(String componentName, String interfaceType,
19             OperationDataDefinition operation) {
20         return CsarUtils.ARTIFACTS + File.separator + componentName + File.separator + interfaceType + File.separator
21                        + CsarUtils.DEPLOYMENT_ARTIFACTS_DIR + CsarUtils.WORKFLOW_ARTIFACT_DIR + operation
22                                                                                                         .getImplementation()
23                                                                                                         .getArtifactName();
24     }
25 }