Update to the new IS and gCube models. Upgrade dependency on resource-registry-context-client to 2.1.0-SNAPSHOT.

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@177157 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Manuele Simi 2019-02-15 04:08:05 +00:00
parent 9111ff85d8
commit b7ef1dd99f
8 changed files with 30 additions and 34 deletions

View File

@ -74,6 +74,12 @@
<artifactId>resource-registry-client</artifactId>
</dependency>
<dependency>
<groupId>org.gcube.information-system</groupId>
<artifactId>resource-registry-context-client</artifactId>
<version>2.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.gcube.core</groupId>
<artifactId>common-events</artifactId>
@ -127,12 +133,6 @@
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.gcube.information-system</groupId>
<artifactId>resource-registry-context-client</artifactId>
<version>2.0.0-SNAPSHOT</version>
</dependency>
<!-- Runtime Dependency -->
<dependency>
<groupId>org.glassfish.jersey.media</groupId>

View File

@ -1,8 +1,8 @@
package org.gcube.resourcemanagement.manager.webapp.context;
import org.gcube.informationsystem.model.impl.utils.ISMapper;
import org.gcube.informationsystem.model.reference.entity.Context;
import org.gcube.informationsystem.model.reference.entities.Context;
import org.gcube.informationsystem.utils.ISMapper;
/**

View File

@ -3,8 +3,8 @@ package org.gcube.resourcemanagement.manager.webapp.context;
import java.util.Objects;
import org.gcube.common.gxrest.response.outbound.LocalCodeException;
import org.gcube.informationsystem.model.reference.entity.Context;
import org.gcube.informationsystem.model.reference.relation.IsParentOf;
import org.gcube.informationsystem.model.reference.entities.Context;
import org.gcube.informationsystem.model.reference.relations.IsParentOf;
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
import org.gcube.informationsystem.resourceregistry.api.exceptions.context.ContextAlreadyPresentException;
import org.gcube.resourcemanagement.manager.io.rs.RMCreateContextCode;

View File

@ -2,8 +2,8 @@ package org.gcube.resourcemanagement.manager.webapp.context;
import java.util.UUID;
import org.gcube.informationsystem.model.reference.entity.Context;
import org.gcube.informationsystem.model.reference.entity.Resource;
import org.gcube.informationsystem.model.reference.entities.Context;
import org.gcube.informationsystem.model.reference.entities.Resource;
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
import org.gcube.informationsystem.resourceregistry.client.ResourceRegistryClient;
import org.gcube.informationsystem.resourceregistry.client.ResourceRegistryClientFactory;
@ -44,7 +44,7 @@ final class Queries {
/**
* Tests if the given context exists
*
* @param uuid
* @param context
* @return
*/
protected boolean contextExists(UUID context) {

View File

@ -12,9 +12,10 @@ import javax.ws.rs.core.Response;
import org.gcube.common.authorization.library.provider.CalledMethodProvider;
import org.gcube.common.gxrest.response.outbound.GXOutboundErrorResponse;
import org.gcube.common.gxrest.response.outbound.GXOutboundSuccessResponse;
import org.gcube.informationsystem.model.reference.entity.Context;
import static org.gcube.resourcemanagement.manager.io.rs.RMContextsAccess.*;
import org.gcube.informationsystem.model.reference.entities.Context;
import org.gcube.resourcemanagement.manager.webapp.ResourceInitializer;
import org.gcube.resourcemanagement.manager.webapp.context.CreateRequest;
import org.gcube.resourcemanagement.manager.webapp.context.DeleteRequest;
@ -26,7 +27,7 @@ import java.util.UUID;
/**
* Resource methods for {@link Context}.
* Resource methods for {@link org.gcube.informationsystem.model.reference.entities.Context}.
*
* @author Manuele Simi (ISTI-CNR)
*

View File

@ -17,19 +17,15 @@ import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.xml.bind.Unmarshaller;
import org.gcube.common.authorization.library.provider.CalledMethodProvider;
import org.gcube.common.gxrest.response.outbound.GXOutboundErrorResponse;
import org.gcube.common.gxrest.response.outbound.GXOutboundSuccessResponse;
import org.gcube.informationsystem.model.impl.entity.ContextImpl;
import org.gcube.informationsystem.model.impl.utils.ISMapper;
import org.gcube.informationsystem.model.reference.entity.Context;
import org.gcube.informationsystem.model.impl.entities.ContextImpl;
import org.gcube.informationsystem.model.reference.entities.Context;
import org.gcube.informationsystem.utils.ISMapper;
import org.gcube.resourcemanagement.manager.io.rs.RMContextDoesNotExistException;
import org.gcube.resourcemanagement.manager.webapp.ResourceInitializer;
import org.gcube.resourcemanagement.manager.webapp.context.ContextHolder;
import org.gcube.resourcemanagement.manager.webapp.context.CreateRequest;
import org.gcube.resourcemanagement.manager.webapp.context.ResponseFromResourceRegistry;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

@ -16,7 +16,7 @@ import org.gcube.common.authorization.client.exceptions.ObjectNotFound;
import org.gcube.common.authorization.library.AuthorizationEntry;
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.informationsystem.model.reference.entity.Context;
import org.gcube.informationsystem.model.reference.entities.Context;
import org.gcube.informationsystem.resourceregistry.client.ResourceRegistryClient;
import org.gcube.informationsystem.resourceregistry.client.ResourceRegistryClientImpl;
import org.gcube.informationsystem.resourceregistry.context.ResourceRegistryContextClient;
@ -100,7 +100,7 @@ public class QueriesTest {
}
/**
* Test method for {@link org.gcube.resourcemanagement.manager.webapp.context.Queries#fetchContext(UUID, client)}.
* Test method for {@link org.gcube.resourcemanagement.manager.webapp.context.Queries#fetchContext(UUID)} .
*/
@Test
public void testFetchContext() {
@ -110,11 +110,10 @@ public class QueriesTest {
ResourceRegistryClient rclient = new ResourceRegistryClientImpl(RR);
Queries queries = new Queries(cclient, rclient);
Context context = queries.fetchContext(context1UUID);
if (Objects.nonNull(context)) {
assertNotNull("Context does not exist.", context);
assertEquals("Unexpected uuid for context", context1UUID, context.getHeader().getUUID());
}
}
}

View File

@ -21,11 +21,11 @@ import org.gcube.common.gxrest.response.inbound.GXInboundResponse;
import org.gcube.common.gxrest.response.outbound.CodeFinder;
import org.gcube.common.gxrest.response.outbound.ErrorCode;
import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.informationsystem.model.impl.entity.ContextImpl;
import org.gcube.informationsystem.model.impl.utils.ISMapper;
import org.gcube.informationsystem.model.reference.entity.Context;
import org.gcube.informationsystem.model.impl.entities.ContextImpl;
import org.gcube.informationsystem.model.reference.entities.Context;
import org.gcube.informationsystem.resourceregistry.context.ResourceRegistryContextClient;
import org.gcube.informationsystem.resourceregistry.context.ResourceRegistryContextClientImpl;
import org.gcube.informationsystem.utils.ISMapper;
import org.gcube.resourcemanagement.manager.io.rs.RMCreateContextCode;
import org.gcube.resourcemanagement.manager.io.rs.RMContextsAccess;
import org.gcube.resourcemanagement.manager.webapp.rs.RMContexts;
@ -139,7 +139,7 @@ public class RMContextTest extends JerseyTest {
/**
* Test method for
* {@link org.gcube.resourcemanagement.manager.webapp.rs.RMContexts#create(String)}.
* {@link org.gcube.resourcemanagement.manager.webapp.rs.RMContexts#create(String, String)}.
*
* @throws Exception
*/
@ -184,7 +184,7 @@ public class RMContextTest extends JerseyTest {
/**
* Test method for
* {@link org.gcube.resourcemanagement.manager.webapp.rs.RMContexts#create(java.lang.String)}
* {@link org.gcube.resourcemanagement.manager.webapp.rs.RMContexts#create(String, String)}
* when the parent does not exist.
*/
@Test
@ -213,7 +213,7 @@ public class RMContextTest extends JerseyTest {
/**
* Test method for
* {@link org.gcube.resourcemanagement.manager.webapp.rs.RMContexts#create(java.lang.String)}
* {@link org.gcube.resourcemanagement.manager.webapp.rs.RMContexts#create(String, String)}.
* when the parent does not exist.
*/
@Test