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
ThisIBusinessLogicProcessingContext
is used in cases where a real business logic processing context is not available, but an operation that requires aIBusinessLogicProcessingContext
is likely to succeed with a restricted context.
-
-
Constructor Summary
Constructors Constructor Description RestrictedBusinessLogicProcessingContext(IProcessingContext p_ctx)
RestrictedBusinessLogicProcessingContext(IProcessingContext p_ctx, IServerBridgeRequest p_request)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
dump()
org.springframework.context.ApplicationContext
getApplicationContext()
Get the Spring application context.de.uplanet.jdbc.JdbcConnection
getConnection()
Get the system database connection.de.uplanet.lucy.server.contextvalueprovider.IContextValueProvider
getContextValueProvider()
Get the context value provider.Throwable
getError()
Get the context error.String
getErrorHandlerId()
Get the identifier of a suitable error handler.ErrorResponseData
getErrorResponseData()
Get the context error response data.String
getImpersonateUserGuid()
Get the GUID of the current impersonation user.IServerBridgeRequest
getRequest()
Get the Web request.IServerBridgeResponse
getResponse()
Get the Web response.ISession
getSession()
Get the current portal server session.SharedState
getSharedState()
A map that is used to store data that are to be shared in the context.TimeZone
getUserTimeZone()
Get the time zone of the user that is associated with the current session.IViewData
getViewData()
Get a class that contains the values posted by the client.IProcessingContext
getWrappedContext()
Get the processing context that was passed to the constructor.boolean
hasError()
boolean
hasErrorHandlerId()
Get the identifier of a suitable error handler.boolean
hasErrorResponseData()
boolean
hasView()
Determine if this processing context contains a view object.de.uplanet.lucy.server.businesslogic.util.IDataRecord
internalPeekRecord()
For internal use only.de.uplanet.lucy.server.businesslogic.rtdata.IRtDataGroup
internalPeekRtDataGroup()
For internal use only.de.uplanet.lucy.server.businesslogic.util.IDataRecord
internalPopRecord()
For internal use only.de.uplanet.lucy.server.businesslogic.rtdata.IRtDataGroup
internalPopRtDataGroup()
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
isImpersonated()
Check if the processing context is currently impersonated.String
popImpersonateUserGuid()
For internal use only.ISession
popSession()
For internal use only.void
pushImpersonateUserGuid(String p_strImpersonateUserGuid)
For internal use only.void
pushSession(ISession p_session)
For internal use only.void
setError(Throwable p_error)
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(IViewData p_view)
Set a class map that contains the values posted by the client for use in the BL.
-
-
-
Constructor Detail
-
RestrictedBusinessLogicProcessingContext
public RestrictedBusinessLogicProcessingContext(IProcessingContext p_ctx)
- Parameters:
p_ctx
- A processing context that is not itself aIBusinessLogicProcessingContext
.- Throws:
IllegalArgumentException
- Ifp_ctx
isnull
, or aIBusinessLogicProcessingContext
.
-
RestrictedBusinessLogicProcessingContext
public RestrictedBusinessLogicProcessingContext(IProcessingContext p_ctx, 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 Detail
-
getWrappedContext
public IProcessingContext 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 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(ISession p_session)
Description copied from interface:ISessionProcessingContext
For internal use only.- Specified by:
pushSession
in interfaceISessionProcessingContext
-
popSession
public 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
public String 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
public void pushImpersonateUserGuid(String p_strImpersonateUserGuid)
Description copied from interface:ISessionProcessingContext
For internal use only.- Specified by:
pushImpersonateUserGuid
in interfaceISessionProcessingContext
-
popImpersonateUserGuid
public String popImpersonateUserGuid()
Description copied from interface:ISessionProcessingContext
For internal use only.- Specified by:
popImpersonateUserGuid
in interfaceISessionProcessingContext
-
getRequest
public 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
.
-
getSharedState
public SharedState getSharedState()
Description copied from interface:ISharedStateProcessingContext
A map that is used to store data that are to be shared in the context.Note: Do not misuse the shared state.
- Specified by:
getSharedState
in interfaceISharedStateProcessingContext
- Returns:
- A reference to the map that contains the shared data.
- Throws:
de.uplanet.lucy.server.IllegalProcessingContextException
- If the current processing context is not aISharedStateProcessingContext
.
-
getResponse
public 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 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(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
public Throwable 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
public void setError(Throwable p_error)
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
public ErrorResponseData 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
public void setErrorResponseData(ErrorResponseData p_errorResponseData)
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
public String 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
public void setErrorHandlerId(String p_strErrorHandlerId)
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
public TimeZone 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:
ISessionProcessingContext.getSession()
-
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
public String dump()
- Specified by:
dump
in interfacede.uplanet.util.IDumpable
-
-