resource-registry-context-c.../src/main/java/org/gcube/informationsystem/resourceregistry/contexts/ResourceRegistryContextClie...

50 lines
2.0 KiB
Java
Raw Normal View History

package org.gcube.informationsystem.resourceregistry.contexts;
import java.util.List;
import java.util.UUID;
import org.gcube.informationsystem.contexts.reference.entities.Context;
2023-11-09 19:04:36 +01:00
import org.gcube.informationsystem.resourceregistry.api.contexts.ContextCache;
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
import org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextAlreadyPresentException;
import org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException;
/**
* @author Luca Frosini (ISTI - CNR)
*/
public interface ResourceRegistryContextClient {
2023-03-01 14:24:04 +01:00
public void addHeader(String name, String value);
2023-11-09 19:04:36 +01:00
public ContextCache getContextCache();
2022-02-09 12:23:55 +01:00
public List<Context> all() throws ResourceRegistryException;
2020-11-04 19:34:07 +01:00
public Context create(Context context) throws ContextAlreadyPresentException, ResourceRegistryException;
public String create(String context) throws ContextAlreadyPresentException, ResourceRegistryException;
public Context read(Context context) throws ContextNotFoundException, ResourceRegistryException;
2022-02-09 12:23:55 +01:00
public boolean exist(UUID uuid) throws ResourceRegistryException;
public boolean exist(String uuid) throws ResourceRegistryException;
2020-11-04 19:34:07 +01:00
public Context read(UUID uuid) throws ContextNotFoundException, ResourceRegistryException;
public String read(String uuid) throws ContextNotFoundException, ResourceRegistryException;
public Context readCurrentContext() throws ContextNotFoundException, ResourceRegistryException;
2021-09-13 12:24:04 +02:00
public Context update(Context context) throws ContextNotFoundException, ResourceRegistryException;
2020-11-04 19:34:07 +01:00
2021-09-13 12:24:04 +02:00
public String update(String context) throws ContextNotFoundException, ResourceRegistryException;
2020-11-04 19:34:07 +01:00
public boolean delete(Context context) throws ContextNotFoundException, ResourceRegistryException;
public boolean delete(UUID uuid) throws ContextNotFoundException, ResourceRegistryException;
public boolean delete(String uuid) throws ContextNotFoundException, ResourceRegistryException;
}