Package org.beangle.model.transfer.exporter

Examples of org.beangle.model.transfer.exporter.Context


    if (StringUtils.isEmpty(fileName)) {
      fileName = "exportResult";
    }

    // 配置导出上下文
    Context context = new Context();
    context.put("format", format);
    context.put("exportFile", fileName);
    context.put("template", template);
    String properties = get("properties");
    if (null != properties) {
      String[] props = StringUtils.split(properties, ",");
      List<String> keys = CollectUtils.newArrayList();
      List<String> titles = CollectUtils.newArrayList();
      for (String prop : props) {
        keys.add(StringUtils.substringBefore(prop, ":"));
        titles.add(getTextInternal(StringUtils.substringAfter(prop, ":")));
      }
      context.put(Context.KEYS, StrUtils.join(keys, ","));
      context.put(Context.TITLES, StrUtils.join(titles, ","));
    } else {
      context.put(Context.KEYS, get("keys"));
      context.put(Context.TITLES, get("titles"));
    }
    context.put(Context.EXTRACTOR, getPropertyExtractor());

    HttpServletResponse response = ServletActionContext.getResponse();
    Exporter exporter = buildExporter(context);
    exporter.getWriter().setOutputStream(response.getOutputStream());
    configExporter(exporter, context);
View Full Code Here


    if (StringUtils.isEmpty(fileName)) {
      fileName = "exportResult";
    }

    // 配置导出上下文
    Context context = new Context();
    context.put("format", format);
    context.put("exportFile", fileName);
    context.put("template", template);
    context.put(Context.KEYS, get("keys"));
    context.put(Context.TITLES, get("titles"));
    context.put(Context.EXTRACTOR, getPropertyExtractor());

    HttpServletResponse response = ServletActionContext.getResponse();
    Exporter exporter = buildExporter(context);
    exporter.getWriter().setOutputStream(response.getOutputStream());
    configExporter(exporter, context);
View Full Code Here

    if (StringUtils.isEmpty(fileName)) {
      fileName = "exportResult";
    }

    // 配置导出上下文
    Context context = new Context();
    context.put("format", format);
    context.put("exportFile", fileName);
    context.put("template", template);
    String properties = get("properties");
    if (null != properties) {
      String[] props = StringUtils.split(properties, ",");
      List<String> keys = CollectUtils.newArrayList();
      List<String> titles = CollectUtils.newArrayList();
      for (String prop : props) {
        keys.add(StringUtils.substringBefore(prop, ":"));
        titles.add(getTextInternal(StringUtils.substringAfter(prop, ":")));
      }
      context.put(Context.KEYS, StrUtils.join(keys, ","));
      context.put(Context.TITLES, StrUtils.join(titles, ","));
    } else {
      context.put(Context.KEYS, get("keys"));
      context.put(Context.TITLES, get("titles"));
    }
    context.put(Context.EXTRACTOR, getPropertyExtractor());

    HttpServletResponse response = ServletActionContext.getResponse();
    Exporter exporter = buildExporter(context);
    exporter.getWriter().setOutputStream(response.getOutputStream());
    configExporter(exporter, context);
View Full Code Here

TOP

Related Classes of org.beangle.model.transfer.exporter.Context

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.