|
||||||||||
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 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 groovy.lang.Binding |
fillBinding(java.util.HashMap attrs)
|
static groovy.lang.Binding |
fillBinding(it.eng.spago.security.IEngUserProfile profile)
|
static java.util.HashMap |
getAllProfileAttributes()
Get all the shared profile attributes of the users. |
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.util.HashMap |
getPredefinedProfileAttributes(java.lang.String userUniqueIdentifier)
Get all the predefined profile attributes of the user with the given unique identifier passed as String. |
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 void |
main(java.lang.String[] args)
The Main method |
static java.lang.String |
substituteProfileAttributesInQuery(java.lang.String statement,
java.util.HashMap profileattrs,
int profileAttributeStartIndex)
Substitutes the profile attributes with sintax "${attribute_name}" with the correspondent value in the query statement passed at input. |
static java.lang.String |
testScript(java.lang.String script,
groovy.lang.Binding bind)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, 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 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 java.util.HashMap getAllProfileAttributes()
public static java.util.HashMap getPredefinedProfileAttributes(java.lang.String userUniqueIdentifier)
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 substituteProfileAttributesInQuery(java.lang.String statement, java.util.HashMap profileattrs, int profileAttributeStartIndex) throws java.lang.Exception
statement
- The query statement string to be modifiedprofileattrs
- The profile attributes HashMapprofileAttributeStartIndex
- The start index for query parsing (useful for recursive calling)
java.lang.Exception
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |