it.eng.qbe.utility
Class Utils

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

public class Utils
extends java.lang.Object


Constructor Summary
Utils()
           
 
Method Summary
static java.lang.String getAbsoluteReportServletContext(it.eng.spago.base.RequestContainer requestContainer)
           
static java.util.List getAllJndiDS()
           
static java.lang.String[] getJndiDsDialectFromModel(DataMartModel dm)
           
static java.lang.String getLabelForClass(it.eng.spago.base.RequestContainer requestContainer, DataMartModel dmModel, java.lang.String className)
           
static java.lang.String getLabelForField(it.eng.spago.base.RequestContainer requestContainer, DataMartModel dmModel, java.lang.String completeFieldName)
          Get the label for given fieldName
static java.lang.String getLabelForQueryField(it.eng.spago.base.RequestContainer requestContainer, DataMartModel dmModel, ISingleDataMartWizardObject wizObj, java.lang.String completeFieldName)
           
static java.util.Properties getLabelProperties(DataMartModel dm, it.eng.spago.base.ApplicationContainer application)
          This method is responsible to get Propertis associated with datamart models, Properties objects are cached in Application Container
static java.util.Properties getLabelProperties(DataMartModel dm, it.eng.spago.base.ApplicationContainer application, java.util.Locale loc)
          This method is responsible to get Propertis associated with datamart models for the given locale, Properties objects are cached in Application Container
static ISingleDataMartWizardObject getMainWizardObject(it.eng.spago.base.SessionContainer sessionContainer)
           
static IQbeMessageHelper getQbeMessageHelper()
           
static java.lang.String getReportServletContextAddress()
           
static it.eng.spago.base.RequestContainer getRequestContainer(javax.servlet.http.HttpServletRequest request)
           
static org.hibernate.SessionFactory getSessionFactory(DataMartModel dm, it.eng.spago.base.ApplicationContainer application)
          This method is responsible to get Session Factories associated with datamart models, session factories are cached in Application Container
static ISingleDataMartWizardObject getWizardObject(it.eng.spago.base.SessionContainer sessionContainer)
           
static java.lang.String hashMD5(java.lang.String original)
           
static boolean isSubQueryModeActive(it.eng.spago.base.SessionContainer sessionContainer)
           
static boolean isUserAble(it.eng.spago.security.IEngUserProfile userProfile, java.lang.String func)
           
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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utils

public Utils()
Method Detail

getSessionFactory

public static org.hibernate.SessionFactory getSessionFactory(DataMartModel dm,
                                                             it.eng.spago.base.ApplicationContainer application)
This method is responsible to get Session Factories associated with datamart models, session factories are cached in Application Container

Parameters:
dm: - The datamart model
application: - Spago Application Container

getLabelProperties

public static java.util.Properties getLabelProperties(DataMartModel dm,
                                                      it.eng.spago.base.ApplicationContainer application)
This method is responsible to get Propertis associated with datamart models, Properties objects are cached in Application Container

Parameters:
dm: - The datamart model
application: - Spago Application Container
Returns:
the Properties object associated with datamart

getLabelProperties

public static java.util.Properties getLabelProperties(DataMartModel dm,
                                                      it.eng.spago.base.ApplicationContainer application,
                                                      java.util.Locale loc)
This method is responsible to get Propertis associated with datamart models for the given locale, Properties objects are cached in Application Container

Parameters:
dm: - The datamart model
application: - Spago Application Container
loc: - locale
Returns:
the Properties object associated with datamart

getLabelForClass

public static java.lang.String getLabelForClass(it.eng.spago.base.RequestContainer requestContainer,
                                                DataMartModel dmModel,
                                                java.lang.String className)
Parameters:
requestContainer -
dmModel -
className -
Returns:

getLabelForField

public static java.lang.String getLabelForField(it.eng.spago.base.RequestContainer requestContainer,
                                                DataMartModel dmModel,
                                                java.lang.String completeFieldName)
Get the label for given fieldName

Parameters:
requestContainer: - Spago Request Container
dmModel: - The datamart Model
completeFieldName: - The field Name
Returns:
the label associated with the field name

getRequestContainer

public static it.eng.spago.base.RequestContainer getRequestContainer(javax.servlet.http.HttpServletRequest request)
Parameters:
request -
Returns:
Spago Request Container

getLabelForQueryField

public static java.lang.String getLabelForQueryField(it.eng.spago.base.RequestContainer requestContainer,
                                                     DataMartModel dmModel,
                                                     ISingleDataMartWizardObject wizObj,
                                                     java.lang.String completeFieldName)
Parameters:
requestContainer -
dmModel -
wizObj -
completeFieldName -
Returns:

updateLastUpdateTimeStamp

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

Parameters:
reqContainer -

getQbeMessageHelper

public static IQbeMessageHelper getQbeMessageHelper()

getReportServletContextAddress

public static java.lang.String getReportServletContextAddress()

getAbsoluteReportServletContext

public static java.lang.String getAbsoluteReportServletContext(it.eng.spago.base.RequestContainer requestContainer)

getJndiDsDialectFromModel

public static java.lang.String[] getJndiDsDialectFromModel(DataMartModel dm)

getAllJndiDS

public static java.util.List getAllJndiDS()

hashMD5

public static java.lang.String hashMD5(java.lang.String original)
                                throws it.eng.spago.error.EMFInternalError
Throws:
it.eng.spago.error.EMFInternalError

isUserAble

public static boolean isUserAble(it.eng.spago.security.IEngUserProfile userProfile,
                                 java.lang.String func)

getWizardObject

public static ISingleDataMartWizardObject getWizardObject(it.eng.spago.base.SessionContainer sessionContainer)

getMainWizardObject

public static ISingleDataMartWizardObject getMainWizardObject(it.eng.spago.base.SessionContainer sessionContainer)

isSubQueryModeActive

public static boolean isSubQueryModeActive(it.eng.spago.base.SessionContainer sessionContainer)