You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
aggregation-platform/src/com/platform/controller/FolderController.java

83 lines
2.3 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package com.platform.controller;
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;
import com.base.BaseController;
import com.base.CustomException;
import com.platform.entities.GfsFolderEntity;
import com.platform.entities.VolumeEntity;
import com.platform.glusterfs.VolumeInfo;
import com.platform.service.IGfsService;
/**
* <一句话功能简述>
* <功能详细描述>
* @author chen
* @version [版本号2016年9月8日]
* @see [相关类/方法]
* @since [产品/模块版本]
*/
@Controller
@RequestMapping("")
public class FolderController extends BaseController {
@Resource(name = "gfsService")
private IGfsService gfsService;
@RequestMapping(value="/getAllSubPathByPath", method= RequestMethod.POST)
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;
}
// /**
// * <一句话功能简述> 查询集群中所有的 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<VolumeEntity> 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;
}
}