|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.eng.spagobi.commons.utilities.SpagoBIUtilities
it.eng.spagobi.commons.utilities.GeneralUtilities
public class GeneralUtilities
Contains some SpagoBI's general utilities.
Field Summary | |
---|---|
static int |
MAX_DEFAULT_TEMPLATE_SIZE
|
Constructor Summary | |
---|---|
GeneralUtilities()
|
Method Summary | |
---|---|
static it.eng.spago.security.IEngUserProfile |
createNewUserProfile(java.lang.String userId)
Creates a new user profile, given his identifier. |
static java.util.Locale |
getCurrentLocale(it.eng.spago.base.RequestContainer requestContainer)
|
static java.util.Locale |
getDefaultLocale()
Gets the default locale. |
static java.lang.String |
getLocaleDateFormat(it.eng.spago.base.SessionContainer permSess)
|
static java.lang.String |
getLocaleDateFormatForExtJs(it.eng.spago.base.SessionContainer permSess)
|
static java.lang.String |
getLovMapResult(java.util.Map lovs)
Gets the lov map result. |
static java.lang.String |
getLovResult(java.lang.String lovLabel)
Gets the lov result. |
static java.lang.String |
getLovResult(java.lang.String lovLabel,
it.eng.spago.security.IEngUserProfile profile)
Gets the lov result. |
static java.util.Map |
getParametersFromURL(java.lang.String urlString)
getParametersFromURL: takes an url and return a Map containing URL parameters |
static java.lang.String |
getServerDateFormat()
|
static java.lang.String |
getServerDateFormatExtJs()
|
static java.lang.String |
getServerTimeStampFormat()
|
static java.lang.String |
getServerTimestampFormatExtJs()
|
static java.lang.String |
getSessionExpiredURL()
|
static java.lang.String |
getSpagoAdapterHttpUrl()
Gets the spago adapter http url. |
static java.lang.String |
getSpagoBiContext()
|
static java.lang.String |
getSpagoBiDashboardServlet()
Gets the spagoBI's dashboards servlet information as a string. |
static java.lang.String |
getSpagoBiHost()
|
static java.lang.String |
getSpagoBIProfileBaseUrl(java.lang.String userId)
Returns the complete HTTP URL and puts it into a string. |
static java.util.Locale |
getStartingDefaultLocale()
Gets the default locale from SpagoBI configuraiton file, the behaviours is the same of getDefaultLocale() function, with difference that if not finds returns null TODO : merge its behaviour with GetDefaultLocale (not done know cause today is release date). |
static java.util.List<java.util.Locale> |
getSupportedLocales()
|
static org.json.JSONArray |
getSupportedLocalesAsJSONArray()
|
static int |
getTemplateMaxSize()
|
static java.lang.String |
getUrl(java.lang.String baseUrl,
java.util.Map mapPars)
Returns an url starting with the given base url and adding parameters retrieved by the input parameters map. |
static java.lang.String |
replaceInternationalizedMessages(java.lang.String message)
Substitutes the substrings with sintax "${code,bundle}" or "${code}" (in the second case bundle is assumed to be the default value "messages") with the correspondent internationalized messages in the input String. |
static void |
subsituteBIObjectParametersLovProfileAttributes(BIObject obj,
it.eng.spago.base.SessionContainer session)
Subsitute bi object parameters lov profile attributes. |
Methods inherited from class it.eng.spagobi.commons.utilities.SpagoBIUtilities |
---|
checkForSystemProperty, cleanString, decode, deleteContentDir, deleteDir, encode, findAttributeValues, flushFromInputStreamToOutputStream, fromListToString, getAllProfileAttributes, getByteArrayFromInputStream, getLocalIPAddressAsString, getRelativeFileNames, isErrorHandlerContainingOnlyValidationError, main, quote, readJndiResource, replace, substituteQuotesIntoString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MAX_DEFAULT_TEMPLATE_SIZE
Constructor Detail |
---|
public GeneralUtilities()
Method Detail |
---|
public static java.lang.String replaceInternationalizedMessages(java.lang.String message)
PortletUtilities.getMessage(key, bundle)
.
message
- The string to be modified
public static void subsituteBIObjectParametersLovProfileAttributes(BIObject obj, it.eng.spago.base.SessionContainer session) throws java.lang.Exception, it.eng.spago.error.EMFInternalError
obj
- the objsession
- the session
java.lang.Exception
- the exception
it.eng.spago.error.EMFInternalError
- the EMF internal errorpublic static java.lang.String getLovMapResult(java.util.Map lovs)
lovs
- the lovs
public static java.lang.String getLovResult(java.lang.String lovLabel) throws java.lang.Exception
lovLabel
- the lov label
java.lang.Exception
- the exceptionpublic static java.lang.String getLovResult(java.lang.String lovLabel, it.eng.spago.security.IEngUserProfile profile) throws java.lang.Exception
lovLabel
- the lov labelprofile
- the profile
java.lang.Exception
- the exceptionpublic static it.eng.spago.security.IEngUserProfile createNewUserProfile(java.lang.String userId) throws java.lang.Exception
userId
- The user identifier
java.lang.Exception
- the exceptionpublic static java.lang.String getSpagoBIProfileBaseUrl(java.lang.String userId)
userId
- the user id
public static java.lang.String getSpagoBiDashboardServlet()
public static java.lang.String getSpagoBiHost()
public static java.lang.String getSpagoAdapterHttpUrl()
public static java.util.Locale getStartingDefaultLocale()
public static java.util.Locale getDefaultLocale()
public static java.util.List<java.util.Locale> getSupportedLocales()
public static org.json.JSONArray getSupportedLocalesAsJSONArray()
public static java.util.Locale getCurrentLocale(it.eng.spago.base.RequestContainer requestContainer)
public static java.lang.String getLocaleDateFormat(it.eng.spago.base.SessionContainer permSess)
public static java.lang.String getLocaleDateFormatForExtJs(it.eng.spago.base.SessionContainer permSess)
public static java.lang.String getServerDateFormat()
public static java.lang.String getServerTimeStampFormat()
public static java.lang.String getServerDateFormatExtJs()
public static java.lang.String getServerTimestampFormatExtJs()
public static int getTemplateMaxSize()
public static java.lang.String getSpagoBiContext()
public static java.lang.String getSessionExpiredURL()
public static java.lang.String getUrl(java.lang.String baseUrl, java.util.Map mapPars)
baseUrl
- The base urlmapPars
- The parameters map; those parameters will be added to the base url (values will be encoded using UTF-8 encoding)
public static java.util.Map getParametersFromURL(java.lang.String urlString)
urlString
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |