Removed use of deprecated apis to use the new ones
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/is-exporter-se-plugin@160160 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
74a022f1e4
commit
1e5b09732b
|
@ -113,11 +113,11 @@ public abstract class GCoreResourceMapper<GR extends org.gcube.common.resources.
|
||||||
}
|
}
|
||||||
|
|
||||||
protected R create(R r) throws ResourceRegistryException {
|
protected R create(R r) throws ResourceRegistryException {
|
||||||
return resourceRegistryPublisher.createResource(rClass, r);
|
return resourceRegistryPublisher.createResource(r);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected R update(R r) throws ResourceRegistryException {
|
protected R update(R r) throws ResourceRegistryException {
|
||||||
return resourceRegistryPublisher.updateResource(rClass, r);
|
return resourceRegistryPublisher.updateResource(r);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected R read(UUID uuid) throws ResourceRegistryException {
|
protected R read(UUID uuid) throws ResourceRegistryException {
|
||||||
|
|
|
@ -113,7 +113,7 @@ public class GenericResourceExporter extends GCoreResourceMapper<GenericResource
|
||||||
try {
|
try {
|
||||||
SimpleFacet testSimpleFacet = new SimpleFacetImpl();
|
SimpleFacet testSimpleFacet = new SimpleFacetImpl();
|
||||||
testSimpleFacet.setAdditionalProperties(map);
|
testSimpleFacet.setAdditionalProperties(map);
|
||||||
SimpleFacet created = resourceRegistryPublisher.createFacet(SimpleFacet.class, testSimpleFacet);
|
SimpleFacet created = resourceRegistryPublisher.createFacet(testSimpleFacet);
|
||||||
resourceRegistryPublisher.deleteFacet(created);
|
resourceRegistryPublisher.deleteFacet(created);
|
||||||
simpleFacet.setAdditionalProperties(map);
|
simpleFacet.setAdditionalProperties(map);
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
|
|
|
@ -37,8 +37,7 @@ public class GenericResourceExporterTest extends ScopedTest {
|
||||||
ResourceRegistryClient client = ResourceRegistryClientFactory.create();
|
ResourceRegistryClient client = ResourceRegistryClientFactory.create();
|
||||||
ResourceRegistryPublisher publisher = ResourceRegistryPublisherFactory.create();
|
ResourceRegistryPublisher publisher = ResourceRegistryPublisherFactory.create();
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
List<Configuration> configurations = client.getInstances(Configuration.class, false);
|
||||||
List<Configuration> configurations = (List<Configuration>) client.getInstances(Configuration.NAME, false);
|
|
||||||
List<Configuration> failed = new ArrayList<>();
|
List<Configuration> failed = new ArrayList<>();
|
||||||
|
|
||||||
logger.debug("Going to delete {} {}s", configurations.size(), Configuration.NAME);
|
logger.debug("Going to delete {} {}s", configurations.size(), Configuration.NAME);
|
||||||
|
|
|
@ -37,8 +37,7 @@ public class ServiceEndpointExporterTest extends ScopedTest{
|
||||||
ResourceRegistryClient client = ResourceRegistryClientFactory.create();
|
ResourceRegistryClient client = ResourceRegistryClientFactory.create();
|
||||||
ResourceRegistryPublisher publisher = ResourceRegistryPublisherFactory.create();
|
ResourceRegistryPublisher publisher = ResourceRegistryPublisherFactory.create();
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
List<EService> eServices = client.getInstances(EService.class, false);
|
||||||
List<EService> eServices = (List<EService>) client.getInstances(EService.NAME, false);
|
|
||||||
List<EService> failed = new ArrayList<>();
|
List<EService> failed = new ArrayList<>();
|
||||||
|
|
||||||
logger.debug("Going to delete {} {}s",
|
logger.debug("Going to delete {} {}s",
|
||||||
|
|
Loading…
Reference in New Issue