Package lumis.portal.servicecontainer
Class ServiceContainerRequest
- java.lang.Object
-
- javax.servlet.ServletRequestWrapper
-
- javax.servlet.http.HttpServletRequestWrapper
-
- lumis.portal.url.PageWebResourceRequest
-
- lumis.portal.servicecontainer.ServiceContainerRequest
-
- All Implemented Interfaces:
PortletRequest
,HttpServletRequest
,ServletRequest
,IServiceInterfaceRequest
,IServiceInterfaceRequestSPI
,IPageWebResourceRequest
- Direct Known Subclasses:
ServiceContainerActionRequest
,ServiceContainerRenderRequest
public class ServiceContainerRequest extends PageWebResourceRequest implements IServiceInterfaceRequestSPI, IPageWebResourceRequest
AIServiceInterfaceRequest
implementation that is used by the service container.- Since:
- 4.0.0
- Version:
- $Revision: 22420 $ $Date: 2019-02-19 16:21:02 -0300 (Tue, 19 Feb 2019) $
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface javax.portlet.PortletRequest
PortletRequest.P3PUserInfos
-
-
Field Summary
Fields Modifier and Type Field Description protected ServiceInterfaceInstanceConfig
baseServiceInterfaceInstanceConfig
protected IBusinessContext
businessContext
protected String
callerServiceInterfaceInstanceId
protected boolean
isPreview
protected PageConfig
pageConfig
protected IPreferences
preferences
Preferences of the current user for the current service interface instance.protected ServiceConfig
serviceConfig
protected ServiceContainerHttpServletRequest
serviceContainerHttpServletRequest
protected ServiceInstanceConfig
serviceInstanceConfig
protected int
serviceInstanceDebugLevel
protected ServiceInterfaceConfig
serviceInterfaceConfig
protected ServiceInterfaceInstanceConfig
serviceInterfaceInstanceConfig
protected String
serviceInterfaceInstanceId
protected SessionConfig
sessionConfig
-
Fields inherited from class lumis.portal.url.PageWebResourceRequest
mode
-
Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
-
Fields inherited from interface lumis.portal.serviceinterface.IServiceInterfaceRequest
DEBUG_LEVEL_HIGH, DEBUG_LEVEL_LOW, DEBUG_LEVEL_MEDIUM, DEBUG_LEVEL_NONE
-
Fields inherited from interface javax.portlet.PortletRequest
ACTION_PHASE, ACTION_SCOPE_ID, BASIC_AUTH, CCPP_PROFILE, CLIENT_CERT_AUTH, DIGEST_AUTH, EVENT_PHASE, FORM_AUTH, LIFECYCLE_PHASE, RENDER_HEADERS, RENDER_MARKUP, RENDER_PART, RENDER_PHASE, RESOURCE_PHASE, USER_INFO
-
-
Constructor Summary
Constructors Constructor Description ServiceContainerRequest(SessionConfig sessionConfig, PortalRequestParameters portalParameters, HttpServletRequest httpServletRequest, ReplaceInterfacesStorage replaceInterfacesStorage)
-
Method Summary
-
Methods inherited from class lumis.portal.url.PageWebResourceRequest
getApplicationRequestedPath, getBusinessContext, getCookie, getPageWebResource, getPortalMode, getSessionConfig, getWebsiteBaseURL, isPageCachedInFile
-
Methods inherited from class javax.servlet.http.HttpServletRequestWrapper
authenticate, getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPart, getParts, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, login, logout
-
Methods inherited from class javax.servlet.ServletRequestWrapper
getAsyncContext, getCharacterEncoding, getContentLength, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocalName, getLocalPort, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, isWrapperFor, isWrapperFor, setRequest, startAsync, startAsync
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface lumis.portal.url.IPageWebResourceRequest
getApplicationRequestedPath, getContextPath, getCookies, getPortalMode, getScheme, getServerName, getServerPort, isPageCachedInFile, isSecure
-
Methods inherited from interface lumis.portal.serviceinterface.IServiceInterfaceRequest
getBusinessContext, getCookie, getCookies, getHeader, getPageWebResource, getSessionConfig, getWebsiteBaseURL
-
Methods inherited from interface lumis.portal.serviceinterface.IServiceInterfaceRequestSPI
getHttpServletRequest
-
Methods inherited from interface javax.portlet.PortletRequest
getAuthType, getContextPath, getRemoteUser, getRequestedSessionId, getScheme, getServerName, getServerPort, isRequestedSessionIdValid, isSecure
-
Methods inherited from interface javax.servlet.ServletRequest
getAsyncContext, getCharacterEncoding, getContentLength, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocalName, getLocalPort, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, startAsync, startAsync
-
-
-
-
Field Detail
-
serviceContainerHttpServletRequest
protected ServiceContainerHttpServletRequest serviceContainerHttpServletRequest
-
serviceInterfaceInstanceId
protected String serviceInterfaceInstanceId
-
serviceInterfaceInstanceConfig
protected ServiceInterfaceInstanceConfig serviceInterfaceInstanceConfig
-
baseServiceInterfaceInstanceConfig
protected ServiceInterfaceInstanceConfig baseServiceInterfaceInstanceConfig
-
serviceInterfaceConfig
protected ServiceInterfaceConfig serviceInterfaceConfig
-
serviceInstanceConfig
protected ServiceInstanceConfig serviceInstanceConfig
-
callerServiceInterfaceInstanceId
protected String callerServiceInterfaceInstanceId
-
serviceConfig
protected ServiceConfig serviceConfig
-
pageConfig
protected PageConfig pageConfig
-
sessionConfig
protected SessionConfig sessionConfig
-
serviceInstanceDebugLevel
protected int serviceInstanceDebugLevel
-
isPreview
protected boolean isPreview
-
businessContext
protected IBusinessContext businessContext
-
preferences
protected IPreferences preferences
Preferences of the current user for the current service interface instance. It is loaded on demand by thegetPreferences()
method.- Since:
- 4.0.7
-
-
Constructor Detail
-
ServiceContainerRequest
public ServiceContainerRequest(SessionConfig sessionConfig, PortalRequestParameters portalParameters, HttpServletRequest httpServletRequest, ReplaceInterfacesStorage replaceInterfacesStorage) throws Exception
- Throws:
Exception
-
-
Method Detail
-
setCharacterEncoding
public void setCharacterEncoding(String encoding) throws UnsupportedEncodingException
This method does nothing. The ServiceContainerRequest character encoding may not be changed.- Specified by:
setCharacterEncoding
in interfaceServletRequest
- Overrides:
setCharacterEncoding
in classServletRequestWrapper
- Throws:
UnsupportedEncodingException
-
getPortletSession
public PortletSession getPortletSession()
- Specified by:
getPortletSession
in interfacePortletRequest
-
getPortletSession
public PortletSession getPortletSession(boolean create)
- Specified by:
getPortletSession
in interfacePortletRequest
-
getParameter
public String getParameter(String name)
Description copied from interface:IPageWebResourceRequest
Returns the value of a request parameter as aString
, ornull
if the parameter does not exist. Request parameters are extra information sent with the request. The returned parameter are "x-www-form-urlencoded" decoded.This method should only be used if the parameter has only one value. If the parameter might have more than one value, use
IPageWebResourceRequest.getParameterValues(java.lang.String)
.If this method is used with a multivalued parameter, the value returned is equal to the first value in the array returned by
getParameterValues
.- Specified by:
getParameter
in interfaceIPageWebResourceRequest
- Specified by:
getParameter
in interfacePortletRequest
- Specified by:
getParameter
in interfaceServletRequest
- Overrides:
getParameter
in classPageWebResourceRequest
- Parameters:
name
- aString
specifying the name of the parameter- Returns:
- a
String
representing the single value of the parameter - See Also:
IPageWebResourceRequest.getParameterValues(java.lang.String)
-
getParameterNames
public Enumeration<String> getParameterNames()
Description copied from interface:IPageWebResourceRequest
Returns anEnumeration
ofString
objects containing the names of the parameters contained in this request. If the request has no parameters, the method returns an emptyEnumeration
.- Specified by:
getParameterNames
in interfaceIPageWebResourceRequest
- Specified by:
getParameterNames
in interfaceIServiceInterfaceRequest
- Specified by:
getParameterNames
in interfacePortletRequest
- Specified by:
getParameterNames
in interfaceServletRequest
- Overrides:
getParameterNames
in classPageWebResourceRequest
- Returns:
- an
Enumeration
ofString
objects, eachString
containing the name of a request parameter; or an emptyEnumeration
if the request has no parameters.
-
getParameterValues
public String[] getParameterValues(String name)
Description copied from interface:IPageWebResourceRequest
Returns an array ofString
objects containing all of the values the given request parameter has, ornull
if the parameter does not exist. The returned parameters are "x-www-form-urlencoded" decoded.If the parameter has a single value, the array has a length of 1.
- Specified by:
getParameterValues
in interfaceIPageWebResourceRequest
- Specified by:
getParameterValues
in interfacePortletRequest
- Specified by:
getParameterValues
in interfaceServletRequest
- Overrides:
getParameterValues
in classPageWebResourceRequest
- Parameters:
name
- aString
containing the name of the parameter the value of which is requested- Returns:
- an array of
String
objects containing the parameter values. - See Also:
IPageWebResourceRequest.getParameter(java.lang.String)
-
getParameterMap
public Map<String,String[]> getParameterMap()
Description copied from interface:IPageWebResourceRequest
Returns aMap
of the parameters of this request. Request parameters are extra information sent with the request. The returned parameters are "x-www-form-urlencoded" decoded.The values in the returned
Map
are from type String array (String[]
).If no parameters exist this method returns an empty
Map
.- Specified by:
getParameterMap
in interfaceIPageWebResourceRequest
- Specified by:
getParameterMap
in interfaceIServiceInterfaceRequest
- Specified by:
getParameterMap
in interfacePortletRequest
- Specified by:
getParameterMap
in interfaceServletRequest
- Overrides:
getParameterMap
in classPageWebResourceRequest
- Returns:
- an immutable
Map
containing parameter names as keys and parameter values as map values, or an emptyMap
if no parameters exist. The keys in the parameter map are of type String. The values in the parameter map are of type String array (String[]
).
-
getUserPrincipal
public Principal getUserPrincipal()
- Specified by:
getUserPrincipal
in interfaceHttpServletRequest
- Specified by:
getUserPrincipal
in interfacePortletRequest
- Overrides:
getUserPrincipal
in classHttpServletRequestWrapper
-
isUserInRole
public boolean isUserInRole(String arg0)
- Specified by:
isUserInRole
in interfaceHttpServletRequest
- Specified by:
isUserInRole
in interfacePortletRequest
- Overrides:
isUserInRole
in classHttpServletRequestWrapper
-
getLocale
public Locale getLocale()
- Specified by:
getLocale
in interfacePortletRequest
- Specified by:
getLocale
in interfaceServletRequest
- Overrides:
getLocale
in classServletRequestWrapper
-
getLocales
public Enumeration<Locale> getLocales()
- Specified by:
getLocales
in interfacePortletRequest
- Specified by:
getLocales
in interfaceServletRequest
- Overrides:
getLocales
in classServletRequestWrapper
-
getAttributeNames
public Enumeration<String> getAttributeNames()
Description copied from interface:IPageWebResourceRequest
Returns anEnumeration
containing the names of the attributes available to this request. This method returns an emptyEnumeration
if the request has no attributes available to it.- Specified by:
getAttributeNames
in interfaceIPageWebResourceRequest
- Specified by:
getAttributeNames
in interfaceIServiceInterfaceRequest
- Specified by:
getAttributeNames
in interfacePortletRequest
- Specified by:
getAttributeNames
in interfaceServletRequest
- Overrides:
getAttributeNames
in classPageWebResourceRequest
- Returns:
- an
Enumeration
of strings containing the names of the request attributes, or an emptyEnumeration
if the request has no attributes available to it.
-
getAttribute
public Object getAttribute(String key)
Description copied from interface:IPageWebResourceRequest
Returns the value of the named attribute as anObject
, ornull
if no attribute of the given name exists.- Specified by:
getAttribute
in interfaceIPageWebResourceRequest
- Specified by:
getAttribute
in interfacePortletRequest
- Specified by:
getAttribute
in interfaceServletRequest
- Overrides:
getAttribute
in classPageWebResourceRequest
- Parameters:
key
- aString
specifying the name of the attribute- Returns:
- an
Object
containing the value of the attribute, ornull
if the attribute does not exist.
-
setAttribute
public void setAttribute(String key, Object value)
Description copied from interface:IPageWebResourceRequest
Stores an attribute in this request.- Specified by:
setAttribute
in interfaceIPageWebResourceRequest
- Specified by:
setAttribute
in interfacePortletRequest
- Specified by:
setAttribute
in interfaceServletRequest
- Overrides:
setAttribute
in classPageWebResourceRequest
- Parameters:
key
- aString
specifying the name of the attributevalue
- theObject
to be stored
-
removeAttribute
public void removeAttribute(String key)
Description copied from interface:IPageWebResourceRequest
Removes an attribute from this request. This method is not generally needed, as attributes only persist as long as the request is being handled.- Specified by:
removeAttribute
in interfaceIPageWebResourceRequest
- Specified by:
removeAttribute
in interfacePortletRequest
- Specified by:
removeAttribute
in interfaceServletRequest
- Overrides:
removeAttribute
in classPageWebResourceRequest
- Parameters:
key
- aString
specifying the name of the attribute to be removed
-
getProperty
public String getProperty(String name)
- Specified by:
getProperty
in interfacePortletRequest
-
getProperties
public Enumeration<String> getProperties(String name)
- Specified by:
getProperties
in interfacePortletRequest
-
getPropertyNames
public Enumeration<String> getPropertyNames()
- Specified by:
getPropertyNames
in interfacePortletRequest
-
getPortalContext
public PortalContext getPortalContext()
- Specified by:
getPortalContext
in interfacePortletRequest
-
getPortletMode
public PortletMode getPortletMode()
- Specified by:
getPortletMode
in interfacePortletRequest
-
getPreferences
public IPreferences getPreferences()
- Specified by:
getPreferences
in interfaceIServiceInterfaceRequest
- Specified by:
getPreferences
in interfacePortletRequest
-
getResponseContentType
public String getResponseContentType()
- Specified by:
getResponseContentType
in interfacePortletRequest
-
getResponseContentTypes
public Enumeration<String> getResponseContentTypes()
- Specified by:
getResponseContentTypes
in interfacePortletRequest
-
getWindowState
public WindowState getWindowState()
- Specified by:
getWindowState
in interfacePortletRequest
-
isPortletModeAllowed
public boolean isPortletModeAllowed(PortletMode mode)
- Specified by:
isPortletModeAllowed
in interfacePortletRequest
-
isWindowStateAllowed
public boolean isWindowStateAllowed(WindowState state)
- Specified by:
isWindowStateAllowed
in interfacePortletRequest
-
getServiceInterfaceInstanceId
public String getServiceInterfaceInstanceId()
- Specified by:
getServiceInterfaceInstanceId
in interfaceIServiceInterfaceRequest
- Returns:
- Returns the serviceInterfaceInstanceId.
-
getPageConfig
public PageConfig getPageConfig()
- Specified by:
getPageConfig
in interfaceIServiceInterfaceRequest
- Returns:
-
setPageWebResource
public void setPageWebResource(PageWebResource pageWebResource)
Sets the page web resource for this request.- Overrides:
setPageWebResource
in classPageWebResourceRequest
- Parameters:
pageWebResource
- the page web resource.- Since:
- 5.0.0
-
setSessionConfig
public void setSessionConfig(SessionConfig sessionConfig)
- Specified by:
setSessionConfig
in interfaceIServiceInterfaceRequest
-
setServiceInterfaceInstanceConfig
public void setServiceInterfaceInstanceConfig(ServiceInterfaceInstanceConfig serviceInterfaceInstanceConfig)
-
getServiceInterfaceInstanceConfig
public ServiceInterfaceInstanceConfig getServiceInterfaceInstanceConfig()
- Specified by:
getServiceInterfaceInstanceConfig
in interfaceIServiceInterfaceRequest
- Returns:
- the source page
-
setServiceInterfaceConfig
public void setServiceInterfaceConfig(ServiceInterfaceConfig serviceInterfaceConfig)
-
getServiceInterfaceConfig
public ServiceInterfaceConfig getServiceInterfaceConfig()
- Specified by:
getServiceInterfaceConfig
in interfaceIServiceInterfaceRequest
- Returns:
-
setServiceInstanceConfig
public void setServiceInstanceConfig(ServiceInstanceConfig serviceInstanceConfig)
-
getServiceInstanceConfig
public ServiceInstanceConfig getServiceInstanceConfig()
- Specified by:
getServiceInstanceConfig
in interfaceIServiceInterfaceRequest
- Returns:
-
setServiceConfig
public void setServiceConfig(ServiceConfig serviceConfig)
-
getServiceConfig
public ServiceConfig getServiceConfig()
- Specified by:
getServiceConfig
in interfaceIServiceInterfaceRequest
- Returns:
-
getServiceContainerHttpServletRequest
public ServiceContainerHttpServletRequest getServiceContainerHttpServletRequest()
Description copied from interface:IServiceInterfaceRequestSPI
Returns theServiceContainerHttpServletRequest
.- Specified by:
getServiceContainerHttpServletRequest
in interfaceIServiceInterfaceRequestSPI
- Returns:
- the
ServiceContainerHttpServletRequest
.
-
getRequestDispatcher
public IServiceInterfaceRequestDispatcher getRequestDispatcher(String path)
- Specified by:
getRequestDispatcher
in interfaceIServiceInterfaceRequest
- Specified by:
getRequestDispatcher
in interfaceServletRequest
- Overrides:
getRequestDispatcher
in classServletRequestWrapper
-
setServiceInstanceDebugLevel
public void setServiceInstanceDebugLevel(int serviceInstanceDebugLevel)
-
getServiceInstanceDebugLevel
public int getServiceInstanceDebugLevel()
- Specified by:
getServiceInstanceDebugLevel
in interfaceIServiceInterfaceRequest
-
setServiceInterfaceInstanceParameters
public void setServiceInterfaceInstanceParameters(Map<String,String[]> parameters) throws Exception
- Throws:
Exception
-
getFileParameter
public FileParameter getFileParameter(String parameterName)
Description copied from interface:IPageWebResourceRequest
Returns the uploaded file by the given parameter name.- Specified by:
getFileParameter
in interfaceIPageWebResourceRequest
- Specified by:
getFileParameter
in interfaceIServiceInterfaceRequest
- Overrides:
getFileParameter
in classPageWebResourceRequest
- Parameters:
parameterName
- the parameter name.- Returns:
- the uploaded file by the given parameter name
-
setServiceInterfaceInstanceFileParameters
public void setServiceInterfaceInstanceFileParameters(Map<String,FileParameter> parameters) throws Exception
- Throws:
Exception
-
getCallerServiceInterfaceInstanceId
public String getCallerServiceInterfaceInstanceId()
- Specified by:
getCallerServiceInterfaceInstanceId
in interfaceIServiceInterfaceRequest
- Returns:
- Returns the callerServiceInterfaceInstanceConfig.
-
setCallerServiceInterfaceInstanceId
public void setCallerServiceInterfaceInstanceId(String callerServiceInterfaceInstanceId)
- Parameters:
callerServiceInterfaceInstanceConfig
- The callerServiceInterfaceInstanceConfig to set.
-
getCallerServiceInterfaceInstancePreferences
public IPreferences getCallerServiceInterfaceInstancePreferences()
Description copied from interface:IServiceInterfaceRequest
Returns the preferences of thecaller service interface instance
at level that corresponds to the menu level returned byIServiceInterfaceRequest.getCallerServiceInterfaceMenuLevel()
.- Specified by:
getCallerServiceInterfaceInstancePreferences
in interfaceIServiceInterfaceRequest
- Returns:
- the preferences.
-
getCallerServiceInterfaceMenuLevel
public ServiceInterfaceMenuLevel getCallerServiceInterfaceMenuLevel()
Description copied from interface:IServiceInterfaceRequest
Returns the service interface menu level that called the interface processed by this request.- Specified by:
getCallerServiceInterfaceMenuLevel
in interfaceIServiceInterfaceRequest
- Returns:
- the menu level.
-
isPreview
public boolean isPreview()
Description copied from interface:IPageWebResourceRequest
Returns whether the request is in preview mode.- Specified by:
isPreview
in interfaceIPageWebResourceRequest
- Specified by:
isPreview
in interfaceIServiceInterfaceRequest
- Overrides:
isPreview
in classPageWebResourceRequest
- Returns:
- whether the request is in preview mode.
-
setPreview
public void setPreview(boolean isPreview)
-
getMode
@Deprecated public int getMode()
Deprecated.- Specified by:
getMode
in interfaceIServiceInterfaceRequest
-
setMode
@Deprecated public void setMode(int mode)
Deprecated.- Specified by:
setMode
in interfaceIServiceInterfaceRequest
-
getVariableResolver
public VariableResolver getVariableResolver()
Description copied from interface:IServiceInterfaceRequestSPI
Returns theVariableResolver
for this request.- Specified by:
getVariableResolver
in interfaceIServiceInterfaceRequestSPI
- Returns:
- the
VariableResolver
for this request.
-
getFunctionMapper
public FunctionMapper getFunctionMapper()
Description copied from interface:IServiceInterfaceRequestSPI
Returns theFunctionMapper
for this request.- Specified by:
getFunctionMapper
in interfaceIServiceInterfaceRequestSPI
- Returns:
- the
FunctionMapper
for this request.
-
getPrivateParameterMap
public Map<String,String[]> getPrivateParameterMap()
- Specified by:
getPrivateParameterMap
in interfacePortletRequest
-
getPublicParameterMap
public Map<String,String[]> getPublicParameterMap()
- Specified by:
getPublicParameterMap
in interfacePortletRequest
-
getWindowID
public String getWindowID()
- Specified by:
getWindowID
in interfacePortletRequest
-
createFunctionMapper
protected FunctionMapper createFunctionMapper(ServiceContainerResponse response)
Creates aFunctionMapper
based on the given response.- Parameters:
response
- the response.- Returns:
- the created
FunctionMapper
. - Since:
- 7.0.0
-
setResponse
protected void setResponse(ServiceContainerResponse response)
Sets the given response in this request.- Parameters:
response
- the response.- Since:
- 7.0.0
-
getBaseServiceInterfaceInstanceConfig
public ServiceInterfaceInstanceConfig getBaseServiceInterfaceInstanceConfig()
Returns the base service interface instance.- Returns:
- the base service interface instance.
- Since:
- 7.0.0
-
setBaseServiceInterfaceInstanceConfig
public void setBaseServiceInterfaceInstanceConfig(ServiceInterfaceInstanceConfig baseServiceInterfaceInstanceConfig)
Sets the base interface instance.- Parameters:
baseServiceInterfaceInstanceConfig
- the base interface instance.- Since:
- 7.0.0
-
getReplaceInterfacesStorage
public ReplaceInterfacesStorage getReplaceInterfacesStorage()
Returns the replace interfaces storage parameters.- Specified by:
getReplaceInterfacesStorage
in interfaceIServiceInterfaceRequestSPI
- Returns:
- the replace interfaces storage parameters.
- Since:
- 7.0.0
-
-