Package com.ketayao.ketacustom.entity.main

Examples of com.ketayao.ketacustom.entity.main.DataControl


  }
 
  @ModelAttribute("preloadDataControl")
  public DataControl preload(@RequestParam(value = "id", required = false) Long id) {
    if (id != null) {
      DataControl dataControl = dataControlService.get(id);
      return dataControl;
    }
    return null;
  }
View Full Code Here


  }
 
  @RequiresPermissions("DataControl:edit")
  @RequestMapping(value="/update/{id}", method=RequestMethod.GET)
  public String preUpdate(@PathVariable Long id, Map<String, Object> map) {
    DataControl dataControl = dataControlService.get(id);
    map.put("dataControl", dataControl);
    return UPDATE;
  }
View Full Code Here

  @Log(message="批量删除了id={0}数据权限。")
  @RequiresPermissions("DataControl:delete")
  @RequestMapping(value="/delete", method=RequestMethod.POST)
  public @ResponseBody String deleteMany(Long[] ids) {
    for (int i = 0; i < ids.length; i++) {
      DataControl dataControl = dataControlService.get(ids[i]);
      dataControlService.delete(dataControl.getId());
    }
   
    LogUitls.putArgs(LogMessageObject.newWrite().setObjects(new Object[]{Arrays.toString(ids)}));
    return AjaxObject.newOk("数据权限删除成功!").setCallbackType("").toString();
  }
View Full Code Here

  }
 
  @RequiresPermissions("DataControl:view")
  @RequestMapping(value="/view/{id}", method={RequestMethod.GET})
  public String view(@PathVariable Long id, Map<String, Object> map) {
    DataControl dataControl = dataControlService.get(id);
    map.put("dataControl", dataControl);
    return VIEW;
  }
View Full Code Here

       
        shiroUser.getHasModules().put(resource, permission.getModule());
       
        StringBuilder dcBuilder = new StringBuilder();
        for (RolePermissionDataControl rpdc : rolePermission.getRolePermissionDataControls()) {
          DataControl dataControl = rpdc.getDataControl();
          dcBuilder.append(dataControl.getName() + ",");
         
          shiroUser.getHasDataControls().put(dataControl.getName(), dataControl);
        }
       
        if (dcBuilder.length() > 0) {
          builder.append(":" + dcBuilder.substring(0, dcBuilder.length() - 1));
        }
View Full Code Here

* @since   2013年12月20日 上午11:38:54
*/
public class ToStringTest {
  @Test
  public void test() {
    DataControl dataControl = new DataControl();
   
    dataControl.setId(1L);
    dataControl.setName("测试下数据");
    dataControl.setDescription("仅仅是描述");
    dataControl.setControl("条件测试");
   
    List<RolePermissionDataControl> rolePermissionDataControls = new ArrayList<RolePermissionDataControl>();
    RolePermissionDataControl rolePermissionDataControl = new RolePermissionDataControl();
    rolePermissionDataControl.setDataControl(dataControl);
    rolePermissionDataControl.setId(2L);
   
    RolePermission rolePermission = new RolePermission();
    rolePermission.setId(3L);
    rolePermissionDataControl.setRolePermission(rolePermission);
   
    rolePermissionDataControls.add(rolePermissionDataControl);
    dataControl.setRolePermissionDataControls(rolePermissionDataControls);
   
    System.out.println(dataControl);
   
  }
View Full Code Here

    String[] m = moduleString.split(PERMISSION_DIVIDER_TOKEN);
    for (String sn : m) {
      String[] d = dataControlString.split(PERMISSION_DIVIDER_TOKEN);
      for (String name : d) {
       
        DataControl dataControl = SecurityUtils.getShiroUser().getHasDataControls().get(name);
        if (dataControl == null) {
          continue;
        }
       
        // EQ_user.id=#userId, EQ_user.id_OR=2, id=#id
        String control = dataControl.getControl();
        Map<String, Object> controlMap = new HashMap<String, Object>();
        try {
          DataControlXML xml = (DataControlXML)unmarshaller.unmarshal(new StringReader(control));
          for (Condition c : xml.getItems()) {
            controlMap.put(c.getName(), c.getContent());
View Full Code Here

TOP

Related Classes of com.ketayao.ketacustom.entity.main.DataControl

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.