[SDC-20] fix javadocs 97/4197/1
authorPavel Aharoni <pa0916@att.com>
Sun, 14 May 2017 16:13:30 +0000 (19:13 +0300)
committerPavel Aharoni <pa0916@att.com>
Sun, 14 May 2017 16:13:30 +0000 (19:13 +0300)
Change-Id: Ia39a5e4628bd130d7f550886dabf8928a4c2aac2
Signed-off-by: Pavel Aharoni <pa0916@att.com>
sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/api/ISdcCsarHelper.java
sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/impl/SdcToscaParserFactory.java
sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/utils/GeneralUtility.java

index fd5a435..efee2c4 100644 (file)
@@ -259,7 +259,7 @@ public interface ISdcCsarHelper {
         * @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);
        
@@ -310,7 +310,7 @@ public interface ISdcCsarHelper {
         *  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);
 }
index 62b5acb..14c332c 100644 (file)
@@ -9,8 +9,6 @@ import org.openecomp.sdc.tosca.parser.utils.GeneralUtility;
 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
@@ -22,9 +20,9 @@ public class SdcToscaParserFactory {
 \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
@@ -42,18 +40,13 @@ public class SdcToscaParserFactory {
      * @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
index da066fc..84150f6 100644 (file)
@@ -20,7 +20,7 @@ public class GeneralUtility {
      * @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("\\.");