package com.yihu.hos.resource.service;


import com.yihu.hos.web.framework.model.DataGridResult;
import com.yihu.hos.web.framework.model.Result;
import com.yihu.hos.web.framework.model.TreeResult;
import com.yihu.hos.resource.model.RsAppResourceDetail;
import com.yihu.hos.resource.model.RsResource;
import com.yihu.hos.resource.model.RsResourceDataset;
import com.yihu.hos.resource.model.RsResourceMetadata;
import com.yihu.hos.resource.viewresult.RsResourceDeatilModel;
import com.yihu.hos.resource.viewresult.RsResourceDimensionModel;

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

/**
 * Created by chenweida on 2015/12/15.
 */
public interface IRsResourceService {
    List<TreeResult> getResourceTreeList(String name) throws Exception;

    DataGridResult getResourceList(Map<String, Object> conditionMap, Integer page, Integer rows) throws Exception;

    int getResourceListCount(Map<String, Object> conditionMap) throws Exception;

    RsResourceDeatilModel getRsResourceDeatilModel(String id) throws Exception;

    void updateRsResource(RsResource rs) throws Exception;

    void createRsResource(RsResource rs) throws Exception;

    void deleteResource(String id) throws Exception;

    DataGridResult getResourceFiled(Map<String, Object> conditionMap, Integer page, Integer rows) throws Exception;

    List<TreeResult> resourceCategoryTreeList(String name) throws Exception;

    String searchRomoteResourceList(String code, Map<String, Object> params) throws Exception;

    Result getDataSet(Map<String, Object> params) throws Exception;

    Result improtAllMetadata(RsResourceDataset dataset, String reourceId) throws Exception;

    Result deleteMetadata(String id) throws Exception;

    RsResourceMetadata getRsResourceMetadata(String id) throws Exception;

    Result createMetaData(RsResourceMetadata rmd) throws Exception;

    Result updateMetaData(RsResourceMetadata rmd) throws Exception;

    Result getMetaDataByDatasetId(String code, String datasetId) throws Exception;

    Result improtSameMetadata(String reourceId, String metaData, String dataset, String datasetId) throws Exception;

    RsResourceDataset getLocalDataSetById(String datasetId) throws Exception;

    Result getMetadataByLocalDatssetId(String datasetId) throws Exception;

    Result getResourceAuthorize(String resourceId, String appID) throws Exception;

    Result getMetaData(Map<String, Object> params) throws Exception;

    Result getResourceApp(String id) throws Exception;

    Result updateResourceApp(String ids, String resourceId) throws Exception;

    Result getResourceAppList(String resourceId) throws Exception;

    Result changeAppResource(String flag, String appId, String ids, String resourceId) throws Exception;

    List<RsResourceDimensionModel> getDimensionByResourceId(String resourceId) throws Exception;

    RsAppResourceDetail getAppResourceDetailId(String id) throws Exception;

    Result saveResourceDimension(RsAppResourceDetail appResourceDetail) throws Exception;

    List<RsResourceMetadata>  getResourceMetadataListColumn(String code) throws Exception;
}
