git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/vre-management/VREModeler@9859 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
8721e2beaf
commit
0d690cb16b
|
@ -119,7 +119,7 @@ public class IStoDBUtil {
|
|||
try{
|
||||
if (queryClient==null) queryClient= GHNContext.getImplementation(ISClient.class);
|
||||
GCUBEGenericResourceQuery query= queryClient.getQuery(GCUBEGenericResourceQuery.class);
|
||||
query.addGenericCondition("$result/Profile/SecondType/string() eq 'UserProfile' or $result/Profile/SecondType/string() eq 'Schemas Searchable Fields' or $result/Profile/SecondType/string() eq 'MetadataXSLT' or $result/Profile/SecondType/string() eq 'PresentationXSLT'");
|
||||
query.addGenericCondition("$result/Profile/SecondaryType/string() eq 'UserProfile' or $result/Profile/SecondaryType/string() eq 'MetadataXSLT' or $result/Profile/SecondaryType/string() eq 'PresentationXSLT'");
|
||||
genericResourcesList= queryClient.execute(query, scope);
|
||||
}catch(Exception e ){logger.error("Error queryng IS"); throw new GCUBEFault(e); }
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ import org.gcube.vremanagement.vremodeler.db.DBInterface;
|
|||
import org.gcube.vremanagement.vremodeler.impl.ServiceContext;
|
||||
import org.gcube.vremanagement.vremodeler.impl.util.XMLUtil;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
|
||||
public class GenericResourcePortlet {
|
||||
|
@ -22,8 +23,11 @@ public class GenericResourcePortlet {
|
|||
Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
|
||||
DBInterface.connect();
|
||||
ResultSet rs= DBInterface.queryDB("select pf.PORTLETCLASS from PORTLETRELTOFUNCT as pf, VRERELATEDFUNCT as vf where vf.vreid='"+vreId+"' and pf.FUNCID=vf.FUNCID");
|
||||
Element root= doc.createElement("ListPortlets");
|
||||
while(rs.next())
|
||||
doc.appendChild(XMLUtil.createTextElement(doc, "Portlet", rs.getString(1)));
|
||||
root.appendChild(XMLUtil.createTextElement(doc, "Portlet", rs.getString(1)));
|
||||
|
||||
doc.appendChild(root);
|
||||
resource.setBody(XMLUtil.docToString(doc));
|
||||
|
||||
resource.setDescription("List of selectable Portlet for the VRE "+vreName);
|
||||
|
|
Loading…
Reference in New Issue