package com.platform.controller; <<<<<<< HEAD import javax.annotation.Resource; import org.springframework.stereotype.Controller; import org.springframework.stereotype.Service; import org.springframework.web.bind.annotation.RequestMapping; ======= import java.util.Date; import java.util.List; import javax.annotation.Resource; import oracle.sql.DATE; import org.springframework.stereotype.Controller; import org.springframework.stereotype.Service; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; >>>>>>> 355b6e47a4fa8d058029ec939fe4fefdaa751275 import com.base.BaseController; import com.base.CustomException; import com.platform.entities.GfsFolderEntity; <<<<<<< HEAD ======= import com.platform.entities.VolumeEntity; import com.platform.glusterfs.VolumeInfo; >>>>>>> 355b6e47a4fa8d058029ec939fe4fefdaa751275 import com.platform.service.IGfsService; /** * <一句话功能简述> * <功能详细描述> * @author chen * @version [版本号,2016年9月8日] * @see [相关类/方法] * @since [产品/模块版本] */ @Controller <<<<<<< HEAD @RequestMapping("/folder") ======= @RequestMapping("") >>>>>>> 355b6e47a4fa8d058029ec939fe4fefdaa751275 public class FolderController extends BaseController { @Resource(name = "gfsService") private IGfsService gfsService; <<<<<<< HEAD @RequestMapping("/getAllSubPathByPath") ======= @RequestMapping(value="/getAllSubPathByPath", method= RequestMethod.POST) >>>>>>> 355b6e47a4fa8d058029ec939fe4fefdaa751275 public Object getAllSubPathByPath(String path) throws Exception { System.out.println(path); Object result = null; if (null != path && !"".equals(path)) { System.out.println(path); result = gfsService.getFolder(path); } return result; } <<<<<<< HEAD @RequestMapping("/copyFolder") public Object copyFolder(String srcpath, String dstPath, String name) throws Exception { // -1 :error; -2: the filename is not exists ;-3 :destFolderName ; 1: right int result = gfsService.copyFolder(srcpath, dstPath, name); System.out.println(srcpath); System.out.println(dstPath); String obj = "right"; if (1 != result) { obj = "err"; } return obj; ======= // /** // * <一句话功能简述> 查询集群中所有的 volume 及其 信息 // * <功能详细描述> // * @return // * @throws Exception // * @see [类、类#方法、类#成员] // */ // @RequestMapping(value="/volume/list", method= RequestMethod.POST) // public Object getVolums() throws Exception{ // System.out.println("----------------------------------"); // long a = new Date().getTime(); // List result = gfsService.getAllVolumes(); // System.out.println("----------------------------------"); // System.out.println(new Date().getTime()-a); // return result; // } // /** * <一句话功能简述> 查询集群中所有的 volume 及其 信息 * <功能详细描述> * @param volumeName "/home/gfs_ftp_point" "/home/v1_point" * @return * @throws Exception * @see [类、类#方法、类#成员] */ @RequestMapping(value="/volume/findByName", method= RequestMethod.POST) public Object getVolumByName(String volumeName) throws Exception{ VolumeEntity result = gfsService.getOneVolume(volumeName); return result; >>>>>>> 355b6e47a4fa8d058029ec939fe4fefdaa751275 } }