Loads the favorite list.

@return the list of favorites

@throws CmsException if something goes wrong
558296
public List<CmsFavoriteEntry> loadFavorites() throws CmsException {

        List<CmsFavoriteEntry> result = new ArrayList<>();
        try {
            CmsUser user = readUser();
            String data = (String)user.getAdditionalInfo(ADDINFO_KEY);
            if (CmsStringUtil.isEmptyOrWhitespaceOnly(data)) {
                return new ArrayList<>();
            }
            JSONObject json = new JSONObject(data);
            JSONArray array = json.getJSONArray(BASE_KEY);
            for (int i = 0; i < array.length(); i++) {
                JSONObject fav = array.getJSONObject(i);
                try {
                    CmsFavoriteEntry entry = new CmsFavoriteEntry(fav);
                    if (validate(entry)) {
                        result.add(entry);
                    }
                } catch (Exception e) {
                    LOG.warn(e.getLocalizedMessage(), e);
                }

            }
        } catch (JSONException e) {
            LOG.error(e.getLocalizedMessage(), e);
        }
        return result;
    }
234202
public void loadGalleries() {

        CmsRpcAction<Map<CmsGalleryType, List<CmsGalleryFolderEntry>>> action = new CmsRpcAction<Map<CmsGalleryType, List<CmsGalleryFolderEntry>>>() {

            @Override
            public void execute() {

                start(500, false);
                getService().getGalleryData(m_data.getRoot().getSitePath(), this);
            }

            @Override
            protected void onResponse(Map<CmsGalleryType, List<CmsGalleryFolderEntry>> result) {

                storeGalleryTypes(result.keySet());
                CmsSitemapView.getInstance().displayGalleries(result);
                stop(false);
            }
        };
        action.execute();
    }
1151122
public Map<String, String> computeFolderTypes() throws CmsException {

        Map<String, String> folderTypes = Maps.newHashMap();
        // do this first, since folder types from modules should be overwritten by folder types from sitemaps
        if (m_moduleConfiguration != null) {
            folderTypes.putAll(wrap(m_moduleConfiguration).getFolderTypes());
        }

        List<CmsADEConfigDataInternal> configDataObjects = new ArrayList<CmsADEConfigDataInternal>(
            m_siteConfigurationsByPath.values());
        for (CmsADEConfigDataInternal configData : configDataObjects) {
            folderTypes.putAll(wrap(configData).getFolderTypes());
        }
        return folderTypes;
    }
1209294
protected CmsUserSearchParameters getSearchParams() throws CmsException {

        CmsListState state = getListState();
        CmsUserSearchParameters params = new CmsUserSearchParameters();
        String searchFilter = state.getFilter();
        params.setSearchFilter(searchFilter);
        params.setPaging(getList().getMaxItemsPerPage(), state.getPage());
        params.setSorting(getSortKey(state.getColumn()), state.getOrder().equals(CmsListOrderEnum.ORDER_ASCENDING));
        String groupStr = getParamGroup();
        if (!CmsStringUtil.isEmpty(groupStr)) {
            CmsGroup group = getCms().readGroup(getParamGroup());
            params.setGroup(group);
        } else {
            List<CmsOrganizationalUnit> ous = OpenCms.getRoleManager().getManageableOrgUnits(getCms(), "", true, false);
            params.setAllowedOus(ous);
        }
        if (getParamFlags() != null) {
            int flags = Integer.parseInt(getParamFlags());
            params.setFlags(flags);
        }
        params.setCaseSensitive(false);
        return params;
    }
1137903
private Set<CmsResource> getResourcesFromPrincipal(CmsObject cms, CmsUUID id) throws CmsException {

        return cms.getResourcesForPrincipal(id, null, false);
    }
1225169
private List<String> getPropertyNames(CmsObject cms) throws CmsException {

        List<CmsPropertyDefinition> propDefs = cms.readAllPropertyDefinitions();
        List<String> result = new ArrayList<String>();
        for (CmsPropertyDefinition propDef : propDefs) {
            result.add(propDef.getName());
        }
        return result;
    }
1186507
def favorites(self):
        
        return bind_api(
            api=self,
            path='/favorites/list.json',
            payload_type='status', payload_list=True,
            allowed_param=['screen_name', 'user_id', 'max_id', 'count', 'since_id', 'max_id']
        )
99637
protected List<CmsResource> getChildren(CmsResource resource) throws CmsException {

        return m_cms.getSubFolders(resource.getRootPath(), m_filter);
    }
1122540
protected Map<String, String> getFolderTypes() throws CmsException {

        Map<String, String> result = new HashMap<String, String>();
        CmsObject cms = OpenCms.initCmsObject(getCms());
        if (m_data.isModuleConfig()) {
            Set<String> siteRoots = OpenCms.getSiteManager().getSiteRoots();
            for (String siteRoot : siteRoots) {
                cms.getRequestContext().setSiteRoot(siteRoot);
                for (CmsResourceTypeConfig config : getResourceTypes()) {
                    if (!config.isDetailPagesDisabled()) {
                        String typeName = config.getTypeName();
                        if (!config.isPageRelative()) { // elements stored with container pages can not be used as detail contents
                            String folderPath = config.getFolderPath(cms, null);
                            result.put(CmsStringUtil.joinPaths(folderPath, "/"), typeName);
                        }
                    }
                }
            }
        } else {
            for (CmsResourceTypeConfig config : getResourceTypes()) {
                if (!config.isDetailPagesDisabled()) {
                    String typeName = config.getTypeName();
                    if (!config.isPageRelative()) { // elements stored with container pages can not be used as detail contents
                        String folderPath = config.getFolderPath(getCms(), null);
                        result.put(CmsStringUtil.joinPaths(folderPath, "/"), typeName);
                    }
                }
            }
        }
        return result;
    }
