package com.bocloud.ims.interfaces.resource;

import com.bocloud.common.model.BocloudResult;
import com.bocloud.common.model.Pager;
import com.bocloud.common.model.RequestContext;
import com.bocloud.ims.entity.resource.ObjectStorageContainer;
import com.bocloud.ims.entity.resource.ObjectStorageItem;

import java.io.InputStream;
import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2017/9/4.
 */
public interface ObjectStorageService {

	BocloudResult<List<Map<String, Object>>> listContainer(Pager pager, RequestContext context);

	BocloudResult create(ObjectStorageContainer container, RequestContext context);

	BocloudResult<ObjectStorageContainer> detailContainer(Long containerId, RequestContext context);

	BocloudResult removeContainer(Long id, RequestContext context);

	BocloudResult listItems(Long containerId, String path, RequestContext context);

	BocloudResult create(ObjectStorageItem item, RequestContext context, String invokerPath);

	BocloudResult<ObjectStorageItem> detailItem(Long containerId, RequestContext context);

	BocloudResult removeItem(Long id, Long containerId, String path, RequestContext context);

	BocloudResult<List<ObjectStorageItem>> getTreeView(Long containerId, String name, RequestContext context);

	InputStream download(Long id, RequestContext context);

}
