gCore-0.5.0 refactoring
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/vre-management/VREModeler@11862 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
1bd753b3e7
commit
8f71c7c245
|
@ -11,7 +11,7 @@
|
||||||
<Main>
|
<Main>
|
||||||
<Description>Allows user to create new VRE</Description>
|
<Description>Allows user to create new VRE</Description>
|
||||||
<Name>VREModeler-service</Name>
|
<Name>VREModeler-service</Name>
|
||||||
<Version>1.0.0</Version>
|
<Version>1.00.01</Version>
|
||||||
<Dependencies>
|
<Dependencies>
|
||||||
<Dependency>
|
<Dependency>
|
||||||
<Service>
|
<Service>
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
<Version>1.0.0</Version>
|
<Version>1.0.0</Version>
|
||||||
</Service>
|
</Service>
|
||||||
<Package>VREModeler-stubs</Package>
|
<Package>VREModeler-stubs</Package>
|
||||||
<Version>1.0.0</Version>
|
<Version>[1.00.00,1.02.00)</Version>
|
||||||
<Scope level="GHN"/>
|
<Scope level="GHN"/>
|
||||||
<Optional>false</Optional>
|
<Optional>false</Optional>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
|
@ -31,18 +31,7 @@
|
||||||
<Version>1.0.0</Version>
|
<Version>1.0.0</Version>
|
||||||
</Service>
|
</Service>
|
||||||
<Package>VREManager-stubs</Package>
|
<Package>VREManager-stubs</Package>
|
||||||
<Version>1.00.02</Version>
|
<Version>[1.00.02,1.02.00)</Version>
|
||||||
<Scope level="GHN"/>
|
|
||||||
<Optional>false</Optional>
|
|
||||||
</Dependency>
|
|
||||||
<Dependency>
|
|
||||||
<Service>
|
|
||||||
<Class>MetadataManagement</Class>
|
|
||||||
<Name>MetadataBroker</Name>
|
|
||||||
<Version>1.0.0</Version>
|
|
||||||
</Service>
|
|
||||||
<Package>MetadataBrokerStubs</Package>
|
|
||||||
<Version>1.00.04</Version>
|
|
||||||
<Scope level="GHN"/>
|
<Scope level="GHN"/>
|
||||||
<Optional>false</Optional>
|
<Optional>false</Optional>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
|
|
|
@ -6,23 +6,21 @@ import org.apache.axis.components.uuid.UUIDGen;
|
||||||
import org.apache.axis.components.uuid.UUIDGenFactory;
|
import org.apache.axis.components.uuid.UUIDGenFactory;
|
||||||
import org.apache.axis.message.addressing.EndpointReferenceType;
|
import org.apache.axis.message.addressing.EndpointReferenceType;
|
||||||
import org.gcube.common.core.faults.GCUBEFault;
|
import org.gcube.common.core.faults.GCUBEFault;
|
||||||
import org.gcube.common.core.porttypes.GCUBEStartupPortType;
|
|
||||||
import org.gcube.common.core.types.VOID;
|
import org.gcube.common.core.types.VOID;
|
||||||
import org.gcube.common.core.utils.logging.GCUBELog;
|
import org.gcube.common.core.utils.logging.GCUBELog;
|
||||||
import org.gcube.vremanagement.vremodeler.db.DBInterface;
|
import org.gcube.vremanagement.vremodeler.db.DBInterface;
|
||||||
import org.gcube.vremanagement.vremodeler.impl.util.XMLUtil;
|
import org.gcube.vremanagement.vremodeler.impl.util.XMLUtil;
|
||||||
import org.gcube.vremanagement.vremodeler.stubs.GetExistingNamesResponseMessage;
|
import org.gcube.vremanagement.vremodeler.stubs.GetExistingNamesResponseMessage;
|
||||||
import org.globus.wsrf.tests.basic.CreateResource;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class ModelFactoryService extends GCUBEStartupPortType{
|
|
||||||
|
public class ModelFactoryService{
|
||||||
|
|
||||||
private GCUBELog logger = new GCUBELog(ModelFactoryService.class.getName());
|
private GCUBELog logger = new GCUBELog(ModelFactoryService.class.getName());
|
||||||
private static final UUIDGen uuidGen = UUIDGenFactory.getUUIDGen();
|
private static final UUIDGen uuidGen = UUIDGenFactory.getUUIDGen();
|
||||||
|
|
||||||
@Override
|
|
||||||
protected ServiceContext getServiceContext() {
|
protected ServiceContext getServiceContext() {
|
||||||
return ServiceContext.getContext();
|
return ServiceContext.getContext();
|
||||||
}
|
}
|
||||||
|
@ -33,7 +31,7 @@ public class ModelFactoryService extends GCUBEStartupPortType{
|
||||||
* @return the EndpointReference pointing to the resource
|
* @return the EndpointReference pointing to the resource
|
||||||
* @throws GCUBEFault if something fails
|
* @throws GCUBEFault if something fails
|
||||||
*/
|
*/
|
||||||
public EndpointReferenceType createResource(CreateResource request) throws GCUBEFault {
|
public EndpointReferenceType createResource() throws GCUBEFault {
|
||||||
String id=uuidGen.nextUUID();
|
String id=uuidGen.nextUUID();
|
||||||
logger.trace("resource "+id+" created");
|
logger.trace("resource "+id+" created");
|
||||||
ModelerResource mr;
|
ModelerResource mr;
|
||||||
|
@ -146,7 +144,7 @@ public class ModelFactoryService extends GCUBEStartupPortType{
|
||||||
System.out.println("Deleting resource "+id);
|
System.out.println("Deleting resource "+id);
|
||||||
//destroy the resource;
|
//destroy the resource;
|
||||||
DBInterface.ExecuteUpdate("DELETE FROM VRE where VRE.id='"+id+"';");
|
DBInterface.ExecuteUpdate("DELETE FROM VRE where VRE.id='"+id+"';");
|
||||||
mr.remove();
|
pctx.getWSHome().remove(pctx.makeKey(id));
|
||||||
|
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
logger.error("VDLModel: "+e.getMessage());
|
logger.error("VDLModel: "+e.getMessage());
|
||||||
|
|
|
@ -21,9 +21,8 @@ public class ServiceContext extends GCUBEServiceContext{
|
||||||
try{
|
try{
|
||||||
logger.info("ready event invoked on " + this.getName());
|
logger.info("ready event invoked on " + this.getName());
|
||||||
this.intializeDB();
|
this.intializeDB();
|
||||||
ModelerContext.getPortTypeContext().getWSHome().checkResourceScope();
|
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
this.setStatus(Status.FAILED, true);
|
this.setStatus(Status.FAILED);
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,10 +17,10 @@ import org.gcube.common.core.faults.GCUBEFault;
|
||||||
import org.gcube.common.core.resources.GCUBECollection;
|
import org.gcube.common.core.resources.GCUBECollection;
|
||||||
import org.gcube.common.core.resources.GCUBEGenericResource;
|
import org.gcube.common.core.resources.GCUBEGenericResource;
|
||||||
import org.gcube.common.core.resources.GCUBEMCollection;
|
import org.gcube.common.core.resources.GCUBEMCollection;
|
||||||
import org.gcube.common.core.resources.impl.kxml.KGCUBEResource;
|
|
||||||
import org.gcube.common.core.scope.GCUBEScope;
|
import org.gcube.common.core.scope.GCUBEScope;
|
||||||
import org.gcube.common.core.utils.handlers.GCUBEServiceClientImpl;
|
import org.gcube.common.core.utils.handlers.GCUBEServiceClientImpl;
|
||||||
import org.gcube.common.core.utils.logging.GCUBELog;
|
import org.gcube.common.core.utils.logging.GCUBELog;
|
||||||
|
import org.gcube.common.resources.kxml.KGCUBEResource;
|
||||||
import org.gcube.vremanagement.vremanager.stubs.vremanager.AddResourcesParameters;
|
import org.gcube.vremanagement.vremanager.stubs.vremanager.AddResourcesParameters;
|
||||||
import org.gcube.vremanagement.vremanager.stubs.vremanager.OptionsParameters;
|
import org.gcube.vremanagement.vremanager.stubs.vremanager.OptionsParameters;
|
||||||
import org.gcube.vremanagement.vremanager.stubs.vremanager.ResourceItem;
|
import org.gcube.vremanagement.vremanager.stubs.vremanager.ResourceItem;
|
||||||
|
|
|
@ -12,7 +12,6 @@ import org.gcube.common.core.informationsystem.client.queries.GCUBERIQuery;
|
||||||
import org.gcube.common.core.resources.GCUBERunningInstance;
|
import org.gcube.common.core.resources.GCUBERunningInstance;
|
||||||
import org.gcube.common.core.scope.GCUBEScope;
|
import org.gcube.common.core.scope.GCUBEScope;
|
||||||
import org.gcube.common.core.types.VOID;
|
import org.gcube.common.core.types.VOID;
|
||||||
import org.gcube.vremanagement.vremodeler.stubs.CheckStatusResponse;
|
|
||||||
import org.gcube.vremanagement.vremodeler.stubs.CollectionArray;
|
import org.gcube.vremanagement.vremodeler.stubs.CollectionArray;
|
||||||
import org.gcube.vremanagement.vremodeler.stubs.FunctionalityIDArray;
|
import org.gcube.vremanagement.vremodeler.stubs.FunctionalityIDArray;
|
||||||
import org.gcube.vremanagement.vremodeler.stubs.GHNArray;
|
import org.gcube.vremanagement.vremodeler.stubs.GHNArray;
|
||||||
|
|
Loading…
Reference in New Issue