【仅供内部供应商使用,不提供对外解答和培训】

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

一、特殊名词介绍

二、接口/方法/对象源码——【FineReport V10 2018-07-30】

Code Block
languagejava
themeEclipse
firstline1
titleBaseOutputAction.java
linenumberstrue
package com.fr.schedule.base.bean.output;

import com.fr.schedule.base.bean.BaseBean;
import com.fr.schedule.base.bean.Format;
import com.fr.schedule.base.entity.AbstractScheduleEntity;
import com.fr.schedule.base.entity.output.BaseOutputActionEntity;
import com.fr.schedule.base.type.RunType;
import com.fr.third.fasterxml.jackson.annotation.JsonTypeInfo;

import java.util.List;


/**
 * Created by Zed on 2017/12/19.
 * 定时任务导出操作(FTP,邮件,消息...)
 */
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class")
public abstract class BaseOutputAction extends BaseBean {

    private static final long serialVersionUID = 4416898314814719397L;
    private String actionName = null;
    private String resultURL = null;
    private String outputId = null;

    public BaseOutputAction() {
        setActionName(getClass().getName());
    }

    public abstract boolean willExecuteByUser();

    public abstract RunType runType();

    public abstract Class<? extends AbstractScheduleEntity> outputActionEntityClass();

    public abstract AbstractScheduleEntity createOutputActionEntity();

    public BaseOutputAction id(String id) {
        setId(id);
        return this;
    }

    @Override
    public BaseOutputActionEntity createEntity() {
        return new BaseOutputActionEntity()
                .id(this.getId())
                .actionName(this.getActionName())
                .executeByUser(this.willExecuteByUser())
                .resultURL(this.getResultURL())
                .runType(this.runType())
                .outputId(this.getOutputId());
    }

    public String getActionName() {
        return actionName;
    }

    public void setActionName(String actionName) {
        this.actionName = actionName;
    }

    public BaseOutputAction actionName(String actionName) {
        setActionName(actionName);
        return this;
    }

    public String getResultURL() {
        return resultURL;
    }

    public void setResultURL(String resultURL) {
        this.resultURL = resultURL;
    }

    public BaseOutputAction resultURL(String resultURL) {
        setResultURL(resultURL);
        return this;
    }

    public String getOutputId() {
        return outputId;
    }

    public void setOutputId(String outputId) {
        this.outputId = outputId;
    }

    public BaseOutputAction outputId(String outputId) {
        setOutputId(outputId);
        return this;
    }

    public void modifyFormats(List<Format> formats) {

    }
}


三、接口/方法/对象说明

类名虽然叫Action,但是实际上已经不具备Action的能力了,目前版本中仅仅作为定时任务附件处理功能的配置信息的载体存在,也就是只是一个bean的作用。不论是新客户端扩展还是本身产品的附件处理调整,都是通过这个对象进行扩展的。

四、常用链接

com.fr.schedule.base.provider.OutputFormulaProvider

五、开源案例

免责声明:所有文档中的开源示例,均为开发者自行开发并提供。仅用于参考和学习使用,开发者和官方均无义务对开源案例所涉及的所有成果进行教学和指导。若作为商用一切后果责任由使用者自行承担。