private List<CmsSelectWidgetOption> getViews() {

        List<CmsSelectWidgetOption> views = new ArrayList<CmsSelectWidgetOption>();

        // determine the default view
        String defaultView = null;
        if ((m_user != null) && CmsStringUtil.isNotEmptyOrWhitespaceOnly(m_user.getName())) {
            defaultView = new CmsUserSettings(m_user).getStartView();
        }
        if (CmsStringUtil.isEmptyOrWhitespaceOnly(defaultView)) {
            defaultView = VIEW_WORKPLACE;
        }

        // get the workplace views
        List<CmsWorkplaceView> list = new ArrayList<CmsWorkplaceView>(OpenCms.getWorkplaceManager().getViews());

        // add the direct edit view to the list
        String displayName = getMessages().key(org.opencms.workplace.commons.Messages.GUI_LABEL_DIRECT_EDIT_VIEW_0);
        list.add(new CmsWorkplaceView(displayName, VIEW_DIRECT_EDIT, Float.valueOf(100)));

        // loop over the views and create a CmsSelectWidgetOption for each readable view
        for (CmsWorkplaceView view : list) {
            boolean visible = true;
            try {
                getCms().readResource(view.getUri());
            } catch (CmsException e) {
                // should usually never happen
                if (LOG.isInfoEnabled()) {
                    LOG.info(e.getLocalizedMessage());
                }
                visible = false;
            }
            if (visible) {
                boolean selected = view.getUri().equals(defaultView);
                views.add(new CmsSelectWidgetOption(view.getUri(), selected, resolveMacros(view.getKey()), null));
            }
        }
        return views;
    }
private List < CmsSelectWidgetOption > getViews ( ) { List < CmsSelectWidgetOption > views = new ArrayList < CmsSelectWidgetOption > ( ) ; String defaultView = null ; if ( ( m_user != null ) && CmsStringUtil . isNotEmptyOrWhitespaceOnly ( m_user . getName ( ) ) ) { defaultView = new CmsUserSettings ( m_user ) . getStartView ( ) ; } if ( CmsStringUtil . isEmptyOrWhitespaceOnly ( defaultView ) ) { defaultView = VIEW_WORKPLACE ; } List < CmsWorkplaceView > list = new ArrayList < CmsWorkplaceView > ( OpenCms . getWorkplaceManager ( ) . getViews ( ) ) ; String displayName = getMessages ( ) . key ( org . opencms . workplace . commons . Messages . GUI_LABEL_DIRECT_EDIT_VIEW_0 ) ; list . add ( new CmsWorkplaceView ( displayName , VIEW_DIRECT_EDIT , Float . valueOf ( 100 ) ) ) ; for ( CmsWorkplaceView view : list ) { boolean visible = true ; try { getCms ( ) . readResource ( view . getUri ( ) ) ; } catch ( CmsException e ) { if ( LOG . isInfoEnabled ( ) ) { LOG . info ( e . getLocalizedMessage ( ) ) ; } visible = false ; } if ( visible ) { boolean selected = view . getUri ( ) . equals ( defaultView ) ; views . add ( new CmsSelectWidgetOption ( view . getUri ( ) , selected , resolveMacros ( view . getKey ( ) ) , null ) ) ; } } return views ; }
Returns a list of options for the view selector.<p>

@return a list of options for the view selector