From 4db27df99aa03514708282e2d2f288b6c70804fa Mon Sep 17 00:00:00 2001 From: Harry Huang Date: Thu, 21 Sep 2017 15:49:03 +0800 Subject: add override annotation in HttpFileManagerImpl major: L29 L50 L55 L56 Change-Id: Ib0f722c8fcc73a7166fb931ac8c2afb44eb2e562 Signed-off-by: Harry Huang Issue-Id: VNFSDK-85 --- .../marketplace/filemanage/http/HttpFileManagerImpl.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'vnfmarket-be/vnf-sdk-marketplace') diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/filemanage/http/HttpFileManagerImpl.java b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/filemanage/http/HttpFileManagerImpl.java index 24090937..403c52ac 100644 --- a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/filemanage/http/HttpFileManagerImpl.java +++ b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/filemanage/http/HttpFileManagerImpl.java @@ -26,6 +26,7 @@ import org.slf4j.LoggerFactory; public class HttpFileManagerImpl implements FileManager { private static final Logger LOGGER = LoggerFactory.getLogger(HttpFileManagerImpl.class); + @Override public boolean upload(String srcPath, String dstPath) { boolean flag = true; LOGGER.info("start upload file.srcPath:" + srcPath + " dstPath" + dstPath); @@ -34,8 +35,7 @@ public class HttpFileManagerImpl implements FileManager { LOGGER.error("src file not exist!"); return false; } - // File dstFile = new File(ToolUtil.getHttpServerPath() + dstPath); - // LOGGER.info("dstFile AbsolutePath:" + dstFile.getAbsolutePath()); + String targetDir = ToolUtil.getHttpServerAbsolutePath() + dstPath; try { ToolUtil.copyDirectory(srcPath, targetDir, true); @@ -47,18 +47,19 @@ public class HttpFileManagerImpl implements FileManager { return flag; } + @Override public boolean download(String srcPath, String dstPath) { // TODO Auto-generated method stub return false; } + @Override public boolean delete(String srcPath) { - boolean flag = true; LOGGER.info("start delete file from http server.srcPath:" + srcPath); - flag = ToolUtil.deleteDir(new File(ToolUtil.getHttpServerAbsolutePath() + srcPath)); + boolean flag = ToolUtil.deleteDir(new File(ToolUtil.getHttpServerAbsolutePath() + srcPath)); LOGGER.info("delete file from http server end.flag:" + flag); return flag; } - } + -- cgit 1.2.3-korg