package com.bocloud.ims.interfaces.topology;

import com.bocloud.common.model.BocloudResult;
import com.bocloud.common.model.Param;
import com.bocloud.ims.entity.topology.Instance;
import com.bocloud.ims.entity.topology.InstanceMq;

import java.util.List;
import java.util.Map;

/**
 * Instance service层
 *
 * @author lyy
 * @Version 1.0
 * @since 2017年10月16日
 */
public interface InstanceService {

    /**
     * @param page
     * @param rows
     * @param params
     * @param sorter
     * @param simple
     * @param userId
     * @param showTitle
     * @return
     */
    public BocloudResult list(int page, int rows, List<Param> params, Map<String, String> sorter, Boolean simple,
                              Long userId, Boolean showTitle);

    /**
     * 创建
     *
     * @param instance
     * @param user
     * @return
     */
    public BocloudResult create(Instance instance, Long user);

    /**
     * 修改
     *
     * @param instance
     * @param user
     * @return
     */
    public BocloudResult modify(Instance instance, Long user);

    /**
     * 删除
     *
     * @param userId
     * @param id
     * @return
     */
    public BocloudResult remove(Long id, Long userId);

    /**
     * 详情
     *
     * @param id
     * @return
     */
    public BocloudResult detail(Long id);

    /**
     * 监听到的mq消息
     *
     * @param instance4mq
     * @return
     */
    public void receive(InstanceMq instance4mq);
}
