diff options
author | Pavel Aharoni <pa0916@att.com> | 2017-05-14 19:13:30 +0300 |
---|---|---|
committer | Pavel Aharoni <pa0916@att.com> | 2017-05-14 19:13:30 +0300 |
commit | 0e4e255b8c69d55ccb1a73cdb4d8682fecd51620 (patch) | |
tree | 052b3201e8b5aff82b70b38501b64382c74bb971 /sdc-tosca-parser/src/main/java/org | |
parent | 7f05e4ea488144ba8bdecbed0aaa853a6d001a38 (diff) |
[SDC-20] fix javadocs
Change-Id: Ia39a5e4628bd130d7f550886dabf8928a4c2aac2
Signed-off-by: Pavel Aharoni <pa0916@att.com>
Diffstat (limited to 'sdc-tosca-parser/src/main/java/org')
3 files changed, 8 insertions, 15 deletions
diff --git a/sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/api/ISdcCsarHelper.java b/sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/api/ISdcCsarHelper.java index fd5a435..efee2c4 100644 --- a/sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/api/ISdcCsarHelper.java +++ b/sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/api/ISdcCsarHelper.java @@ -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); } diff --git a/sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/impl/SdcToscaParserFactory.java b/sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/impl/SdcToscaParserFactory.java index 62b5acb..14c332c 100644 --- a/sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/impl/SdcToscaParserFactory.java +++ b/sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/impl/SdcToscaParserFactory.java @@ -9,8 +9,6 @@ import org.openecomp.sdc.tosca.parser.utils.GeneralUtility; import org.openecomp.sdc.toscaparser.api.ToscaTemplate;
import org.openecomp.sdc.toscaparser.api.common.JToscaException;
-import java.io.IOException;
-
public class SdcToscaParserFactory {
private static volatile SdcToscaParserFactory instance;
@@ -22,9 +20,9 @@ public class SdcToscaParserFactory { /**
* Get an SdcToscaParserFactory instance.
- * After parsing work is done, it must be closed using the close() method.
+ * @return SdcToscaParserFactory instance.
*/
- public static SdcToscaParserFactory getInstance() throws IOException {
+ public static SdcToscaParserFactory getInstance() {
if (instance == null) {
synchronized (SdcToscaParserFactory.class) {
if (instance == null) {
@@ -42,18 +40,13 @@ public class SdcToscaParserFactory { * @param csarPath - the absolute path to CSAR file.
* @return ISdcCsarHelper object.
* @throws SdcToscaParserException - in case the path or CSAR are invalid.
- * @throws JToscaException
+ * @throws JToscaException - in case the path or CSAR are invalid.
*/
- public ISdcCsarHelper getSdcCsarHelper(String csarPath) throws JToscaException, IOException, SdcToscaParserException {
- //TODO add logic to check if legal file and csar
+ public ISdcCsarHelper getSdcCsarHelper(String csarPath) throws JToscaException, SdcToscaParserException {
synchronized (SdcToscaParserFactory.class) {
-
-
ToscaTemplate tosca = new ToscaTemplate(csarPath, null, true, null);
SdcCsarHelperImpl sdcCsarHelperImpl = new SdcCsarHelperImpl(tosca);
- if (sdcCsarHelperImpl != null) {
- validateCsarVersion(sdcCsarHelperImpl.getConformanceLevel());
- }
+ validateCsarVersion(sdcCsarHelperImpl.getConformanceLevel());
return sdcCsarHelperImpl;
}
}
diff --git a/sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/utils/GeneralUtility.java b/sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/utils/GeneralUtility.java index da066fc..84150f6 100644 --- a/sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/utils/GeneralUtility.java +++ b/sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/utils/GeneralUtility.java @@ -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("\\."); |