java.lang.Object | |
↳ | com.microstrategy.web.app.utils.HTTPHelper |
This class contains some public utility methods that can be used for handling parameters included on collections such as the HttpServletRequest object, and the RequestKeys object.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
HTTPHelper() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static int |
fixInt(RequestKeys rk, String param, int defaultValue, boolean isZeroLengthValid)
Transforms the string sent as parameter into an
int value. | ||||||||||
static int | fixInt(RequestKeys rk, String param, int defaultValue) | ||||||||||
static int |
fixInt(String fixedValue, int defaultValue)
Transforms the string sent as parameter into an
int value. | ||||||||||
static String |
fixString(RequestKeys rk, String param, String defaultValue)
Searches for the asked parameter on the request object.
| ||||||||||
static String |
fixString(RequestKeys rk, String param, String defaultValue, boolean isZeroLengthValid)
Searches for the asked parameter on the request object.
| ||||||||||
static int | getBrowserLocale(AppContext appContext) | ||||||||||
static String |
getDescriptor(int key)
This method is deprecated.
No replacement.
| ||||||||||
static String |
getDescriptor(int key, Messages messages)
Obtains the descriptor string corresponding to the indicated key
| ||||||||||
static String |
getEnumerationValue(String enumValue)
This method is deprecated.
This method is deprecated. Instead use
getEnumerationValue(String) .
| ||||||||||
static String |
getLastRowPosition(ReportBean rb)
Gets the position where the new attribute will be displayed
| ||||||||||
static int | getLocale(String localeStr, AppContext appContext) | ||||||||||
static int |
getOutputFormatToUse(Preferences preferences, BrowserSettings browserSettings)
This method is deprecated.
Use
getOutputFormatToUse(AppContext)
| ||||||||||
static int |
getOutputFormatToUse(AppContext appContext)
Determines the output mode the beans should use when getting displayed based
on the preferences as defined by the instance of AppContext.
| ||||||||||
static WebProjectInstance | getProject(WebIServerSession session) | ||||||||||
static String |
getProjectAlias(String serverName, int serverPort, String projectName)
This method is deprecated.
use
getProjectAlias(String, int, String, Locale)
| ||||||||||
static String |
getProjectAlias(String serverName, String projectName)
This method is deprecated.
Please use
getProjectAlias(WebIServerSession) or getProjectAlias(String, int, String, Locale) .
| ||||||||||
static String |
getProjectAlias(WebIServerSession session)
Utility method for obtaining the project alias string based on the Server and original Project
name.
| ||||||||||
static String |
getProjectAlias(String serverName, int serverPort, String projectName, Locale locale)
Utility method for obtaining the project alias string based on the Server and original Project
name.
| ||||||||||
static boolean | isDefaultLocale(String localeStr) | ||||||||||
static boolean | isIFrameRequest(PageComponent mstrPage) | ||||||||||
static boolean |
isKeyExisting(RequestKeys keys, WebEvent event, int argID)
Checks if the argument sent as parameter exists on the RequestKeys instance
| ||||||||||
static boolean |
isKeyExisting(RequestKeys keys, String argName)
Checks if the argument sent as parameter exists on the RequestKeys instance
| ||||||||||
static String |
mimeEncode(String input)
Utility method to encode the HTTP header value with RFC 2047.
| ||||||||||
static void |
processApplyChanges(WebComponent wc)
Handles the request for the instances of ReportBean and RWBean
| ||||||||||
static void |
processResetChanges(ReportBean rb)
Resets the changes om the ReportBean.
| ||||||||||
static String | toSysBeanName(int sysBeanType) | ||||||||||
static int | toSysBeanType(String sysBeanName) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Transforms the string sent as parameter into an int
value.
rk | RequestKeys object initialized |
---|---|
param | String containing the name of the parameter to search for |
defaultValue | String with the default value of the parameter |
isZeroLengthValid | boolean flag indicating if the value of the parameter can be zero-length |
Transforms the string sent as parameter into an int
value.
fixedValue | String containing the value to transform into an integer |
---|---|
defaultValue | int with the default value of the parameter |
int
. If an error is generated while the
conversion the default value will be used.
Searches for the asked parameter on the request object.
rk | RequestKeys object initialized |
---|---|
param | String containing the name of the parameter to search for |
defaultValue | String with the default value of the parameter |
Searches for the asked parameter on the request object.
rk | RequestKeys object initialized |
---|---|
param | String containing the name of the parameter to search for |
defaultValue | String with the default value of the parameter |
isZeroLengthValid | Boolean flag indicating if the value of the parameter can be zero-length |
This method is deprecated.
No replacement.
Obtains the descriptor string corresponding to the indicated key
key | identifier to look for on the string database |
---|
Obtains the descriptor string corresponding to the indicated key
key | identifier to look for on the string database |
---|---|
messages | Messages instance where the descriptor string will be looked for. |
This method is deprecated.
This method is deprecated. Instead use getEnumerationValue(String)
.
Returns the value of the constant defined in the Java fully qualified class name and constant name received as a parameter. The value is always returned as a String regardless of the original data type. If the class cannot be resolved or the data member does not exist, null is returned.
enumValue | FCN of the data member to resolved. i.e. com.microstrategy.web.beans.EnumReportBeanEvents.REPORT_EVENT_EXECUTE |
---|
Gets the position where the new attribute will be displayed
rb | a ReportBean instance initialized |
---|
This method is deprecated.
Use getOutputFormatToUse(AppContext)
Determines the output mode the beans should use when getting displayed based on preferences
preferences | Preferences initialized instance |
---|---|
browserSettings | BrowserSettings initialized instance |
EnumBeanOutputFormat
enumerationDetermines the output mode the beans should use when getting displayed based on the preferences as defined by the instance of AppContext.
appContext | AppContext |
---|
This method is deprecated.
use getProjectAlias(String, int, String, Locale)
Utility method for obtaining the project alias string based on the Server and original Project name.
serverName | String with the name of the I-Server of the project to look for |
---|---|
serverPort | Port of I-Server. |
projectName | String with the original project name to look for |
This method is deprecated.
Please use getProjectAlias(WebIServerSession)
or getProjectAlias(String, int, String, Locale)
.
Utility method for obtaining the project alias string based on the Server and original Project name
serverName | String with the name of the I-Server of the project to look for |
---|---|
projectName | String with the original project name to look for |
Utility method for obtaining the project alias string based on the Server and original Project name.
session | session available for lookup. |
---|
Utility method for obtaining the project alias string based on the Server and original Project name.
serverName | String with the name of the I-Server of the project to look for |
---|---|
serverPort | Port of I-Server. |
projectName | String with the original project name to look for |
locale | locale of the project alias to return |
Checks if the argument sent as parameter exists on the RequestKeys instance
keys | a RequestKeys initialized instance |
---|---|
event | a WebEvent instance from where the argument name will be obtained |
argID | the identifier of the argument to search for |
True
if the argument was found as a parameter on the RequestKeys, either as
the exact name or with the '.x' or '.y' extension (passed as an image input).
Checks if the argument sent as parameter exists on the RequestKeys instance
keys | a RequestKeys initialized instance |
---|---|
argName | the name of the argument to search for |
True
if the argument was found as a parameter on the RequestKeys, either as
the exact name or with the '.x' or '.y' extension (passed as an image input).
Utility method to encode the HTTP header value with RFC 2047.
input | HTTP header value which has non-ASCII characters. |
---|
Handles the request for the instances of ReportBean and RWBean
wc | WebComponent |
---|
WebException | |
WebException |