Package com.isfasiel.util.data

Examples of com.isfasiel.util.data.Data


 
  private String path = "content/xml";
 
  @RequestMapping(value="/delete/{contentId}")
  public String deleteContent(Model model, @PathVariable long contentId) throws Exception {
    Data result = new Data();
    User user = getUser();
    if(user != null) {
      try {
        Data param = getParam();
        param.add(0, "userIdx", user.getId());
        param.add(0, "contentId", contentId);
        realEstateService.delete(param);
        result.add(0,"result", "OK");
       
      } catch (Exception e) {
        result.add(0,"result", "NO");
View Full Code Here


    return path;
  }
 
  @RequestMapping(value="/create.do")
  public String createContent(Model model, HttpServletRequest request) throws Exception {
    Data result = new Data();
    User user = getUser();
    if(user != null) {
     
   
      try {
        Data param = getParam(request);
       
        param.add(0, "contentType", "R");
        param.add(0, "userIdx", user.getId());
        param.add(0, "ipAddr", getRemoteIP());
        System.out.println(param);
        long contentId = realEstateService.insert(param);
        result.add(0,"result", "OK");
       
        Data files = uploadFiles(request, contentId);
        //files.add(0,"contentId", contentId);
        System.out.println(files);
        param = null;
       
      } catch (Exception e) {
View Full Code Here

  }
 
  @RequestMapping(value="/update.do")
  public String updateContent(Model model) throws Exception {
   
    Data result = new Data();
    User user = getUser();
    if(user != null) {
      try {
        Data param = getParam();
        System.out.println(param);
       
        param.add(0, "userIdx", user.getId());
        realEstateService.update(param);
        result.add(0,"result", "OK");
       
      } catch (Exception e) {
        result.add(0,"result", "NO");
View Full Code Here

  }
 
  @RequestMapping(value="/list/{pageNumber}")
  public String listContent(@PathVariable("pageNumber") int pageNumber, Model model) throws Exception {
   
    Data param = getPageParam(pageNumber, pageSize);
    System.out.println(param);
    Data result = realEstateService.list(param);
    addXML(model, "result", result, "content");
    param = null;
    return path;
  }
View Full Code Here

    param = null;
    return path;
  }
  @RequestMapping(value="/view/{contentId}/{page}")
  public String viewContent(@PathVariable("contentId") long contentId, @PathVariable("page")int page, Model model) throws Exception {
    Data param = getPageParam(page, 20);
    User user = getUser();
    param.add(0, "contentId", contentId);
    param.add(0, "userIdx", user.getId());
    List<Data> result = realEstateService.select(param);
   
    Data fileResult = toFileData(result);
   
    //result.get(0).add("comment", result.get(2).toXMl("comment"));
    addXML(model, "result", fileResult, "content");
   
    param = null;
View Full Code Here

  public String create(Model model) throws Exception {
    if(!isLogin()) {
      return returnErrorMsg(model,  groupPathProp.getProperty("LOGIN_ERROR"));
    }
   
    Data param = getParam();
    User user= getUser();
    param.add(0, "userIdx", user.getId());
    if(text.isNull(param.getString(0,"groupId"))) {
      param = null;
      return returnErrorMsg(model, groupPathProp.getProperty("NO_GROUP_ID"));
    }
   
    if(text.isNull(param.getString(0,"pathName"))) {
      param = null;
      return returnErrorMsg(model, groupPathProp.getProperty("NO_PATH_NAME"));
    }
   
    Object result = groupPathService.insert(param);
View Full Code Here

  @Resource(name="commentService")
  CommentService commentService;
 
  @RequestMapping(value="/list/{contentId}/{pageNumber}")
  public String getList(@PathVariable long contentId, @PathVariable int pageNumber, Model model) throws Exception {
    Data param = getPageParam(pageNumber, pageSize);
    param.add(0,"contentId", contentId);
    Data result = commentService.list(param);
    addXML(model, "result", result, "commment");
    param = null;
    return path;
  }
View Full Code Here

  public String update(Model model) throws Exception {
    if(!isLogin()) {
      return returnErrorMsg(model,  groupPathProp.getProperty("LOGIN_ERROR"));
    }
   
    Data param = getParam();
    User user= getUser();
    param.add(0, "userIdx", user.getId());
    if(text.isNull(param.getString(0,"groupId"))) {
      param = null;
      return returnErrorMsg(model, groupPathProp.getProperty("NO_GROUP_ID"));
    }
   
    if(text.isNull(param.getString(0,"pathName"))) {
      param = null;
      return returnErrorMsg(model, groupPathProp.getProperty("NO_PATH_NAME"));
    }
   
    if(text.isNull(param.getString(0,"pathId"))) {
      param = null;
      return returnErrorMsg(model, groupPathProp.getProperty("NO_PATH_ID"));
    }
   
    groupPathService.update(param);
View Full Code Here

  }
 
 
  @RequestMapping(value="/subList/{contentId}/{commentId}/{pageNumber}")
  public String getSubList(@PathVariable long contentId, @PathVariable long commentId, @PathVariable int pageNumber, Model model) throws Exception {
    Data param = getPageParam(pageNumber, pageSize);
    param.add(0,"contentId", contentId);
    param.add(0,"parentCommentId", commentId);
    Data result = commentService.subList(param);
    addXML(model, "result", result, "comment");
    param = null;
    return path;
  }
View Full Code Here

    return path;
  }
 
  @RequestMapping(value="/create.do")
  public String createComment(Model model) throws Exception {
    Data result = new Data();
    User user = getUser();
    if(user != null) {
      try {
        Data param = getParam();
        param.add(0, "userIdx", user.getId());
        param.add(0, "ipAddr", getRemoteIP());
        commentService.craete(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.