Package com.isfasiel.util.data

Examples of com.isfasiel.util.data.Data


   
    if( !isLogin() ) {
      return returnErrorMsg(model, groupProp.getProperty("LOGIN_ERROR"));
    }
   
    Data param = getParam();
    if(text.isNull(param.getString("groupName"))) {
      return returnErrorMsg(model, groupProp.getProperty("NO_GROUP_NAME"));
    }
    User user= getUser();
    param.add(0, "userIdx", user.getId());
   
    Object result = groupService.insert(param);
    param = null;
    if(groupProp.getProperty("DUPLICATED_NAME").equals(result)) {
      return returnErrorMsg(model, groupProp.getProperty("DUPLICATED_NAME"));
View Full Code Here


  public String delete(Model model) throws Exception {
    if(!isLogin()) {
      return returnErrorMsg(model, groupProp.getProperty("LOGIN_ERROR"));
    }
   
    Data param = getParam();
    if(text.isNull(param.getString("groupName"))) {
      return returnErrorMsg(model, "NO_GROUP_NAME");
    }
    if(text.isNull(param.getString("groupId"))) {
      return returnErrorMsg(model, "NO_GROUP_ID");
    }
   
    User user= getUser();
    param.add(0, "userIdx", user.getId());
   
    int count = groupService.update(param);
    param = null;
    if( count > 0) {
      return returnOkMsg(model);
View Full Code Here

  public String update(Model model) throws Exception {
    if(!isLogin()) {
      return returnErrorMsg(model, groupProp.getProperty("LOGIN_ERROR"));
    }
   
    Data param = getParam();
    User user= getUser();
    param.add(0, "userIdx", user.getId());
   
    if(text.isNull(param.getString("groupId"))) {
      return returnErrorMsg(model, "NO_GROUP_ID");
    }
   
    int count = groupService.delete(param);
   
View Full Code Here

  //public String list(Model model, @PathVariable int page) throws Exception {
  public String list(Model model) throws Exception {
    if(!isLogin()) {
      return returnErrorMsg(model, groupProp.getProperty("LOGIN_ERROR"));
    }
    Data param = getParam();
    System.out.println(param);
    Data result = groupService.list(param);
    addXML(model, "result", result, "group");
   
    param = null;
    result = null;
    return path;
View Full Code Here

  public String myList(Model model) throws Exception {
    if(!isLogin()) {
      return returnErrorMsg(model, groupProp.getProperty("LOGIN_ERROR"));
    }
    //Data param = getPageParam(page, pageSize);
    Data param = getParam();
    User user= getUser();
   
    System.out.println( param.get(0, "groupName") );
    param.add(0, "userIdx", user.getId());
   
    Data result = groupService.viewMyGroupList(param);
    addXML(model, "result", result, "group");
   
    param = null;
    result = null;
    return path;
View Full Code Here

   * @param realPath
   * @return
   * @throws Exception
   */
  protected void setDirInfo(String type) throws Exception{
    Data dir = new Data();
    if(dirUtil.getDirId() == -1) {
      dir.add(0, "phyPath", dateUtil.dateToPath());
      dir.add(0, "dirType", type);
      dir = dirService.insertDir(getBasePath(), dir);
      dirUtil.setDirId(dir.getLong(0, "dirId"));
      dirUtil.setPhyPath(dir.getString(0, "phyPath"));
      dirUtil.setDirType(dir.getString(0, "dirType"));
    }
    dir = null;
  }
View Full Code Here

   * @throws Exception
   */
  public Data uploadFiles(HttpServletRequest request, long contentId) throws Exception {
    setDirInfo("N");
   
    Data files =  fileUtil.uploadFilesrequest,
                      dirUtil.getDirType() + "/" + dirUtil.getPhyPath(),
                      dirUtil.getDirId()
                    );
   
    if( files.isNull()) {
      return new Data();
    }
    files.add(0, "contentId", contentId);
   
   
    int size = files.size();
   
   
   
    for(int i =0; i < size; i++) {
      files.add(i, "fileType", "A");
    }
    files = fileService.insertFile(files);
   
    Data param = new Data();
    for(int i = 0; i< size; i++) {
      param.add(i, "fileId", files.getString(i, "fileId"));
      param.add(i, "fileName", files.getString(i, "fileName"));
    }
    files = null;
    return param;

   
View Full Code Here

   
  }

  public Data getPageParam(int page, int pageSize) throws Exception{
    Data param = getParam();
    param.setPageSize(pageSize);
    param.setPage(page);
    param.add(0,"page", page);
    param.add(0,"pageSize", pageSize);
    param = pageUtil.getRowSize(param);
    return param;
  }
View Full Code Here

 
  @RequestMapping(value="/sample.do")
  public String go(Model model) throws Exception {
    System.out.println(fileProp.getProperty("baseDir"));
    System.out.println(fileProp.getProperty("mineType"));
    Data result = sampleService.insert(getParam());
    model.addAttribute("result", result.toList());
    return "test";
  }
View Full Code Here

  }
 
  @RequestMapping(value="/create.do")
  public String createWatch(Model model) throws Exception {
    User user = loginInfoProvider.get().currentUser();
    Data result = new Data();
    if(user != null) {
      try {
        Data param = getParam();
        param.add(0, "userIdx", user.getId());
        watchService.insertWatch(param);
        result.add(0, "result", "OK");
        param = null;
      } catch (Exception e) {
        e.printStackTrace();
View Full Code Here

TOP

Related Classes of com.isfasiel.util.data.Data

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.