Aligned test with the updated model
This commit is contained in:
parent
232398202c
commit
fd23325977
|
@ -23,14 +23,14 @@ import org.gcube.informationsystem.resourceregistry.api.exceptions.AvailableInAn
|
||||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException;
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException;
|
||||||
import org.gcube.resourcemanagement.model.impl.entities.facets.AccessPointFacetImpl;
|
import org.gcube.resourcemanagement.model.impl.entities.facets.AccessPointFacetImpl;
|
||||||
import org.gcube.resourcemanagement.model.impl.entities.facets.NetworkingFacetImpl;
|
import org.gcube.resourcemanagement.model.impl.entities.facets.NetworkingFacetImpl;
|
||||||
import org.gcube.resourcemanagement.model.impl.entities.facets.ServiceStateFacetImpl;
|
|
||||||
import org.gcube.resourcemanagement.model.impl.entities.facets.SoftwareFacetImpl;
|
import org.gcube.resourcemanagement.model.impl.entities.facets.SoftwareFacetImpl;
|
||||||
|
import org.gcube.resourcemanagement.model.impl.entities.facets.StateFacetImpl;
|
||||||
import org.gcube.resourcemanagement.model.impl.entities.resources.EServiceImpl;
|
import org.gcube.resourcemanagement.model.impl.entities.resources.EServiceImpl;
|
||||||
import org.gcube.resourcemanagement.model.impl.relations.consistsof.IsIdentifiedByImpl;
|
import org.gcube.resourcemanagement.model.impl.relations.consistsof.IsIdentifiedByImpl;
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.facets.AccessPointFacet;
|
import org.gcube.resourcemanagement.model.reference.entities.facets.AccessPointFacet;
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.facets.NetworkingFacet;
|
import org.gcube.resourcemanagement.model.reference.entities.facets.NetworkingFacet;
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.facets.ServiceStateFacet;
|
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.facets.SoftwareFacet;
|
import org.gcube.resourcemanagement.model.reference.entities.facets.SoftwareFacet;
|
||||||
|
import org.gcube.resourcemanagement.model.reference.entities.facets.StateFacet;
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.resources.EService;
|
import org.gcube.resourcemanagement.model.reference.entities.resources.EService;
|
||||||
import org.gcube.resourcemanagement.model.reference.relations.consistsof.IsIdentifiedBy;
|
import org.gcube.resourcemanagement.model.reference.relations.consistsof.IsIdentifiedBy;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
@ -75,7 +75,7 @@ public class ServiceEndpointExporter extends GCoreResourceMapper<ServiceEndpoint
|
||||||
AccessPointFacet[] accessPointFacets = null;
|
AccessPointFacet[] accessPointFacets = null;
|
||||||
SoftwareFacet softwareFacet = null;
|
SoftwareFacet softwareFacet = null;
|
||||||
SoftwareFacet platformSoftwareFacet = null;
|
SoftwareFacet platformSoftwareFacet = null;
|
||||||
ServiceStateFacet serviceStateFacet = null;
|
StateFacet stateFacet = null;
|
||||||
NetworkingFacet networkingFacet = null;
|
NetworkingFacet networkingFacet = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -127,8 +127,8 @@ public class ServiceEndpointExporter extends GCoreResourceMapper<ServiceEndpoint
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(target instanceof ServiceStateFacet) {
|
if(target instanceof StateFacet) {
|
||||||
serviceStateFacet = (ServiceStateFacet) target;
|
stateFacet = (StateFacet) target;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -181,11 +181,11 @@ public class ServiceEndpointExporter extends GCoreResourceMapper<ServiceEndpoint
|
||||||
/* ----------------------------------------- */
|
/* ----------------------------------------- */
|
||||||
Runtime runTime = profile.runtime();
|
Runtime runTime = profile.runtime();
|
||||||
|
|
||||||
if(serviceStateFacet == null) {
|
if(stateFacet == null) {
|
||||||
serviceStateFacet = new ServiceStateFacetImpl();
|
stateFacet = new StateFacetImpl();
|
||||||
eService.addFacet(serviceStateFacet);
|
eService.addFacet(stateFacet);
|
||||||
}
|
}
|
||||||
serviceStateFacet.setValue(runTime.status());
|
stateFacet.setValue(runTime.status());
|
||||||
|
|
||||||
if(networkingFacet == null) {
|
if(networkingFacet == null) {
|
||||||
networkingFacet = new NetworkingFacetImpl();
|
networkingFacet = new NetworkingFacetImpl();
|
||||||
|
|
Loading…
Reference in New Issue