1042715
protected List<CmsUUID> changeAvailability() throws CmsException {

        Date released = m_releasedField.getDate();
        Date expired = m_expiredField.getDate();
        boolean resetReleased = m_resetReleased.getValue().booleanValue();
        boolean resetExpired = m_resetExpired.getValue().booleanValue();
        boolean modifySubresources = m_subresourceModificationField.getValue().booleanValue();
        List<CmsUUID> changedIds = new ArrayList<CmsUUID>();
        for (CmsResource resource : m_dialogContext.getResources()) {
            changeAvailability(resource, released, resetReleased, expired, resetExpired, modifySubresources);
            changedIds.add(resource.getStructureId());
        }

        String notificationInterval = m_notificationIntervalField.getValue().trim();
        int notificationIntervalInt = 0;
        try {
            notificationIntervalInt = Integer.parseInt(notificationInterval);
        } catch (NumberFormatException e) {
            LOG.warn(e.getLocalizedMessage(), e);
        }
        Boolean notificationEnabled = m_notificationEnabledField.getValue();
        boolean notificationSettingsUnchanged = notificationInterval.equals(m_initialNotificationInterval)
            && notificationEnabled.equals(m_initialNotificationEnabled);

        CmsObject cms = A_CmsUI.getCmsObject();
        if (!notificationSettingsUnchanged) {
            for (CmsResource resource : m_dialogContext.getResources()) {
                performSingleResourceNotification(
                    A_CmsUI.getCmsObject(),
                    cms.getSitePath(resource),
                    notificationEnabled.booleanValue(),
                    notificationIntervalInt,
                    m_modifySiblingsField.getValue().booleanValue());
            }

        }
        return changedIds;
    }
702083
public List<I_CmsHistoryResource> readAllAvailableVersions(CmsResource resource) throws CmsException {

        return m_securityManager.readAllAvailableVersions(m_context, resource);
    }
739765
public List<I_CmsDataViewItem> getSelection() {

        List<I_CmsDataViewItem> result = Lists.newArrayList();
        Object val = m_table.get().getValue();
        if (val == null) {
            return result;
        }
        if (val instanceof Collection) {
            Collection<?> results = (Collection<?>)val;
            for (Object obj : results) {
                result.add(m_dataView.getItemById((String)obj));
            }
        } else {
            result.add(m_dataView.getItemById((String)val));
        }
        return result;

    }
430855
private List<CmsSearchIndexSource> searchIndexSources() {

        CmsSearchManager manager = OpenCms.getSearchManager();
        return new LinkedList<CmsSearchIndexSource>(manager.getSearchIndexSources().values());

    }
1010137
public void saveFavorites(List<CmsFavoriteEntry> favorites) throws CmsException {

        try {
            JSONObject json = new JSONObject();
            JSONArray array = new JSONArray();
            for (CmsFavoriteEntry entry : favorites) {
                array.put(entry.toJson());
            }
            json.put(BASE_KEY, array);
            String data = json.toString();
            CmsUser user = readUser();
            user.setAdditionalInfo(ADDINFO_KEY, data);
            m_cms.writeUser(user);
        } catch (JSONException e) {
            LOG.error(e.getLocalizedMessage(), e);
        }

    }
32384
protected CmsUserSearchParameters getSearchParams() throws CmsException {

        CmsListState state = getListState();
        CmsUserSearchParameters params = new CmsUserSearchParameters();
        String searchFilter = state.getFilter();
        params.setSearchFilter(searchFilter);
        if (!otherOrgUnitsVisible()) {
            CmsOrganizationalUnit ou = OpenCms.getOrgUnitManager().readOrganizationalUnit(getCms(), getParamOufqn());
            params.setOrganizationalUnit(ou);
        }
        params.setPaging(getList().getMaxItemsPerPage(), state.getPage());
        CmsRole role = CmsRole.valueOf(getCms().readGroup(getParamRole()));
        Set<CmsGroup> roleGroups = OpenCms.getRoleManager().getRoleGroups(getCms(), role, false);
        params.setAnyGroups(roleGroups);
        params.setSorting(getSortKey(state.getColumn()), state.getOrder().equals(CmsListOrderEnum.ORDER_ASCENDING));
        params.setFilterByGroupOu(false);
        return params;
    }
977433
private void loadCategories() {

        CmsRpcAction<List<CmsCategoryTreeEntry>> action = new CmsRpcAction<List<CmsCategoryTreeEntry>>() {

            @Override
            public void execute() {

                start(200, true);
                CmsCoreProvider.getService().getCategoriesForSitePath(m_dialogBean.getReferenceSitePath(), this);
            }

            @Override
            protected void onResponse(List<CmsCategoryTreeEntry> result) {

                m_dialogBean.setCategories(result);
                m_handler.setCategoriesTabContent(result, new ArrayList<String>());
                m_handler.onCategoriesTabSelection();
                stop(false);
            }
        };
        action.execute();
    }
95870
public Set<CmsUser> readResponsibleUsers(CmsResource resource) throws CmsException {

        return m_securityManager.readResponsibleUsers(m_context, resource);
    }