org.gcube.vremanagement.vremodeler.impl.util
Class Util

java.lang.Object
  extended by org.gcube.vremanagement.vremodeler.impl.util.Util

public class Util
extends Object

Author:
Lucio Lelii

Constructor Summary
Util()
           
 
Method Summary
static Element addElements(Document doc, String root, Element[] elements)
           
static Element createTextElement(Document doc, String tag, String text)
           
static String docToString(Document doc)
          transform a Document into string
static List<FunctionalityPersisted> getSelectedFunctionality(com.j256.ormlite.dao.Dao<VreFunctionalityRelation,String> vreFunctionalityDao, com.j256.ormlite.dao.Dao<FunctionalityPersisted,Integer> functionalityDao, String resourceId)
           
static boolean isDeploymentStatusFinished(String report)
           
static boolean isSomethingFailed(String report)
          controls if something is failed deploying
static boolean isVersionGreater(String versionA, String versionB)
           
static List<org.gcube.vremanagement.vremodeler.stubs.FunctionalityItem> prepareFunctionalities(ResultSet res, ArrayList<Integer> selectedFunct, ArrayList<String> selectedCS)
           
static String prepareQualityXML()
           
static org.gcube.vremanagement.vremodeler.stubs.VREDescription prepareVREDescription(ResultSet res)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

getSelectedFunctionality

public static List<FunctionalityPersisted> getSelectedFunctionality(com.j256.ormlite.dao.Dao<VreFunctionalityRelation,String> vreFunctionalityDao,
                                                                    com.j256.ormlite.dao.Dao<FunctionalityPersisted,Integer> functionalityDao,
                                                                    String resourceId)
                                                             throws Exception
Throws:
Exception

prepareQualityXML

public static String prepareQualityXML()
Returns:
the XML representing the quality string

prepareFunctionalities

public static List<org.gcube.vremanagement.vremodeler.stubs.FunctionalityItem> prepareFunctionalities(ResultSet res,
                                                                                                      ArrayList<Integer> selectedFunct,
                                                                                                      ArrayList<String> selectedCS)
Parameters:
res -
selectedFunct -
selectedCS -
Returns:

prepareVREDescription

public static org.gcube.vremanagement.vremodeler.stubs.VREDescription prepareVREDescription(ResultSet res)
                                                                                     throws Exception
Parameters:
res -
Returns:
a String representing the message
Throws:
Exception

docToString

public static String docToString(Document doc)
transform a Document into string

Parameters:
doc - Document
Returns:
a String

addElements

public static Element addElements(Document doc,
                                  String root,
                                  Element[] elements)
Parameters:
doc - the root Document
root - the element tag name
elements - elements to add
Returns:
the result element

createTextElement

public static Element createTextElement(Document doc,
                                        String tag,
                                        String text)
Parameters:
doc - the root Document
Tag - the element tag name
text - the text to add at the element
Returns:
the result element

isVersionGreater

public static boolean isVersionGreater(String versionA,
                                       String versionB)

isDeploymentStatusFinished

public static boolean isDeploymentStatusFinished(String report)

isSomethingFailed

public static boolean isSomethingFailed(String report)
controls if something is failed deploying

Parameters:
report - the VRE deployment report
Returns:
true if Failed, else false


Copyright © 2013. All Rights Reserved.