package com.bocloud.ims.interfaces.resource.contentlibrary;

import org.springframework.web.bind.annotation.RequestBody;
import com.alibaba.fastjson.JSONObject;
import com.bocloud.cmp.model.ContentLibraryParam;
import com.bocloud.common.model.BocloudResult;
import com.bocloud.common.model.GridBean;
import com.bocloud.common.model.Pager;
import com.bocloud.common.model.RequestContext;
import com.bocloud.ims.entity.resource.contentlibrary.ContentLibrary;
import com.bocloud.ims.entity.resource.contentlibrary.ContentLibraryItem;

/**
 * 内容库数据访问
 *
 * @author wangyu
 * @version 5.0.0-SNAPSHOT
 * @since 2021/2/26
 */
public interface ContentLibraryService {

    /**
     * 查询列表
     *
     * @param pager
     * @param context
     * @return
     */
    BocloudResult<GridBean<ContentLibrary>> list(Pager pager, RequestContext context);

    /**
     * 查询内容库模板列表
     *
     * @param pager
     * @param context
     * @return
     */
    BocloudResult<GridBean<ContentLibraryItem>> listItems(Pager pager, RequestContext context);

    /**
     * 通过ovf部署云主机
     *
     * @param contentLibraryParam
     * @param context
     * @return
     */
    BocloudResult deploy(ContentLibraryParam contentLibraryParam, RequestContext context);

    /**
     * 查询内容库详情
     *
     * @param id
     * @return
     */
    BocloudResult<ContentLibrary> detail(Long id);

    /**
     * 查询内容库模板
     *
     * @param id
     * @return
     */
    BocloudResult<ContentLibraryItem> detailItem(Long id);

    /** @Author: lxy
     * @Description: 修改内容库模板密码
     * @Date 2021/5/25 14:45
     * @Param id
     * @param password
     * @param context
     * @return com.bocloud.common.model.BocloudResult
     * @throws:
     **/
    BocloudResult modifyAccount(Long id, String password, RequestContext context);
}
