@Override
    public CmsAppVisibilityStatus getVisibility(CmsObject cms) {

        if (OpenCms.getRoleManager().hasRole(cms, CmsRole.EDITOR)) {
            String siteRoot = cms.getRequestContext().getSiteRoot();
            boolean active = CmsStringUtil.isNotEmptyOrWhitespaceOnly(siteRoot);
            HttpServletRequest req = CmsVaadinUtils.getRequest();
            String message = null;
            if (active) {
                if (req != null) {
                    // this is a VAADIN UI request
                    active = getPath(cms, req.getSession()) != null;
                    if (!active) {
                        message = Messages.get().getBundle(OpenCms.getWorkplaceManager().getWorkplaceLocale(cms)).key(
                            Messages.GUI_SITEMAP_COULD_NOT_BE_DETERMINED_0);
                    }
                }
            } else {
                message = Messages.get().getBundle(OpenCms.getWorkplaceManager().getWorkplaceLocale(cms)).key(
                    Messages.GUI_SITEMAP_NOT_AVAILABLE_0);
            }
            return new CmsAppVisibilityStatus(true, active, message);
        } else {
            return CmsAppVisibilityStatus.INVISIBLE;
        }
    }
@ Override public CmsAppVisibilityStatus getVisibility ( CmsObject cms ) { if ( OpenCms . getRoleManager ( ) . hasRole ( cms , CmsRole . EDITOR ) ) { String siteRoot = cms . getRequestContext ( ) . getSiteRoot ( ) ; boolean active = CmsStringUtil . isNotEmptyOrWhitespaceOnly ( siteRoot ) ; HttpServletRequest req = CmsVaadinUtils . getRequest ( ) ; String message = null ; if ( active ) { if ( req != null ) { active = getPath ( cms , req . getSession ( ) ) != null ; if ( ! active ) { message = Messages . get ( ) . getBundle ( OpenCms . getWorkplaceManager ( ) . getWorkplaceLocale ( cms ) ) . key ( Messages . GUI_SITEMAP_COULD_NOT_BE_DETERMINED_0 ) ; } } } else { message = Messages . get ( ) . getBundle ( OpenCms . getWorkplaceManager ( ) . getWorkplaceLocale ( cms ) ) . key ( Messages . GUI_SITEMAP_NOT_AVAILABLE_0 ) ; } return new CmsAppVisibilityStatus ( true , active , message ) ; } else { return CmsAppVisibilityStatus . INVISIBLE ; } }
@see org.opencms.ui.apps.I_CmsWorkplaceAppConfiguration#getVisibility(org.opencms.file.CmsObject)