git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/vre-management/VREModeler@18185 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
af6d9c50a5
commit
6091eac3ff
|
@ -1,5 +1,5 @@
|
||||||
package = org.gcube.vremanagement.vremodeler
|
package = org.gcube.vremanagement.vremodeler
|
||||||
lib.dir = Dependencies/VDLModeler
|
lib.dir = Dependencies/VREModeler
|
||||||
wsdl.1 = ModelerFactory
|
wsdl.1 = ModelerFactory
|
||||||
wsdl.2 = ModelerService
|
wsdl.2 = ModelerService
|
||||||
namespace.1=http://gcube-system.org/namespaces/vremanagement/vremodeler
|
namespace.1=http://gcube-system.org/namespaces/vremanagement/vremodeler
|
||||||
|
|
|
@ -18,7 +18,7 @@ import org.gcube.vremanagement.vremodeler.stubs.GetExistingNamesResponseMessage;
|
||||||
|
|
||||||
public class ModelFactoryService{
|
public class ModelFactoryService{
|
||||||
|
|
||||||
private GCUBELog logger = new GCUBELog(ModelFactoryService.class.getName());
|
private GCUBELog logger = new GCUBELog(ModelFactoryService.class);
|
||||||
private static final UUIDGen uuidGen = UUIDGenFactory.getUUIDGen();
|
private static final UUIDGen uuidGen = UUIDGenFactory.getUUIDGen();
|
||||||
|
|
||||||
protected ServiceContext getServiceContext() {
|
protected ServiceContext getServiceContext() {
|
||||||
|
@ -60,7 +60,7 @@ public class ModelFactoryService{
|
||||||
res= DBInterface.queryDB("select VRE.name from VRE;");
|
res= DBInterface.queryDB("select VRE.name from VRE;");
|
||||||
while (res.next())
|
while (res.next())
|
||||||
toReturn.add(res.getString(1));
|
toReturn.add(res.getString(1));
|
||||||
}catch(Exception e) {logger.error("VRE Model: error on DB"); throw new GCUBEFault(e);}
|
}catch(Exception e) {logger.error("error on DB"); throw new GCUBEFault(e);}
|
||||||
GetExistingNamesResponseMessage response = new GetExistingNamesResponseMessage();
|
GetExistingNamesResponseMessage response = new GetExistingNamesResponseMessage();
|
||||||
response.setNames(toReturn.toArray(new String[0]));
|
response.setNames(toReturn.toArray(new String[0]));
|
||||||
|
|
||||||
|
@ -122,21 +122,21 @@ public class ModelFactoryService{
|
||||||
*
|
*
|
||||||
* remove the DL instance
|
* remove the DL instance
|
||||||
*
|
*
|
||||||
* @param request the id of DL to remove
|
* @param request the id of VRE to remove
|
||||||
* @return void
|
* @return void
|
||||||
* @throws RemoteException -
|
* @throws RemoteException -
|
||||||
*/
|
*/
|
||||||
public void removeVRE(String id) throws GCUBEFault{
|
public VOID removeVRE(String id) throws GCUBEFault{
|
||||||
|
logger.trace("Deleting resource with id "+id);
|
||||||
try{
|
try{
|
||||||
ModelerContext pctx= ModelerContext.getPortTypeContext();
|
ModelerContext pctx= ModelerContext.getPortTypeContext();
|
||||||
logger.trace("Deleting resource with id "+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+"';");
|
||||||
pctx.getWSHome().remove(pctx.makeKey(id));
|
pctx.getWSHome().remove(pctx.makeKey(id));
|
||||||
|
return new VOID();
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
logger.error("VDLModel: "+e.getMessage());
|
logger.error("error removing resource",e);
|
||||||
|
throw new GCUBEFault(e);
|
||||||
throw new GCUBEFault( e);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue