package ink.wgink.module.activiti.service.activiti;

import ink.wgink.module.activiti.pojo.vos.ActivitiVO;
import ink.wgink.pojo.result.SuccessResultList;
import org.activiti.engine.repository.Model;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.List;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: IActivitiService
 * @Description: activiti
 * @Author: WangGeng
 * @Date: 2021/7/11 16:46
 * @Version: 1.0
 **/
public interface IActivitiService {

    /**
     * 新建模型
     *
     * @param activitiVO
     * @return
     * @throws UnsupportedEncodingException
     */
    String create(ActivitiVO activitiVO) throws UnsupportedEncodingException;

    /**
     * 删除模型
     *
     * @param modelId 模型ID
     */
    void delete(String modelId);


    /**
     * 发布模型
     *
     * @param modelId
     */
    void publish(String modelId) throws IOException;

    /**
     * 撤销发布模型
     *
     * @param modelId
     */
    void revokePublish(String modelId);

    /**
     * 模型列表
     *
     * @return
     */
    List<Model> list();

    /**
     * 模型分页列表
     *
     * @param page
     * @param rows
     * @return
     */
    SuccessResultList<List<Model>> listPage(int page, int rows);


}
