public void checkWorkplaceRequest(HttpServletRequest request, CmsObject cms) {

        try {
            if ((OpenCms.getSiteManager().getSites().size() > 1)
                && !OpenCms.getSiteManager().isWorkplaceRequest(request)) {
                // this is a multi site-configuration, but not a request to the configured Workplace site

                CmsUser user = cms.getRequestContext().getCurrentUser();
                // to limit the number of times broadcast is called for a user, we use an expiring cache
                // with the user name as  key
                if (null == m_workplaceServerUserChecks.getIfPresent(user.getName())) {
                    m_workplaceServerUserChecks.put(user.getName(), "");
                    OpenCms.getSessionManager().sendBroadcast(
                        null,
                        Messages.get().getBundle(getWorkplaceLocale(cms)).key(
                            Messages.ERR_WORKPLACE_SERVER_CHECK_FAILED_0),
                        user);

                }

            }
        } catch (Exception e) {
            LOG.error(e.getLocalizedMessage(), e);
        }
    }
public void checkWorkplaceRequest ( HttpServletRequest request , CmsObject cms ) { try { if ( ( OpenCms . getSiteManager ( ) . getSites ( ) . size ( ) > 1 ) && ! OpenCms . getSiteManager ( ) . isWorkplaceRequest ( request ) ) { CmsUser user = cms . getRequestContext ( ) . getCurrentUser ( ) ; if ( null == m_workplaceServerUserChecks . getIfPresent ( user . getName ( ) ) ) { m_workplaceServerUserChecks . put ( user . getName ( ) , "" ) ; OpenCms . getSessionManager ( ) . sendBroadcast ( null , Messages . get ( ) . getBundle ( getWorkplaceLocale ( cms ) ) . key ( Messages . ERR_WORKPLACE_SERVER_CHECK_FAILED_0 ) , user ) ; } } } catch ( Exception e ) { LOG . error ( e . getLocalizedMessage ( ) , e ) ; } }
Checks whether the workplace is accessed through the workplace server, and sends an error message otherwise.<p>

@param request the request to check
@param cms the CmsObject to use