Package com.iisigroup.cap.auth.model

Examples of com.iisigroup.cap.auth.model.Function


            if (levels == null) {
                levels = new HashSet<Integer>();
                roleSteps.get(levels);
            }
            for (Integer auth : entry.getValue().keySet()) {
                Function code = getFuncsBySysType(sysType).get(auth);
                if (code == null)
                    continue;
                String key = getRoleStepKey(role, code.getLevel());
                List<Function> stepCodes = roleLevelCodes.get(key);
                if (stepCodes == null) {
                    stepCodes = new LinkedList<Function>();
                    roleLevelCodes.put(key, stepCodes);
                }
                stepCodes.add(code);
                levels.add(code.getLevel());
            }
            roleSteps.put(role, levels);
        }
        return roleLevelCodes;
    }
View Full Code Here


  }// ;

  public IResult queryForm(IRequest request) {
    AjaxFormResult result = new AjaxFormResult();
    String code = request.get("code");
    Function function = null;

    if (!CapString.isEmpty(code)) {
      function = functionSetService.findFunctionByCode(code);
    }

    if (function != null) {
      result.putAll(new AjaxFormResult(function.toJSONObject(
          CapEntityUtil.getColumnName(function), null)));
    }

    return result;
  }// ;
View Full Code Here

   */
  public IResult save(IRequest request) {
    AjaxFormResult result = new AjaxFormResult();
    String code = request.get("code");
    String isNew = request.get("isNew");
    Function function = null;

    if (!CapString.isEmpty(code)) {
      function = functionSetService.findFunctionByCode(code);
      if (isNew.equals("true") && function != null) {
        throw new CapMessageException(
View Full Code Here

   */
  public IResult saveRfList(IRequest request) {
    AjaxFormResult result = new AjaxFormResult();
    String code = request.get("code");
    JSONArray roleItem = JSONArray.fromObject(request.get("roleItem"));
    Function codeItem = null;

    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>();
    if (roleItem != null) {
      for (Object item : roleItem) {
        JSONObject role = (JSONObject) item;
        RoleFunction rlf = new RoleFunction();
        rlf.setRoleCode(role.getString("code"));
        rlf.setFuncCode(Integer.toString(codeItem.getCode()));
        rlf.setUpdater(CapSecurityContext.getUserId());
        rlf.setUpdateTime(CapDate.getCurrentTimestamp());
        setRole.add(rlf);
      }
    }
View Full Code Here

   * @return {@link tw.com.iisi.cap.response.IResult}
   * @throws CapException
   */
  public IResult delete(IRequest request) {
    AjaxFormResult result = new AjaxFormResult();
    Function code = functionSetService.findFunctionByCode(request.get("code"));
    if (code != null) {
      commonSrv.delete(code);
    }
    return result;
  }// ;
View Full Code Here

*/
public class FunctionRowMapper implements RowMapper<Function> {

    @Override
    public Function mapRow(ResultSet rs, int rowNum) throws SQLException {
        Function item = new Function();
        item.setCode(rs.getInt("CODE"));
        item.setSysType(rs.getString("SYSTYPE"));
        item.setSequence(rs.getInt("SEQUENCE"));
        item.setLevel(rs.getInt("LEVEL"));
        item.setParent(rs.getInt("PARENT"));
        item.setName(rs.getString("NAME"));
        item.setPath(rs.getString("PATH"));
        item.setDesc(rs.getString("DESC"));
        item.setStatus(rs.getString("STATUS"));
        item.setUpdater(rs.getString("UPDATER"));
        item.setUpdateTime(rs.getTimestamp("UPDATETIME"));
        return item;
    }
View Full Code Here

    }// ;

    @Override
    public void save(Function function, IRequest request) {
        if (function == null) {
            function = new Function();
        }
        CapBeanUtil.map2Bean(request, function, Function.class);
        function.setUpdater(CapSecurityContext.getUserId());
        function.setUpdateTime(CapDate.getCurrentTimestamp());
        functionDao.save(function);
View Full Code Here

TOP

Related Classes of com.iisigroup.cap.auth.model.Function

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.