git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/vre-management/VREModeler@6022 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
827e2a6e98
commit
557e61e482
|
@ -18,7 +18,7 @@
|
|||
<Class>VREManagement</Class>
|
||||
<Name>VREModeler</Name>
|
||||
</Service>
|
||||
<Package>Stubs</Package>
|
||||
<Package>VREModeler-stubs</Package>
|
||||
<Version>1.0.0</Version>
|
||||
<Scope level="GHN"/>
|
||||
<Optional>false</Optional>
|
||||
|
|
|
@ -9,9 +9,19 @@ import java.util.List;
|
|||
|
||||
import javax.xml.rpc.ServiceException;
|
||||
|
||||
import org.gcube.common.core.contexts.GHNContext;
|
||||
import org.gcube.common.core.faults.GCUBEFault;
|
||||
import org.gcube.common.core.informationsystem.client.AtomicCondition;
|
||||
import org.gcube.common.core.informationsystem.client.ISClient;
|
||||
import org.gcube.common.core.informationsystem.client.queries.GCUBERIQuery;
|
||||
import org.gcube.common.core.resources.GCUBERunningInstance;
|
||||
import org.gcube.common.core.types.VOID;
|
||||
import org.gcube.common.core.utils.logging.GCUBELog;
|
||||
import org.gcube.vremanagement.vremanager.stubs.vremanager.AddResourcesParameters;
|
||||
import org.gcube.vremanagement.vremanager.stubs.vremanager.OptionsParameters;
|
||||
import org.gcube.vremanagement.vremanager.stubs.vremanager.ResourceItem;
|
||||
import org.gcube.vremanagement.vremanager.stubs.vremanager.ResourceList;
|
||||
import org.gcube.vremanagement.vremanager.stubs.vremanager.ScopeOption;
|
||||
import org.gcube.vremanagement.vremanager.stubs.vremanager.VREManagerPortType;
|
||||
import org.gcube.vremanagement.vremanager.stubs.vremanager.service.VREManagerServiceAddressingLocator;
|
||||
import org.gcube.vremanagement.vremodeler.db.DBInterface;
|
||||
|
@ -445,12 +455,68 @@ public class ModelerService {
|
|||
}
|
||||
|
||||
VREManagerServiceAddressingLocator vreManAL= new VREManagerServiceAddressingLocator();
|
||||
VREManagerPortType vreManagerPT= null;
|
||||
try {
|
||||
VREManagerPortType vreManagerPT=vreManAL.getVREManagerPortTypePort();
|
||||
ISClient client= GHNContext.getImplementation(ISClient.class);
|
||||
GCUBERIQuery query=client.getQuery(GCUBERIQuery.class);
|
||||
query.addAtomicConditions(new AtomicCondition("//ServiceName", "VREManager"));
|
||||
query.addAtomicConditions(new AtomicCondition("//ServiceClass", "VREManagement"));
|
||||
List<GCUBERunningInstance> ris= client.execute(query, ServiceContext.getContext().getScope());
|
||||
|
||||
for (GCUBERunningInstance ri: ris){
|
||||
try{
|
||||
vreManagerPT=vreManAL.getVREManagerPortTypePort(ri.getAccessPoint().getEndpoint("gcube/vremanagement/VREManager"));
|
||||
|
||||
|
||||
} catch (ServiceException e) {
|
||||
throw new GCUBEFault(e);
|
||||
|
||||
|
||||
OptionsParameters ops=new OptionsParameters();
|
||||
ScopeOption[] scopeOptionList= new ScopeOption[6];
|
||||
ScopeOption soDesigner= new ScopeOption();
|
||||
soDesigner.setName("DESIGNER");
|
||||
scopeOptionList[0]= soDesigner;
|
||||
|
||||
ScopeOption soCreator= new ScopeOption();
|
||||
soCreator.setName("CREATOR");
|
||||
scopeOptionList[1]= soCreator;
|
||||
|
||||
ScopeOption soEndtime= new ScopeOption();
|
||||
soEndtime.setName("ENDTIME");
|
||||
scopeOptionList[2]= soEndtime;
|
||||
|
||||
ScopeOption soStarttime= new ScopeOption();
|
||||
soStarttime.setName("STARTTIME");
|
||||
scopeOptionList[3]= soStarttime;
|
||||
|
||||
ScopeOption soDescription= new ScopeOption();
|
||||
soDescription.setName("DESCRIPTION");
|
||||
scopeOptionList[4]= soDescription;
|
||||
|
||||
ScopeOption soDisplayname= new ScopeOption();
|
||||
soDisplayname.setName("DISPLAYNAME");
|
||||
scopeOptionList[5]= soDisplayname;
|
||||
|
||||
ops.setScopeOptionList(scopeOptionList);
|
||||
vreManagerPT.setScopeOptions(ops);
|
||||
|
||||
//ResourceItem resItem= new ResourceItem();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
AddResourcesParameters addRParams= new AddResourcesParameters();
|
||||
ResourceList rList= new ResourceList();
|
||||
ResourceItem[] resItems=new ResourceItem[10];
|
||||
ResourceItem resItem;
|
||||
|
||||
}catch(Exception e){logger.debug("trying next ri");}
|
||||
}
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new GCUBEFault("cannot retrieve VREManager");
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue