Switched api from string to UUID
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry-api@133660 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
b32581e8bc
commit
df1bce7a72
|
@ -3,6 +3,8 @@
|
|||
*/
|
||||
package org.gcube.informationsystem.resourceregistry.api;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.InternalException;
|
||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.context.ContextCreationException;
|
||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.context.ContextException;
|
||||
|
@ -13,14 +15,14 @@ import org.gcube.informationsystem.resourceregistry.api.exceptions.context.Conte
|
|||
*/
|
||||
public interface ContextManagement {
|
||||
|
||||
public String create(String parentContextUUID, String name) throws ContextCreationException, InternalException;
|
||||
public String create(UUID parentContext, String name) throws ContextCreationException, InternalException;
|
||||
|
||||
public String read(String contextUUID) throws ContextNotFoundException, ContextException;
|
||||
public String read(UUID context) throws ContextNotFoundException, ContextException;
|
||||
|
||||
public String rename(String contextUUID, String newName) throws ContextNotFoundException, ContextException;
|
||||
public String rename(UUID context, String newName) throws ContextNotFoundException, ContextException;
|
||||
|
||||
public String move(String newParentUUID, String contextToMoveUUID) throws ContextNotFoundException, ContextException;
|
||||
public String move(UUID newParent, UUID contextToMove) throws ContextNotFoundException, ContextException;
|
||||
|
||||
public String delete(String uuid) throws ContextNotFoundException, ContextException;
|
||||
public boolean delete(UUID context) throws ContextNotFoundException, ContextException;
|
||||
|
||||
}
|
|
@ -3,6 +3,8 @@
|
|||
*/
|
||||
package org.gcube.informationsystem.resourceregistry.api;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
|
||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.entity.EntityException;
|
||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.entity.FacetNotFoundException;
|
||||
|
@ -19,16 +21,16 @@ public interface EntityManagement {
|
|||
public String createFacet(String facetType, String jsonRepresentation)
|
||||
throws EntityException, ResourceRegistryException;
|
||||
|
||||
public String readFacet(String uuid) throws FacetNotFoundException,
|
||||
public String readFacet(UUID uuid) throws FacetNotFoundException,
|
||||
ResourceRegistryException;
|
||||
|
||||
public String readFacet(String uuid, String facetType)
|
||||
public String readFacet(UUID uuid, String facetType)
|
||||
throws FacetNotFoundException, ResourceRegistryException;
|
||||
|
||||
public String updateFacet(String uuid, String jsonRepresentation)
|
||||
public String updateFacet(UUID uuid, String jsonRepresentation)
|
||||
throws FacetNotFoundException, ResourceRegistryException;
|
||||
|
||||
public boolean deleteFacet(String uuid) throws FacetNotFoundException,
|
||||
public boolean deleteFacet(UUID uuid) throws FacetNotFoundException,
|
||||
ResourceRegistryException;
|
||||
|
||||
/* Resources Methods */
|
||||
|
@ -36,32 +38,32 @@ public interface EntityManagement {
|
|||
public String createResource(String resourceType, String jsonRepresentation)
|
||||
throws ResourceRegistryException;
|
||||
|
||||
public String readResource(String uuid) throws ResourceNotFoundException,
|
||||
public String readResource(UUID uuid) throws ResourceNotFoundException,
|
||||
ResourceRegistryException;
|
||||
|
||||
public String readResource(String uuid, String resourceType)
|
||||
public String readResource(UUID uuid, String resourceType)
|
||||
throws ResourceNotFoundException, ResourceRegistryException;
|
||||
|
||||
public boolean deleteResource(String uuid)
|
||||
public boolean deleteResource(UUID uuid)
|
||||
throws ResourceNotFoundException, ResourceRegistryException,
|
||||
ResourceRegistryException;
|
||||
|
||||
/* Relations Methods */
|
||||
|
||||
public String attachFacet(String resourceUUID, String facetUUID,
|
||||
public String attachFacet(UUID resourceUUID, UUID facetUUID,
|
||||
String consistOfType, String jsonRepresentation)
|
||||
throws FacetNotFoundException, ResourceNotFoundException,
|
||||
ResourceRegistryException;
|
||||
|
||||
public boolean detachFacet(String consistOfUUID)
|
||||
public boolean detachFacet(UUID consistOfUUID)
|
||||
throws ResourceRegistryException;
|
||||
|
||||
public String attachResource(String sourceResourceUUID,
|
||||
String targetResourceUUID, String relatedToType,
|
||||
public String attachResource(UUID sourceResourceUUID,
|
||||
UUID targetResourceUUID, String relatedToType,
|
||||
String jsonRepresentation) throws ResourceNotFoundException,
|
||||
ResourceRegistryException;
|
||||
|
||||
public boolean detachResource(String relatedToUUID)
|
||||
public boolean detachResource(UUID relatedToUUID)
|
||||
throws ResourceRegistryException;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue