Package com.isfasiel.main.domain

Examples of com.isfasiel.main.domain.User


  protected User getUser() {
    return loginInfoProvider.get().currentUser();
  }
 
  protected boolean isLogin() {
    User user = loginInfoProvider.get().currentUser();
    if(user == null) {
      return false;
    } else {
      user = null;
      return true;
View Full Code Here


   
    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

    }
    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

    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");
    }
   
View Full Code Here

    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;
View Full Code Here

  }

  @Override
  public void validate(Object target, Errors errors) {
    Login login = (Login)target;
    User inputUser = new User(login);
   
    User user = userService.login(inputUser);
    if (user == null) {
      errors.reject("invalidLogin", "Invalid Login");
    }
    else {
      LoginInfo loginInfo = loginInfoProvider.get();
View Full Code Here

  }
 
  @RequestMapping(value="/create.do" ,method=RequestMethod.POST)
  public String create(@ModelAttribute User user, Model model) throws Exception{
    user.setPassword(encode(user.getPassword()) );
    User result = userService.createUser(user);
    String path = "user/created";
   
    model.addAttribute("userIdx", result == null ? -1 : result.getId());
    result = null;
    user = null;
    return path;
  }
View Full Code Here

    this.loginInfoProvider = loginInfoProvider;
  }
 
  @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

    addXML(model, "result", result, "watch");
    return path;
  }
  @RequestMapping(value="/delete.do")
  public String deleteWatch(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.deleteWatch(param);
        result.add(0, "result", "OK");
        param = null;
      } catch (Exception e) {
        e.printStackTrace();
View Full Code Here

    return path;
  }
 
  @RequestMapping(value="/list.do")
  public String delteWatch(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());
        result = watchService.listWatch(param);
        param = null;
      } catch (Exception e) {
        e.printStackTrace();
        result = new Data();
View Full Code Here

TOP

Related Classes of com.isfasiel.main.domain.User

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.