Class CommandContext


  • public class CommandContext
    extends java.lang.Object
    Author:
    Tom Baeyens, Agim Emruli, Daniel Meyer
    • Field Detail

      • authorizationCheckEnabled

        protected boolean authorizationCheckEnabled
      • userOperationLogEnabled

        protected boolean userOperationLogEnabled
      • tenantCheckEnabled

        protected boolean tenantCheckEnabled
      • restrictUserOperationLogToAuthenticatedUsers

        protected boolean restrictUserOperationLogToAuthenticatedUsers
      • sessionFactories

        protected java.util.Map<java.lang.Class<?>,​SessionFactory> sessionFactories
      • sessions

        protected java.util.Map<java.lang.Class<?>,​Session> sessions
      • sessionList

        protected java.util.List<Session> sessionList
      • operationId

        protected java.lang.String operationId
    • Method Detail

      • shouldLogInfo

        protected boolean shouldLogInfo​(java.lang.Throwable exception)
      • shouldLogFine

        protected boolean shouldLogFine​(java.lang.Throwable exception)
      • shouldLogCmdException

        protected boolean shouldLogCmdException()
      • fireCommandContextClose

        protected void fireCommandContextClose()
      • fireCommandFailed

        protected void fireCommandFailed​(java.lang.Throwable t)
      • flushSessions

        protected void flushSessions()
      • getSession

        public <T> T getSession​(java.lang.Class<T> sessionClass)
      • getJobManager

        public JobManager getJobManager()
      • getSessionFactories

        public java.util.Map<java.lang.Class<?>,​SessionFactory> getSessionFactories()
      • getHistoricReportManager

        public ReportManager getHistoricReportManager()
      • registerCommandContextListener

        public void registerCommandContextListener​(CommandContextListener commandContextListener)
      • getSessions

        public java.util.Map<java.lang.Class<?>,​Session> getSessions()
      • runWithoutAuthorization

        public <T> T runWithoutAuthorization​(java.util.concurrent.Callable<T> runnable)
      • runWithoutAuthorization

        public <T> T runWithoutAuthorization​(Command<T> command)
      • runWithoutAuthorization

        protected <T> T runWithoutAuthorization​(java.util.concurrent.Callable<T> runnable,
                                                CommandContext commandContext)
      • getAuthenticatedUserId

        public java.lang.String getAuthenticatedUserId()
      • getAuthenticatedGroupIds

        public java.util.List<java.lang.String> getAuthenticatedGroupIds()
      • enableAuthorizationCheck

        public void enableAuthorizationCheck()
      • disableAuthorizationCheck

        public void disableAuthorizationCheck()
      • isAuthorizationCheckEnabled

        public boolean isAuthorizationCheckEnabled()
      • setAuthorizationCheckEnabled

        public void setAuthorizationCheckEnabled​(boolean authorizationCheckEnabled)
      • enableUserOperationLog

        public void enableUserOperationLog()
      • disableUserOperationLog

        public void disableUserOperationLog()
      • isUserOperationLogEnabled

        public boolean isUserOperationLogEnabled()
      • setLogUserOperationEnabled

        public void setLogUserOperationEnabled​(boolean userOperationLogEnabled)
      • enableTenantCheck

        public void enableTenantCheck()
      • disableTenantCheck

        public void disableTenantCheck()
      • setTenantCheckEnabled

        public void setTenantCheckEnabled​(boolean tenantCheckEnabled)
      • isTenantCheckEnabled

        public boolean isTenantCheckEnabled()
      • getCurrentJob

        public JobEntity getCurrentJob()
      • setCurrentJob

        public void setCurrentJob​(JobEntity currentJob)
      • isRestrictUserOperationLogToAuthenticatedUsers

        public boolean isRestrictUserOperationLogToAuthenticatedUsers()
      • setRestrictUserOperationLogToAuthenticatedUsers

        public void setRestrictUserOperationLogToAuthenticatedUsers​(boolean restrictUserOperationLogToAuthenticatedUsers)
      • getOperationId

        public java.lang.String getOperationId()
      • setOperationId

        public void setOperationId​(java.lang.String operationId)
      • executeWithOperationLogPrevented

        public <T> void executeWithOperationLogPrevented​(Command<T> command)