it.eng.qbe.utility
Class Utils

java.lang.Object
  extended by it.eng.qbe.utility.Utils

public class Utils
extends java.lang.Object

The Class Utils.


Constructor Summary
Utils()
           
 
Method Summary
static java.lang.String asJavaClassIdentifier(java.lang.String identifier)
          As java class identifier.
static java.lang.String asJavaIdentifier(java.lang.String identifier)
          As java identifier.
static java.lang.String asJavaPropertyIdentifier(java.lang.String identifier)
          As java property identifier.
static java.lang.String capitalize(java.lang.String value)
          Capitalize.
static boolean deleteDir(java.io.File dir)
          Delete dir.
static CalculatedField getCalculatedField(java.lang.String cFieldId, java.io.File formulaFile)
          Estrae dal file formula.xml solo i campi calcolati relativi alle entita' che ho estratto nella query
static IDataMartModelRetriever getDataMartModelRetriever()
          Gets the data mart model retriever.
static java.lang.String getOrderedFieldList(ISingleDataMartWizardObject wizObject)
          Gets the ordered field list.
static java.lang.String getSelectedEntitiesAsString(ISingleDataMartWizardObject aWizardObject)
          Gets the selected entities as string.
static java.util.List getViewJarFiles(IHibernateDataSource dataSource)
          Gets the view jar files.
static java.lang.String hashMD5(java.lang.String original)
          Hash m d5.
static boolean isUserAble(it.eng.spago.security.IEngUserProfile userProfile, java.lang.String func)
          Checks if is user able.
static java.lang.String packageAsDir(java.lang.String packageName)
          Package as dir.
static java.lang.String unCapitalize(java.lang.String value)
          Un capitalize.
static void updateLastUpdateTimeStamp(it.eng.spago.base.RequestContainer reqContainer)
          Update the QBE_LAST_UPDATE_TIMESTAMP in session container.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utils

public Utils()
Method Detail

getDataMartModelRetriever

public static IDataMartModelRetriever getDataMartModelRetriever()
                                                         throws java.lang.Exception
Gets the data mart model retriever.

Returns:
the data mart model retriever
Throws:
java.lang.Exception - the exception

getViewJarFiles

public static java.util.List getViewJarFiles(IHibernateDataSource dataSource)
Gets the view jar files.

Parameters:
dataSource - the data source
Returns:
the view jar files

updateLastUpdateTimeStamp

public static void updateLastUpdateTimeStamp(it.eng.spago.base.RequestContainer reqContainer)
Update the QBE_LAST_UPDATE_TIMESTAMP in session container.

Parameters:
reqContainer - the req container

hashMD5

public static java.lang.String hashMD5(java.lang.String original)
                                throws it.eng.spago.error.EMFInternalError
Hash m d5.

Parameters:
original - the original
Returns:
the string
Throws:
it.eng.spago.error.EMFInternalError - the EMF internal error

isUserAble

public static boolean isUserAble(it.eng.spago.security.IEngUserProfile userProfile,
                                 java.lang.String func)
Checks if is user able.

Parameters:
userProfile - the user profile
func - the func
Returns:
true, if is user able

getCalculatedField

public static CalculatedField getCalculatedField(java.lang.String cFieldId,
                                                 java.io.File formulaFile)
                                          throws java.lang.Exception
Estrae dal file formula.xml solo i campi calcolati relativi alle entita' che ho estratto nella query

Parameters:
cFieldId - the c field id
formulaFile - the formula file
Returns:
the calculated field
Throws:
java.lang.Exception - the exception

getOrderedFieldList

public static java.lang.String getOrderedFieldList(ISingleDataMartWizardObject wizObject)
Gets the ordered field list.

Parameters:
wizObject - the wiz object
Returns:
the ordered field list

getSelectedEntitiesAsString

public static java.lang.String getSelectedEntitiesAsString(ISingleDataMartWizardObject aWizardObject)
                                                    throws java.lang.Exception
Gets the selected entities as string.

Parameters:
aWizardObject - the a wizard object
Returns:
the selected entities as string
Throws:
java.lang.Exception - the exception

asJavaClassIdentifier

public static java.lang.String asJavaClassIdentifier(java.lang.String identifier)
As java class identifier.

Parameters:
identifier - the identifier
Returns:
the string

asJavaPropertyIdentifier

public static java.lang.String asJavaPropertyIdentifier(java.lang.String identifier)
As java property identifier.

Parameters:
identifier - the identifier
Returns:
the string

asJavaIdentifier

public static java.lang.String asJavaIdentifier(java.lang.String identifier)
As java identifier.

Parameters:
identifier - the identifier
Returns:
the string

capitalize

public static java.lang.String capitalize(java.lang.String value)
Capitalize.

Parameters:
value - the value
Returns:
the string

unCapitalize

public static java.lang.String unCapitalize(java.lang.String value)
Un capitalize.

Parameters:
value - the value
Returns:
the string

packageAsDir

public static java.lang.String packageAsDir(java.lang.String packageName)
Package as dir.

Parameters:
packageName - the package name
Returns:
the string

deleteDir

public static boolean deleteDir(java.io.File dir)
Delete dir.

Parameters:
dir - the dir
Returns:
true, if successful