* @param listOfReqNodeTemplates - list of node templates in which the "reqName" requirement should be looked.
* @param listOfCapNodeTemplates - list of node templates in which the capability matching the "reqName" requirement should be looked.
* @param reqName - the name of a requirement definition to match by.
- * @return
+ * @return pairs of node templates according to described above.
*/
public List<Pair<NodeTemplate,NodeTemplate>> getNodeTemplatePairsByReqName(List<NodeTemplate> listOfReqNodeTemplates, List<NodeTemplate> listOfCapNodeTemplates, String reqName);
* port_fe_interce={ip_requirements#ip_count_required#count=1, ip_requirements#dhcp_enabled=true, ip_requirements#ip_version=4},<br>
* port_fe_oam={ip_requirements#ip_count_required#count=2, ip_requirements#dhcp_enabled=true, ip_requirements#ip_version=4, subnetpoolid="subnet_2", network_role_tag="Mobility_OAM_protected"}}<br><br>
* @param vfc - VFC node template to look for CP-related props.
- * @return map <CP node template name> to a map of <full path to a property on this CP> <value of this property on this CP>.
+ * @return map <b>CP node template name</b> to a map of <b>full path to a property on this CP</b> - <b> value of this property on this CP</b>.
*/
public Map<String, Map<String, Object>> getCpPropertiesFromVfc(NodeTemplate vfc);
}
import org.openecomp.sdc.toscaparser.api.ToscaTemplate;\r
import org.openecomp.sdc.toscaparser.api.common.JToscaException;\r
\r
-import java.io.IOException;\r
-\r
public class SdcToscaParserFactory {\r
\r
private static volatile SdcToscaParserFactory instance;\r
\r
/**\r
* Get an SdcToscaParserFactory instance.\r
- * After parsing work is done, it must be closed using the close() method.\r
+ * @return SdcToscaParserFactory instance.\r
*/\r
- public static SdcToscaParserFactory getInstance() throws IOException {\r
+ public static SdcToscaParserFactory getInstance() {\r
if (instance == null) {\r
synchronized (SdcToscaParserFactory.class) {\r
if (instance == null) {\r
* @param csarPath - the absolute path to CSAR file.\r
* @return ISdcCsarHelper object.\r
* @throws SdcToscaParserException - in case the path or CSAR are invalid.\r
- * @throws JToscaException\r
+ * @throws JToscaException - in case the path or CSAR are invalid.\r
*/\r
- public ISdcCsarHelper getSdcCsarHelper(String csarPath) throws JToscaException, IOException, SdcToscaParserException {\r
- //TODO add logic to check if legal file and csar\r
+ public ISdcCsarHelper getSdcCsarHelper(String csarPath) throws JToscaException, SdcToscaParserException {\r
synchronized (SdcToscaParserFactory.class) {\r
-\r
-\r
ToscaTemplate tosca = new ToscaTemplate(csarPath, null, true, null);\r
SdcCsarHelperImpl sdcCsarHelperImpl = new SdcCsarHelperImpl(tosca);\r
- if (sdcCsarHelperImpl != null) {\r
- validateCsarVersion(sdcCsarHelperImpl.getConformanceLevel());\r
- }\r
+ validateCsarVersion(sdcCsarHelperImpl.getConformanceLevel());\r
return sdcCsarHelperImpl;\r
}\r
}\r
* @return The result is a negative integer if str1 is _numerically_ less than str2.
* The result is a positive integer if str1 is _numerically_ greater than str2.
* The result is zero if the strings are _numerically_ equal.
- * @note It does not work if "1.10" is supposed to be equal to "1.10.0".
+ * It does not work if "1.10" is supposed to be equal to "1.10.0".
*/
public static int conformanceLevelCompare(String str1, String str2) {
String[] vals1 = str1.split("\\.");