public class ServletUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ACCEPT_CHARSET |
static String |
ACCEPT_LANGUAGE |
static String |
BRAND |
static String |
BUNDLE |
static String |
CHARSET |
static String |
CONNECTION |
static String |
CONTENT_LANGUAGE |
static String |
EXCEPTION |
static String |
GET_METHOD |
static String |
LOCALE |
static String |
PARENT_SERVICE |
static String |
POST_METHOD |
static String |
VARY |
Constructor and Description |
---|
ServletUtil() |
Modifier and Type | Method and Description |
---|---|
static PLightComponentHelper |
addComponent(PIAComponentCollection col,
String name,
String fieldDesc)
Adds a field bean to a component collection, using the same description for both model and display fields.
|
static PLightComponentHelper |
addComponent(PIAComponentCollection col,
String name,
String inputFieldDesc,
String outputFieldDesc)
Adds a field bean to a component collection, using the specified model and display field descriptions.
|
static boolean |
checkError(Map errorMap,
PLightComponentHelper lc)
Determines whether a field bean exists in the
errorMap . |
static Object[] |
convertStrToArgs(String str)
Builds the arguments for
PInfranetMessageFormat . |
static HashMap |
gatherFormInput(javax.servlet.http.HttpServletRequest request)
Iterates through the form input sent to the
servlet in the
HttpRequest object. |
static PModelHandle |
getModelFromSession(javax.servlet.http.HttpSession session)
Validates the session and, if valid, returns its
PModelHandle . |
static String |
getServiceName(PModelHandle service,
javax.servlet.http.HttpSession session)
A helper function to retrieve service name from the service model
|
static Object |
logIn(PPooledConnectionClientServices pCS)
Logs into Infranet.
|
static HashMap |
parseErrorData(PIAComponentCollection col,
com.portal.app.util.CustomerValErrorData[] errorData)
Performs error parsing.
|
static HashMap |
parseErrorDataEnhanced(PIAComponentCollection col,
com.portal.app.util.CustomerValErrorData[] errorData) |
static void |
saveBrandModel(PPooledConnectionClientServices pCS,
String brand,
javax.servlet.http.HttpSession session)
Retrieves the brand model handle from the properties file.
|
static void |
saveLocaleInfo(javax.servlet.http.HttpServletRequest req)
Reads the HTTP headers from the
HttpRequest object,
maps the language parameters, and saves them in session. |
static void |
setLightDataForAll(Map formInput,
PIAComponentCollection col,
String caller)
Performs
setLightData on a collection of field beans. |
static String |
validateDate(String str)
Builds the arguments for
PInfranetMessageFormat . |
public static final String BUNDLE
public static final String POST_METHOD
public static final String GET_METHOD
public static final String LOCALE
public static final String CHARSET
public static final String BRAND
public static final String CONTENT_LANGUAGE
public static final String VARY
public static final String ACCEPT_LANGUAGE
public static final String ACCEPT_CHARSET
public static final String EXCEPTION
public static final String CONNECTION
public static final String PARENT_SERVICE
public static Object logIn(PPooledConnectionClientServices pCS)
pCS
- the pooled client connection servicespublic static void saveLocaleInfo(javax.servlet.http.HttpServletRequest req)
HttpRequest
object,
maps the language parameters, and saves them in session.req
- the servlet requestpublic static HashMap gatherFormInput(javax.servlet.http.HttpServletRequest request)
HttpRequest
object.request
- the servlet requestHashMap
.public static void setLightDataForAll(Map formInput, PIAComponentCollection col, String caller)
setLightData
on a collection of field beans.formInput
- map of all input datacol
- the collection of field beanscaller
- caller information to logpublic static HashMap parseErrorData(PIAComponentCollection col, com.portal.app.util.CustomerValErrorData[] errorData)
col
- a collection of field beanserrorData
- error datapublic static HashMap parseErrorDataEnhanced(PIAComponentCollection col, com.portal.app.util.CustomerValErrorData[] errorData)
public static boolean checkError(Map errorMap, PLightComponentHelper lc)
errorMap
.errorMap
- a map of the field beans in error, with an error messagelc
- the field bean to search for in the errorMap
errorMap
;
false otherwise.public static PModelHandle getModelFromSession(javax.servlet.http.HttpSession session) throws InvalidSessionException
PModelHandle
.session
- the HTTP sessionPModelHandle
for the validated session.InvalidSessionException
- thrown if the session has expired or the model
handle is nullpublic static PLightComponentHelper addComponent(PIAComponentCollection col, String name, String fieldDesc)
col
- the component collectionname
- a String
with the name of the field beanfieldDesc
- a String
to use for both the modelFieldDescription
and displayFieldDescription
public static PLightComponentHelper addComponent(PIAComponentCollection col, String name, String inputFieldDesc, String outputFieldDesc)
col
- the component collectionname
- a String
with the name of the field beaninputFieldDesc
- a String
to use for the modelFieldDescription
outputFieldDesc
- a String
to use for the displayFieldDescription
public static Object[] convertStrToArgs(String str)
PInfranetMessageFormat
.str
- a String
that contains the arguments to parsepublic static String validateDate(String str)
PInfranetMessageFormat
.str
- a String
that contains the arguments to parsepublic static void saveBrandModel(PPooledConnectionClientServices pCS, String brand, javax.servlet.http.HttpSession session) throws RemoteException
pCS
- the pooled client connection servicesbrand
- the brand resource ID specified in the properties filesession
- the HttpSession
RemoteException
public static String getServiceName(PModelHandle service, javax.servlet.http.HttpSession session) throws RemoteException
service
- service modelsession
- HttpSessionRemoteException
Copyright © 2003, 2023, Oracle and/or its affiliates.