Class RestrictedBusinessLogicProcessingContext
java.lang.Object
de.uplanet.lucy.server.businesslogic.RestrictedBusinessLogicProcessingContext
- All Implemented Interfaces:
IBusinessLogicProcessingContext
,IRequestProcessingContext
,IHttpProcessingContext
,IWebProcessingContext
,IDatabaseProcessingContext
,IProcessingContext
,ISessionProcessingContext
,ISharedStateProcessingContext
,de.uplanet.lucy.server.ISimpleProcessingContext
,de.uplanet.util.IDumpable
@Scriptable
public class RestrictedBusinessLogicProcessingContext
extends Object
implements IBusinessLogicProcessingContext, de.uplanet.util.IDumpable
This
IBusinessLogicProcessingContext
is used in cases where a
real business logic processing context is not available, but an operation
that requires a IBusinessLogicProcessingContext
is likely to
succeed with a restricted context.-
Constructor Summary
ConstructorDescriptionRestrictedBusinessLogicProcessingContext
(IProcessingContext p_ctx, de.uplanet.lucy.server.connector.IServerBridgeRequest p_request) -
Method Summary
Modifier and TypeMethodDescriptiondump()
org.springframework.context.ApplicationContext
Get the Spring application context.de.uplanet.jdbc.JdbcConnection
Get the system database connection.de.uplanet.lucy.server.contextvalueprovider.IContextValueProvider
Get the context value provider.getError()
Get the context error.Get the identifier of a suitable error handler.Get the context error response data.Get the GUID of the current impersonation user.de.uplanet.lucy.server.connector.IServerBridgeRequest
Get the Web request.de.uplanet.lucy.server.connector.IServerBridgeResponse
Get the Web response.de.uplanet.lucy.server.session.ISession
Get the current portal server session.de.uplanet.lucy.server.SharedState
A map that is used to store data that are to be shared in the context.Get the time zone of the user that is associated with the current session.de.uplanet.lucy.server.engine.http.IViewData
Get a class that contains the values posted by the client.Get the processing context that was passed to the constructor.boolean
hasError()
boolean
Get the identifier of a suitable error handler.boolean
boolean
hasView()
Determine if this processing context contains a view object.de.uplanet.lucy.server.businesslogic.util.IDataRecord
For internal use only.de.uplanet.lucy.server.businesslogic.rtdata.IRtDataGroup
For internal use only.de.uplanet.lucy.server.businesslogic.util.IDataRecord
For internal use only.de.uplanet.lucy.server.businesslogic.rtdata.IRtDataGroup
For internal use only.void
internalPushRecord
(de.uplanet.lucy.server.businesslogic.util.IDataRecord p_record) For internal use only.void
internalPushRtDataGroup
(de.uplanet.lucy.server.businesslogic.rtdata.IRtDataGroup p_rtdg) For internal use only.boolean
Check if the processing context is currently impersonated.For internal use only.de.uplanet.lucy.server.session.ISession
For internal use only.void
pushImpersonateUserGuid
(String p_strImpersonateUserGuid) For internal use only.void
pushSession
(de.uplanet.lucy.server.session.ISession p_session) For internal use only.void
Set the context error.void
setErrorHandlerId
(String p_strErrorHandlerId) Set the identifier of a suitable error handler.void
setErrorResponseData
(ErrorResponseData p_errorResponseData) Set the context error response data.void
setViewData
(de.uplanet.lucy.server.engine.http.IViewData p_view) Set a class map that contains the values posted by the client for use in the BL.
-
Constructor Details
-
RestrictedBusinessLogicProcessingContext
- Parameters:
p_ctx
- A processing context that is not itself aIBusinessLogicProcessingContext
.- Throws:
IllegalArgumentException
- Ifp_ctx
isnull
, or aIBusinessLogicProcessingContext
.
-
RestrictedBusinessLogicProcessingContext
public RestrictedBusinessLogicProcessingContext(IProcessingContext p_ctx, de.uplanet.lucy.server.connector.IServerBridgeRequest p_request) - Parameters:
p_ctx
- A processing context that is not itself aIBusinessLogicProcessingContext
.p_request
- A request to be used. This takes precedence over the request that might exist in the given processing context.- Throws:
IllegalArgumentException
- Ifp_ctx
isnull
, or aIBusinessLogicProcessingContext
.
-
-
Method Details
-
getWrappedContext
Get the processing context that was passed to the constructor.- Returns:
- The processing context that was passed to the constructor.
-
getApplicationContext
public org.springframework.context.ApplicationContext getApplicationContext()Description copied from interface:IProcessingContext
Get the Spring application context.- Specified by:
getApplicationContext
in interfaceIProcessingContext
- Returns:
- The Spring application context.
-
getContextValueProvider
public de.uplanet.lucy.server.contextvalueprovider.IContextValueProvider getContextValueProvider()Description copied from interface:IProcessingContext
Get the context value provider.- Specified by:
getContextValueProvider
in interfaceIProcessingContext
- Returns:
- The context value provider.
-
getConnection
public de.uplanet.jdbc.JdbcConnection getConnection()Description copied from interface:IDatabaseProcessingContext
Get the system database connection.- Specified by:
getConnection
in interfaceIDatabaseProcessingContext
- Returns:
- The system database connection.
- Throws:
de.uplanet.lucy.server.IllegalProcessingContextException
- If the current processing context is not aIDatabaseProcessingContext
.
-
getSession
public de.uplanet.lucy.server.session.ISession getSession()Description copied from interface:ISessionProcessingContext
Get the current portal server session.- Specified by:
getSession
in interfaceISessionProcessingContext
- Returns:
- The portal server session.
-
pushSession
public void pushSession(de.uplanet.lucy.server.session.ISession p_session) Description copied from interface:ISessionProcessingContext
For internal use only.- Specified by:
pushSession
in interfaceISessionProcessingContext
-
popSession
public de.uplanet.lucy.server.session.ISession popSession()Description copied from interface:ISessionProcessingContext
For internal use only.- Specified by:
popSession
in interfaceISessionProcessingContext
-
isImpersonated
public boolean isImpersonated()Description copied from interface:ISessionProcessingContext
Check if the processing context is currently impersonated.- Specified by:
isImpersonated
in interfaceISessionProcessingContext
- Returns:
true
if the processing context is currently impersonated, orfalse
otherwise.
-
getImpersonateUserGuid
Description copied from interface:ISessionProcessingContext
Get the GUID of the current impersonation user.- Specified by:
getImpersonateUserGuid
in interfaceISessionProcessingContext
- Returns:
- The GUID of the impersonation user, or
null
if the processing context is currently not impersonated.
-
pushImpersonateUserGuid
Description copied from interface:ISessionProcessingContext
For internal use only.- Specified by:
pushImpersonateUserGuid
in interfaceISessionProcessingContext
-
popImpersonateUserGuid
Description copied from interface:ISessionProcessingContext
For internal use only.- Specified by:
popImpersonateUserGuid
in interfaceISessionProcessingContext
-
getRequest
public de.uplanet.lucy.server.connector.IServerBridgeRequest getRequest()Description copied from interface:IRequestProcessingContext
Get the Web request.- Specified by:
getRequest
in interfaceIRequestProcessingContext
- Returns:
- The Web request object.
- Throws:
de.uplanet.lucy.server.IllegalProcessingContextException
- If the current processing context is not aIRequestProcessingContext
.
-
getResponse
public de.uplanet.lucy.server.connector.IServerBridgeResponse getResponse()Description copied from interface:IHttpProcessingContext
Get the Web response.- Specified by:
getResponse
in interfaceIHttpProcessingContext
- Returns:
- The Web response object.
- Throws:
de.uplanet.lucy.server.IllegalProcessingContextException
- If the current processing context is not aIHttpProcessingContext
.
-
hasView
public boolean hasView()Description copied from interface:IHttpProcessingContext
Determine if this processing context contains a view object.- Specified by:
hasView
in interfaceIHttpProcessingContext
- Returns:
true
if the processing context contains a view, orfalse
otherwise.
-
getViewData
public de.uplanet.lucy.server.engine.http.IViewData getViewData()Description copied from interface:IHttpProcessingContext
Get a class that contains the values posted by the client. Used in the BL to get values by the field guid, control name, control guid.- Specified by:
getViewData
in interfaceIHttpProcessingContext
- Returns:
- The values that were posted by the client, or
null
if no view was restored on the server. - Throws:
de.uplanet.lucy.server.IllegalProcessingContextException
- If the current processing context is not aIHttpProcessingContext
.
-
setViewData
public void setViewData(de.uplanet.lucy.server.engine.http.IViewData p_view) Description copied from interface:IHttpProcessingContext
Set a class map that contains the values posted by the client for use in the BL.- Specified by:
setViewData
in interfaceIHttpProcessingContext
- Throws:
de.uplanet.lucy.server.IllegalProcessingContextException
- If the current processing context is not aIHttpProcessingContext
.
-
hasError
public boolean hasError()- Specified by:
hasError
in interfaceIWebProcessingContext
- Returns:
true
if the processing context contains an error, orfalse
otherwise..
-
getError
Description copied from interface:IWebProcessingContext
Get the context error.- Specified by:
getError
in interfaceIWebProcessingContext
- Returns:
- If
IWebProcessingContext.hasError()
istrue
this method returns an exception that's related to the cause of the error.
-
setError
Description copied from interface:IWebProcessingContext
Set the context error.- Specified by:
setError
in interfaceIWebProcessingContext
- Parameters:
p_error
- The context error.
-
hasErrorResponseData
public boolean hasErrorResponseData()- Specified by:
hasErrorResponseData
in interfaceIWebProcessingContext
- Returns:
true
if the processing context contains error response data, orfalse
otherwise.
-
getErrorResponseData
Description copied from interface:IWebProcessingContext
Get the context error response data.- Specified by:
getErrorResponseData
in interfaceIWebProcessingContext
- Returns:
- If
IWebProcessingContext.hasErrorResponseData()
istrue
this method returns an error response object.
-
setErrorResponseData
Description copied from interface:IWebProcessingContext
Set the context error response data.- Specified by:
setErrorResponseData
in interfaceIWebProcessingContext
- Parameters:
p_errorResponseData
- The context error response data.
-
hasErrorHandlerId
public boolean hasErrorHandlerId()Description copied from interface:IWebProcessingContext
Get the identifier of a suitable error handler.- Specified by:
hasErrorHandlerId
in interfaceIWebProcessingContext
- Returns:
- The identifier of an error handler, or
null
.
-
getErrorHandlerId
Description copied from interface:IWebProcessingContext
Get the identifier of a suitable error handler.- Specified by:
getErrorHandlerId
in interfaceIWebProcessingContext
- Returns:
- The identifier of an error handler, or
null
.
-
setErrorHandlerId
Description copied from interface:IWebProcessingContext
Set the identifier of a suitable error handler.- Specified by:
setErrorHandlerId
in interfaceIWebProcessingContext
- Parameters:
p_strErrorHandlerId
- The identifier of an error handler.
-
getUserTimeZone
Description copied from interface:ISessionProcessingContext
Get the time zone of the user that is associated with the current session.- Specified by:
getUserTimeZone
in interfaceISessionProcessingContext
- Returns:
- The time zone of the user, or
null
if no session or no user is in this context. - Throws:
de.uplanet.lucy.server.IllegalProcessingContextException
- If the current processing context is not aISessionProcessingContext
.- See Also:
-
internalPeekRecord
public de.uplanet.lucy.server.businesslogic.util.IDataRecord internalPeekRecord()Description copied from interface:IBusinessLogicProcessingContext
For internal use only.- Specified by:
internalPeekRecord
in interfaceIBusinessLogicProcessingContext
-
internalPushRecord
public void internalPushRecord(de.uplanet.lucy.server.businesslogic.util.IDataRecord p_record) Description copied from interface:IBusinessLogicProcessingContext
For internal use only.- Specified by:
internalPushRecord
in interfaceIBusinessLogicProcessingContext
-
internalPopRecord
public de.uplanet.lucy.server.businesslogic.util.IDataRecord internalPopRecord()Description copied from interface:IBusinessLogicProcessingContext
For internal use only.- Specified by:
internalPopRecord
in interfaceIBusinessLogicProcessingContext
-
internalPeekRtDataGroup
public de.uplanet.lucy.server.businesslogic.rtdata.IRtDataGroup internalPeekRtDataGroup()Description copied from interface:IBusinessLogicProcessingContext
For internal use only.- Specified by:
internalPeekRtDataGroup
in interfaceIBusinessLogicProcessingContext
-
internalPushRtDataGroup
public void internalPushRtDataGroup(de.uplanet.lucy.server.businesslogic.rtdata.IRtDataGroup p_rtdg) Description copied from interface:IBusinessLogicProcessingContext
For internal use only.- Specified by:
internalPushRtDataGroup
in interfaceIBusinessLogicProcessingContext
-
internalPopRtDataGroup
public de.uplanet.lucy.server.businesslogic.rtdata.IRtDataGroup internalPopRtDataGroup()Description copied from interface:IBusinessLogicProcessingContext
For internal use only.- Specified by:
internalPopRtDataGroup
in interfaceIBusinessLogicProcessingContext
-
dump
- Specified by:
dump
in interfacede.uplanet.util.IDumpable
-