git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/vre-management/VREModeler@8819 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
39940b5d73
commit
0345eb6ec2
|
@ -16,7 +16,7 @@ CREATE MEMORY TABLE VRERELATEDCOLLECTION(VREID VARCHAR NOT NULL,COLLID VARCHAR N
|
|||
CREATE MEMORY TABLE VRERELATEDGHN(VREID VARCHAR NOT NULL,GHNID VARCHAR NOT NULL,PRIMARY KEY(VREID,GHNID))
|
||||
CREATE MEMORY TABLE VRERELATEDCS(VREID VARCHAR NOT NULL,CSID VARCHAR NOT NULL,PRIMARY KEY(VREID,CSID))
|
||||
CREATE MEMORY TABLE VRERELATEDMETADATAFORMAT(VREID VARCHAR,COLLID VARCHAR,MFID VARCHAR)
|
||||
CREATE MEMORY TABLE SERVICES(ID INTEGER NOT NULL,NAME VARCHAR NOT NULL,CLASS VARCHAR NOT NULL,PRIMARY KEY(NAME,CLASS),CONSTRAINT SYS_FK_189 FOREIGN KEY(ID) REFERENCES FUNCTIONALITY(ID))
|
||||
CREATE MEMORY TABLE SERVICES(ID INTEGER NOT NULL,NAME VARCHAR NOT NULL,CLASS VARCHAR NOT NULL, VERSION VARCHAR NOT NULL, PRIMARY KEY(NAME,CLASS),CONSTRAINT SYS_FK_189 FOREIGN KEY(ID) REFERENCES FUNCTIONALITY(ID))
|
||||
CREATE MEMORY TABLE VRERELATEDFUNCT(VREID VARCHAR NOT NULL,FUNCID VARCHAR NOT NULL,PRIMARY KEY(VREID,FUNCID))
|
||||
CREATE MEMORY TABLE RELATEDSERVICEID(ID VARCHAR NOT NULL PRIMARY KEY,NAME VARCHAR NOT NULL,CLASS VARCHAR NOT NULL)
|
||||
CREATE MEMORY TABLE PORTLET(NAME VARCHAR NOT NULL PRIMARY KEY, PORTLETCLASS VARCHAR, PARENT VARCHAR)
|
||||
|
@ -51,12 +51,12 @@ INSERT INTO FUNCTIONALITY VALUES(15,'Information Object Editing','By selecting t
|
|||
INSERT INTO PORTLETRELTOFUNCT VALUES(0,'CollectionsNavigatorPortlet')
|
||||
INSERT INTO PORTLETRELTOFUNCT VALUES(0,'GSPortlet')
|
||||
INSERT INTO SERVICES VALUES(5,'ABE','Annotation')
|
||||
INSERT INTO SERVICES VALUES(0,'FilterXPathOperator','Search')
|
||||
INSERT INTO SERVICES VALUES(0,'JoinInnerOperatorService','Search')
|
||||
INSERT INTO SERVICES VALUES(0,'KeepTopOperatorService','Search')
|
||||
INSERT INTO SERVICES VALUES(0,'MergeOperator','Search')
|
||||
INSERT INTO SERVICES VALUES(3,'GoogleService','Search')
|
||||
INSERT INTO SERVICES VALUES(0,'ResultSetService','Search')
|
||||
INSERT INTO SERVICES VALUES(0,'SearchMaster','Search')
|
||||
INSERT INTO SERVICES VALUES(0,'SortOperatorService','Search')
|
||||
INSERT INTO SERVICES VALUES(0,'TransformXsltOperatorService','Search')
|
||||
INSERT INTO SERVICES VALUES(0,'FilterXPathOperator','Search','1.00.00')
|
||||
INSERT INTO SERVICES VALUES(0,'JoinInnerOperatorService','Search','1.00.00')
|
||||
INSERT INTO SERVICES VALUES(0,'KeepTopOperatorService','Search','1.00.00')
|
||||
INSERT INTO SERVICES VALUES(0,'MergeOperator','Search','1.00.00')
|
||||
INSERT INTO SERVICES VALUES(3,'GoogleService','Search','1.00.00')
|
||||
INSERT INTO SERVICES VALUES(0,'ResultSetService','Search','1.00.00')
|
||||
INSERT INTO SERVICES VALUES(0,'SearchMaster','Search','1.00.00')
|
||||
INSERT INTO SERVICES VALUES(0,'SortOperatorService','Search','1.00.00')
|
||||
INSERT INTO SERVICES VALUES(0,'TransformXsltOperatorService','Search','1.00.00')
|
||||
|
|
|
@ -14,6 +14,8 @@ import org.gcube.common.core.utils.logging.GCUBELog;
|
|||
import org.gcube.vremanagement.vremodeler.db.DBInterface;
|
||||
import org.gcube.vremanagement.vremodeler.impl.thread.DeployVRE;
|
||||
import org.gcube.vremanagement.vremodeler.impl.util.XMLUtil;
|
||||
import org.gcube.vremanagement.vremodeler.portallayout.CollectionResourceCreation;
|
||||
import org.gcube.vremanagement.vremodeler.portallayout.LayoutCreation;
|
||||
import org.gcube.vremanagement.vremodeler.stubs.CheckStatusResponse;
|
||||
import org.gcube.vremanagement.vremodeler.stubs.CollectionArray;
|
||||
import org.gcube.vremanagement.vremodeler.stubs.FunctionalityIDArray;
|
||||
|
@ -489,12 +491,23 @@ public class ModelerService {
|
|||
logger.error("HSQLDB Error "+e);
|
||||
throw new GCUBEUnrecoverableFault(e);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//only for test
|
||||
LayoutCreation lc= new LayoutCreation(resourceID, "TestScenarioPub");
|
||||
CollectionResourceCreation crc= new CollectionResourceCreation(resourceID, "TestScenarioPub");
|
||||
try {
|
||||
lc.createAndPublishLayout();
|
||||
crc.createAndPublish();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
/*
|
||||
DeployVRE deployVREThread= new DeployVRE(resourceID, ServiceContext.getContext().getScope() );
|
||||
ServiceContext.getContext().setScope(deployVREThread, ServiceContext.getContext().getScope());
|
||||
logger.trace("Deploy VRE thread started");
|
||||
deployVREThread.start();
|
||||
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -40,6 +40,7 @@ import org.gcube.vremanagement.vremodeler.impl.ModelerResource;
|
|||
import org.gcube.vremanagement.vremodeler.impl.ModelerService;
|
||||
import org.gcube.vremanagement.vremodeler.impl.util.Couple;
|
||||
import org.gcube.vremanagement.vremodeler.impl.util.VREManagerServiceHandler;
|
||||
import org.gcube.vremanagement.vremodeler.portallayout.CollectionResourceCreation;
|
||||
import org.gcube.vremanagement.vremodeler.portallayout.LayoutCreation;
|
||||
import org.globus.wsrf.ResourceException;
|
||||
import org.w3c.dom.Document;
|
||||
|
@ -80,10 +81,12 @@ public class DeployVRE extends Thread{
|
|||
if (!createVRE(GHNList, firstGHNId)){
|
||||
DBInterface.ExecuteUpdate("UPDATE VRE SET STATUS='"+ModelerService.DEPLOYED+"' WHERE VRE.id='"+this.resourceId+"';");
|
||||
LayoutCreation lc= new LayoutCreation(this.resourceId, this.vreName);
|
||||
CollectionResourceCreation crc= new CollectionResourceCreation(this.resourceId, this.vreName);
|
||||
try {
|
||||
lc.createAndPublishLayout();
|
||||
crc.createAndPublish();
|
||||
} catch (Exception e) {
|
||||
throw new Exception("Cannot create and publish the Layout Generic Resource",e);
|
||||
throw new Exception("Cannot create and publish the Layout Generic Resource and the CollectionScenarioInfo",e);
|
||||
}
|
||||
logger.info("Deploying of the VRE with id "+this.resourceId+" FINISHED");
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ public class CollectionResourceCreation {
|
|||
private String transformCollectionResource() throws Exception{
|
||||
ISClient client= GHNContext.getImplementation(ISClient.class);
|
||||
GCUBEGenericResourceQuery query= client.getQuery(GCUBEGenericResourceQuery.class);
|
||||
query.addAtomicConditions(new AtomicCondition("/Resource/Profile/Name","ScenarioCollectionInfo"), new AtomicCondition("/Resource/Profile/Body/DL/@name",ServiceContext.getContext().getScope().toString()));
|
||||
query.addAtomicConditions(new AtomicCondition("/Profile/Name","ScenarioCollectionInfo"), new AtomicCondition("/Profile/Body/DL/@name",ServiceContext.getContext().getScope().toString()));
|
||||
List<GCUBEGenericResource> list= client.execute(query, ServiceContext.getContext().getScope()) ;
|
||||
if (list.size()==0) throw new Exception("No GenericResource founded in IS");
|
||||
StringWriter sw= new StringWriter();
|
||||
|
|
Loading…
Reference in New Issue