Package com.iisigroup.cap.exception

Examples of com.iisigroup.cap.exception.CapMessageException


            // 代表要修改密碼
            passwordService.checkPasswordRule(code, password, confirm, true);
        }
        User user = userService.findUserByUserCode(code);
        if (user != null && !user.getOid().equals(oid)) {
            throw new CapMessageException(CapAppContext.getMessage(
                    "users.exist", new Object[] { code }), getClass());
        }
        String name = request.get("name");
        String email = request.get("email");
        String[] roleCodes = request.getParamsAsStringArray("roleCodes");
View Full Code Here


        String userId = CapSecurityContext.getUserId();
        if (passwordService.validatePassword(userId, password)) {
            passwordService.checkPasswordRule(userId, newPwd, confirm, false);
            passwordService.changeUserPassword(userId, newPwd);
        } else {
            throw new CapMessageException(
                    CapAppContext.getMessage("error.009"), getClass());
        }
        return new AjaxFormResult();
    }
View Full Code Here

    Function function = null;

    if (!CapString.isEmpty(code)) {
      function = functionSetService.findFunctionByCode(code);
      if (isNew.equals("true") && function != null) {
        throw new CapMessageException(
            CapAppContext.getMessage("js.data.exists"),
            FunctionSetHandler.class);
      }
    }
    functionSetService.save(function, request);
View Full Code Here

    if (!CapString.isEmpty(code)) {
      codeItem = functionSetService.findFunctionByCode(code);
    }
    if (codeItem == null) {
      throw new CapMessageException(
          CapAppContext.getMessage("EXCUE_ERROR"),
          RoleSetHandler.class);
    }

    List<RoleFunction> setRole = new ArrayList<RoleFunction>();
View Full Code Here

    AjaxFormResult result = new AjaxFormResult();
    String code = request.get("code");
    JSONArray roleItem = JSONArray.fromObject(request.get("roleItem"));

    if (CapString.isEmpty(code)) {
      throw new CapMessageException(
          CapAppContext.getMessage("EXCUE_ERROR"),
          RoleSetHandler.class);
    }

    List<String> delRole = new ArrayList<String>();
View Full Code Here

        Role role = null;

        if (!CapString.isEmpty(code)) {
            role = roleSetService.findRoleByCode(code);
            if (isNew.equals("true") && role != null) {
                throw new CapMessageException(
                        CapAppContext.getMessage("js.data.exists"),
                        RoleSetHandler.class);
            }
        } else {
            throw new CapMessageException(
                    CapAppContext.getMessage("EXCUE_ERROR"),
                    RoleSetHandler.class);
        }
        if (role == null) {
            role = new Role();
View Full Code Here

        if (!CapString.isEmpty(code)) {
            role = roleSetService.findRoleByCode(code);
        }
        if (role == null) {
            throw new CapMessageException(
                    CapAppContext.getMessage("EXCUE_ERROR"),
                    RoleSetHandler.class);
        }

        List<UserRole> list = new ArrayList<UserRole>();
View Full Code Here

        if (!CapString.isEmpty(code)) {
            role = roleSetService.findRoleByCode(code);
        }
        if (role == null) {
            throw new CapMessageException(
                    CapAppContext.getMessage("EXCUE_ERROR"),
                    RoleSetHandler.class);
        }

        List<RoleFunction> list = new ArrayList<RoleFunction>();
View Full Code Here

        AjaxFormResult result = new AjaxFormResult();
        String code = request.get("code");
        JSONArray users = JSONArray.fromObject(request.get("users"));

        if (CapString.isEmpty(code)) {
            throw new CapMessageException(
                    CapAppContext.getMessage("EXCUE_ERROR"),
                    RoleSetHandler.class);
        }

        List<String> delUsr = new ArrayList<String>();
View Full Code Here

        AjaxFormResult result = new AjaxFormResult();
        String code = request.get("code");
        JSONArray funcItem = JSONArray.fromObject(request.get("funcItem"));

        if (CapString.isEmpty(code)) {
            throw new CapMessageException(
                    CapAppContext.getMessage("EXCUE_ERROR"),
                    RoleSetHandler.class);
        }

        List<String> delFunc = new ArrayList<String>();
View Full Code Here

TOP

Related Classes of com.iisigroup.cap.exception.CapMessageException

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.