|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.eng.spagobi.utilities.GeneralUtilities
public class GeneralUtilities
Contains some SpagoBI's general utilities.
Constructor Summary | |
---|---|
GeneralUtilities()
|
Method Summary | |
---|---|
static java.lang.String |
decode(java.lang.String input)
Questo metodo implementa la stessa logica della funzione javascript escape. |
static boolean |
deleteContentDir(java.io.File dir)
Delete contents of a directory |
static boolean |
deleteDir(java.io.File dir)
Delete a folder and its contents |
static java.lang.String |
encode(java.lang.String input)
Questo metodo implementa la stessa logica della funzione javascript escape. |
static groovy.lang.Binding |
fillBinding(java.util.HashMap attrs)
|
static groovy.lang.Binding |
fillBinding(it.eng.spago.security.IEngUserProfile profile)
|
static java.util.HashMap |
getAllProfileAttributes(it.eng.spago.security.IEngUserProfile profile)
|
static byte[] |
getByteArrayFromInputStream(java.io.InputStream is)
Given an InputStream as input, gets the correspondent bytes array. |
static java.lang.String |
getLocalIPAddressAsString()
Returns a string containing the localhost IP address. |
static java.lang.String |
getRelativeFileNames(java.lang.String completeFileName)
From a String identifying the complete name for a file, gets the relative file names, which are substrings of the starting String, according to the java separator "/". |
static java.lang.String |
getSpagoBiContentRepositoryServlet()
Gets the spagoBI's content repository servlet information as a string. |
static java.lang.String |
getSpagoBiContextAddress()
Returns the context address for SpagoBI as an URL and puts it into a string. |
static java.lang.String |
getSpagoBiEventsManagerServlet()
Gets the spagoBI's EventManager servlet information as a string. |
static boolean |
isErrorHandlerContainingOnlyValidationError(it.eng.spago.error.EMFErrorHandler errorHandler)
Checks if the Spago errorHandler contains only validation errors |
static boolean |
isModuleInstalled(java.lang.String moduleName)
checks if a module is installed (based on the configuration file spagobi_components.xml) |
static void |
main(java.lang.String[] args)
The Main method |
static java.lang.String |
replace(java.lang.String toParse,
java.lang.String replacing,
java.lang.String replaced)
Questo metodo permette di sostituire una parte di una stringa con un'altra. |
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)
|
static java.lang.String |
substituteProfileAttributesInString(java.lang.String statement,
it.eng.spago.security.IEngUserProfile profile)
Substitutes the profile attributes with sintax "${attribute_name}" with the correspondent value in the string passed at input. |
static java.lang.String |
substituteQuotesIntoString(java.lang.String value)
|
static java.lang.String |
testScript(java.lang.String script,
groovy.lang.Binding bind)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GeneralUtilities()
Method Detail |
---|
public static void main(java.lang.String[] args)
args
- String for command line argumentspublic static boolean isErrorHandlerContainingOnlyValidationError(it.eng.spago.error.EMFErrorHandler errorHandler)
errorHandler
- The error handler to check
public static byte[] getByteArrayFromInputStream(java.io.InputStream is)
InputStream
as input, gets the correspondent bytes array.
is
- The input straeam
public static java.lang.String getRelativeFileNames(java.lang.String completeFileName)
completeFileName
- The string representing the file name
public static java.lang.String getLocalIPAddressAsString()
public static java.lang.String getSpagoBiContextAddress()
public static java.lang.String getSpagoBiContentRepositoryServlet()
public static java.lang.String getSpagoBiEventsManagerServlet()
public static groovy.lang.Binding fillBinding(java.util.HashMap attrs)
public static groovy.lang.Binding fillBinding(it.eng.spago.security.IEngUserProfile profile) throws it.eng.spago.error.EMFInternalError
it.eng.spago.error.EMFInternalError
public static java.lang.String substituteProfileAttributesInString(java.lang.String statement, it.eng.spago.security.IEngUserProfile profile) throws java.lang.Exception
statement
- The string to be modified (tipically a query)profile
- The IEngUserProfile object
java.lang.Exception
public static java.util.HashMap getAllProfileAttributes(it.eng.spago.security.IEngUserProfile profile) throws it.eng.spago.error.EMFInternalError
it.eng.spago.error.EMFInternalError
public static java.lang.String testScript(java.lang.String script, groovy.lang.Binding bind) throws java.lang.Exception
java.lang.Exception
public static boolean deleteDir(java.io.File dir)
dir
- The java file object of the directory
public static boolean deleteContentDir(java.io.File dir)
dir
- The java file object of the directory
public static java.lang.String replaceInternationalizedMessages(java.lang.String message)
PortletUtilities.getMessage(key, bundle)
.
message
- The string to be modified
public static java.lang.String replace(java.lang.String toParse, java.lang.String replacing, java.lang.String replaced)
toParse
- stringa da manipolare.replacing
- parte di stringa da sostituire.replaced
- stringa nuova.public static java.lang.String encode(java.lang.String input)
input
- stringa da manipolare.public static java.lang.String decode(java.lang.String input)
input
- stringa da manipolare.public static void subsituteBIObjectParametersLovProfileAttributes(BIObject obj, it.eng.spago.base.SessionContainer session) throws java.lang.Exception, it.eng.spago.error.EMFInternalError
java.lang.Exception
it.eng.spago.error.EMFInternalError
public static boolean isModuleInstalled(java.lang.String moduleName)
moduleName
- The name of the module
public static java.lang.String substituteQuotesIntoString(java.lang.String value)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |