コード例 #1
0
ファイル: RoleAction.java プロジェクト: noasoso/lemon
  public void exportExcel() throws Exception {
    List<PropertyFilter> propertyFilters =
        PropertyFilter.buildFromHttpRequest(ServletActionContext.getRequest());
    page = roleManager.pagedQuery(page, propertyFilters);

    List<Role> roles = (List<Role>) page.getResult();
    TableModel tableModel = new TableModel();
    tableModel.setName("role");
    tableModel.addHeaders("id", "name", "descn");
    tableModel.setData(roles);
    exportor.exportExcel(ServletActionContext.getResponse(), tableModel);
  }
コード例 #2
0
ファイル: AclSidAction.java プロジェクト: quansia/lemon
  public void exportExcel() throws Exception {
    List<PropertyFilter> propertyFilters =
        PropertyFilter.buildFromHttpRequest(ServletActionContext.getRequest());
    page = aclSidManager.pagedQuery(page, propertyFilters);

    List<AclSid> aclSids = (List<AclSid>) page.getResult();

    TableModel tableModel = new TableModel();
    tableModel.setName("AclSid");
    tableModel.addHeaders("id");
    tableModel.setData(aclSids);
    exportor.exportExcel(ServletActionContext.getResponse(), tableModel);
  }
コード例 #3
0
  @RequestMapping("perm-type-export")
  public void export(
      @ModelAttribute Page page,
      @RequestParam Map<String, Object> parameterMap,
      HttpServletRequest request,
      HttpServletResponse response)
      throws Exception {
    List<PropertyFilter> propertyFilters = PropertyFilter.buildFromMap(parameterMap);
    page = permTypeManager.pagedQuery(page, propertyFilters);

    List<PermType> permTypees = (List<PermType>) page.getResult();
    TableModel tableModel = new TableModel();
    tableModel.setName("permType");
    tableModel.addHeaders("id", "type", "value", "perm.name", "priority", "app.name");
    tableModel.setData(permTypees);
    exportor.export(request, response, tableModel);
  }
コード例 #4
0
  @RequestMapping("bpm-category-export")
  public void export(
      @ModelAttribute Page page,
      @RequestParam Map<String, Object> parameterMap,
      HttpServletRequest request,
      HttpServletResponse response)
      throws Exception {
    List<PropertyFilter> propertyFilters = PropertyFilter.buildFromMap(parameterMap);
    page = bpmCategoryManager.pagedQuery(page, propertyFilters);

    List<BpmCategory> bpmCategories = (List<BpmCategory>) page.getResult();
    TableModel tableModel = new TableModel();
    tableModel.setName("bpm-category");
    tableModel.addHeaders("id", "name");
    tableModel.setData(bpmCategories);
    exportor.export(request, response, tableModel);
  }
コード例 #5
0
  @RequestMapping("portal-widget-export")
  public void export(
      @ModelAttribute Page page,
      @RequestParam Map<String, Object> parameterMap,
      HttpServletRequest request,
      HttpServletResponse response)
      throws Exception {
    List<PropertyFilter> propertyFilters = PropertyFilter.buildFromMap(parameterMap);
    page = portalWidgetManager.pagedQuery(page, propertyFilters);

    List<PortalWidget> portalWidgets = (List<PortalWidget>) page.getResult();

    TableModel tableModel = new TableModel();
    tableModel.setName("portal base");
    tableModel.addHeaders("id", "client", "server", "resource");
    tableModel.setData(portalWidgets);
    exportor.export(request, response, tableModel);
  }
コード例 #6
0
  @RequestMapping("party-entity-export")
  public void export(
      @ModelAttribute Page page,
      @RequestParam Map<String, Object> parameterMap,
      HttpServletRequest request,
      HttpServletResponse response)
      throws Exception {
    List<PropertyFilter> propertyFilters = PropertyFilter.buildFromMap(parameterMap);
    page = partyEntityManager.pagedQuery(page, propertyFilters);

    List<PartyEntity> partyEntities = (List<PartyEntity>) page.getResult();
    List<PartyEntityDTO> partyDtos = partyEntityConverter.createPartyEntityDtos(partyEntities);
    TableModel tableModel = new TableModel();
    tableModel.setName("party entity");
    tableModel.addHeaders("id", "type", "code", "name");
    tableModel.setData(partyDtos);
    exportor.export(request, response, tableModel);
  }
コード例 #7
0
  @RequestMapping("whitelist-type-export")
  public void export(
      @ModelAttribute Page page,
      @RequestParam Map<String, Object> parameterMap,
      HttpServletRequest request,
      HttpServletResponse response)
      throws Exception {
    String tenantId = tenantHolder.getTenantId();
    List<PropertyFilter> propertyFilters = PropertyFilter.buildFromMap(parameterMap);
    propertyFilters.add(new PropertyFilter("EQS_tenantId", tenantId));
    page = whitelistTypeManager.pagedQuery(page, propertyFilters);

    List<WhitelistType> whitelistTypes = (List<WhitelistType>) page.getResult();

    TableModel tableModel = new TableModel();
    tableModel.setName("whitelistType");
    tableModel.addHeaders("id", "name");
    tableModel.setData(whitelistTypes);
    exportor.export(request, response, tableModel);
  }