package eu.dnetlib.actionmanager.rmi;

import java.util.List;

import javax.jws.WebParam;
import javax.jws.WebService;

import eu.dnetlib.actionmanager.common.Agent;
import eu.dnetlib.actionmanager.common.Operation;
import eu.dnetlib.actionmanager.common.Provenance;
import eu.dnetlib.actionmanager.set.ActionManagerSet;
import eu.dnetlib.common.rmi.BaseService;

@WebService
public interface ActionManagerService extends BaseService {
	String createSet(@WebParam(name = "set") ActionManagerSet set) throws ActionManagerException;

	List<ActionManagerSet> ListSets() throws ActionManagerException;

	int createAction(
			@WebParam(name = "ruleId") String splitRuleId,
			@WebParam(name = "set") String set,
			@WebParam(name = "agent") Agent agent,
			@WebParam(name = "operation") Operation operation,
			@WebParam(name = "infopackage") String infoPackage,
			@WebParam(name = "provenance") Provenance provenance,
			@WebParam(name = "trust") String trust,
			@WebParam(name = "nsprefix") String nsprefix) throws ActionManagerException;

	int updateAction(
			@WebParam(name = "actionId") String actionId,
			@WebParam(name = "ruleId") String splitRuleId,
			@WebParam(name = "set") String set,
			@WebParam(name = "agent") Agent agent,
			@WebParam(name = "operation") Operation operation,
			@WebParam(name = "infopackage") String infoPackage,
			@WebParam(name = "provenance") Provenance provenance,
			@WebParam(name = "trust") String trust,
			@WebParam(name = "nsprefix") String nsprefix) throws ActionManagerException;

	boolean deleteAction(@WebParam(name = "actionId") String actionId) throws ActionManagerException;

	List<String> getActionsByAgent(@WebParam(name = "agentId") String agentId, @WebParam(name = "limit") int limit) throws ActionManagerException;

}
