|
|
|
@ -23,14 +23,14 @@ import org.gcube.informationsystem.resourceregistry.api.exceptions.AvailableInAn
|
|
|
|
|
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.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.StateFacetImpl;
|
|
|
|
|
import org.gcube.resourcemanagement.model.impl.entities.resources.EServiceImpl;
|
|
|
|
|
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.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.StateFacet;
|
|
|
|
|
import org.gcube.resourcemanagement.model.reference.entities.resources.EService;
|
|
|
|
|
import org.gcube.resourcemanagement.model.reference.relations.consistsof.IsIdentifiedBy;
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
@ -75,7 +75,7 @@ public class ServiceEndpointExporter extends GCoreResourceMapper<ServiceEndpoint
|
|
|
|
|
AccessPointFacet[] accessPointFacets = null;
|
|
|
|
|
SoftwareFacet softwareFacet = null;
|
|
|
|
|
SoftwareFacet platformSoftwareFacet = null;
|
|
|
|
|
ServiceStateFacet serviceStateFacet = null;
|
|
|
|
|
StateFacet stateFacet = null;
|
|
|
|
|
NetworkingFacet networkingFacet = null;
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
@ -127,8 +127,8 @@ public class ServiceEndpointExporter extends GCoreResourceMapper<ServiceEndpoint
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(target instanceof ServiceStateFacet) {
|
|
|
|
|
serviceStateFacet = (ServiceStateFacet) target;
|
|
|
|
|
if(target instanceof StateFacet) {
|
|
|
|
|
stateFacet = (StateFacet) target;
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -181,11 +181,11 @@ public class ServiceEndpointExporter extends GCoreResourceMapper<ServiceEndpoint
|
|
|
|
|
/* ----------------------------------------- */
|
|
|
|
|
Runtime runTime = profile.runtime();
|
|
|
|
|
|
|
|
|
|
if(serviceStateFacet == null) {
|
|
|
|
|
serviceStateFacet = new ServiceStateFacetImpl();
|
|
|
|
|
eService.addFacet(serviceStateFacet);
|
|
|
|
|
if(stateFacet == null) {
|
|
|
|
|
stateFacet = new StateFacetImpl();
|
|
|
|
|
eService.addFacet(stateFacet);
|
|
|
|
|
}
|
|
|
|
|
serviceStateFacet.setValue(runTime.status());
|
|
|
|
|
stateFacet.setValue(runTime.status());
|
|
|
|
|
|
|
|
|
|
if(networkingFacet == null) {
|
|
|
|
|
networkingFacet = new NetworkingFacetImpl();
|
|
|
|
|