2016-09-14 18:08:46 +02:00
|
|
|
package org.gcube.informationsystem.resourceregistry.publisher.proxy;
|
|
|
|
|
2016-11-14 16:36:13 +01:00
|
|
|
import java.util.UUID;
|
|
|
|
|
2016-09-14 18:08:46 +02:00
|
|
|
import org.gcube.informationsystem.model.entity.Facet;
|
|
|
|
import org.gcube.informationsystem.model.entity.Resource;
|
|
|
|
import org.gcube.informationsystem.model.relation.ConsistsOf;
|
|
|
|
import org.gcube.informationsystem.model.relation.IsRelatedTo;
|
2016-11-14 16:36:13 +01:00
|
|
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
|
|
|
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.context.ContextNotFoundException;
|
2016-11-29 08:27:30 +01:00
|
|
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.entity.facet.FacetNotFoundException;
|
|
|
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.entity.resource.ResourceNotFoundException;
|
2016-09-14 18:08:46 +02:00
|
|
|
|
2016-10-12 14:36:27 +02:00
|
|
|
/**
|
|
|
|
* @author Luca Frosini (ISTI - CNR)
|
|
|
|
*/
|
2016-09-14 18:08:46 +02:00
|
|
|
public interface ResourceRegistryPublisher {
|
2016-11-14 16:36:13 +01:00
|
|
|
|
2016-09-14 18:08:46 +02:00
|
|
|
public <F extends Facet> F createFacet(Class<F> facetClass, F facet);
|
2016-11-14 16:36:13 +01:00
|
|
|
|
2016-09-15 17:24:24 +02:00
|
|
|
public <F extends Facet> F updateFacet(Class<F> facetClass, F facet);
|
2016-11-14 16:36:13 +01:00
|
|
|
|
2016-09-15 14:57:14 +02:00
|
|
|
public <F extends Facet> boolean deleteFacet(F facet);
|
2016-11-14 16:36:13 +01:00
|
|
|
|
|
|
|
public <R extends Resource> R createResource(Class<R> resourceClass,
|
|
|
|
R resource);
|
2016-11-28 12:49:27 +01:00
|
|
|
|
|
|
|
public <R extends Resource> R updateResource(Class<R> resourceClass, R resource);
|
|
|
|
|
2016-09-15 14:57:14 +02:00
|
|
|
public <R extends Resource> boolean deleteResource(R resource);
|
2016-09-14 18:08:46 +02:00
|
|
|
|
2016-11-14 16:36:13 +01:00
|
|
|
public <C extends ConsistsOf<? extends Resource, ? extends Facet>> C createConsistsOf(
|
|
|
|
Class<C> consistsOfClass, C consistsOf);
|
|
|
|
|
|
|
|
public <C extends ConsistsOf<? extends Resource, ? extends Facet>> boolean deleteConsistsOf(
|
|
|
|
C consistsOf);
|
|
|
|
|
|
|
|
public <I extends IsRelatedTo<? extends Resource, ? extends Resource>> I createIsRelatedTo(
|
|
|
|
Class<I> isRelatedToClass, I isRelatedTo);
|
|
|
|
|
|
|
|
public <I extends IsRelatedTo<? extends Resource, ? extends Resource>> boolean deleteIsRelatedTo(
|
|
|
|
I isRelatedTo);
|
|
|
|
|
|
|
|
public boolean addResourceToContext(UUID uuid)
|
|
|
|
throws ResourceNotFoundException, ContextNotFoundException,
|
|
|
|
ResourceRegistryException;
|
|
|
|
|
|
|
|
public <R extends Resource> boolean addResourceToContext(R resource)
|
|
|
|
throws ResourceNotFoundException, ContextNotFoundException,
|
|
|
|
ResourceRegistryException;
|
|
|
|
|
|
|
|
public boolean addFacetToContext(UUID uuid) throws FacetNotFoundException,
|
|
|
|
ContextNotFoundException, ResourceRegistryException;
|
|
|
|
|
|
|
|
public <F extends Facet> boolean addFacetToContext(F facet)
|
|
|
|
throws FacetNotFoundException, ContextNotFoundException,
|
|
|
|
ResourceRegistryException;
|
2016-09-14 18:08:46 +02:00
|
|
|
|
2016-12-21 16:29:37 +01:00
|
|
|
|
|
|
|
public boolean removeResourceFromContext(UUID uuid)
|
|
|
|
throws ResourceNotFoundException, ContextNotFoundException,
|
|
|
|
ResourceRegistryException;
|
|
|
|
|
|
|
|
public <R extends Resource> boolean removeResourceFromContext(R resource)
|
|
|
|
throws ResourceNotFoundException, ContextNotFoundException,
|
|
|
|
ResourceRegistryException;
|
|
|
|
|
|
|
|
public boolean removeFacetFromContext(UUID uuid) throws FacetNotFoundException,
|
|
|
|
ContextNotFoundException, ResourceRegistryException;
|
|
|
|
|
|
|
|
public <F extends Facet> boolean removeFacetFromContext(F facet)
|
|
|
|
throws FacetNotFoundException, ContextNotFoundException,
|
|
|
|
ResourceRegistryException;
|
2016-09-14 18:08:46 +02:00
|
|
|
}
|