Converts a list of IDs to resources.<p>

@param cms the CmObject used for reading the resources
@param ids the list of IDs

@return a list of resources
324026
private List<CmsResource> idsToResources(CmsObject cms, List<CmsUUID> ids) {

        List<CmsResource> result = new ArrayList<CmsResource>();
        for (CmsUUID id : ids) {
            try {
                CmsResource resource = cms.readResource(id, CmsResourceFilter.ALL);
                result.add(resource);
            } catch (CmsException e) {
                // should never happen
                logError(e);
            }
        }
        return result;
    }
573788
protected void convertSearchResults(final Collection<CmsSearchResource> searchResults) {

        m_foundResources = new ArrayList<I_CmsSearchResourceBean>();
        for (final CmsSearchResource searchResult : searchResults) {
            m_foundResources.add(new CmsSearchResourceBean(searchResult, m_cmsObject));
        }
    }
246130
public void setIdValue(CmsObject cms, CmsUUID id) {

        CmsRelationType type = getRelationType(getPath());
        CmsLink link = new CmsLink(TYPE_VFS_LINK, type, id, "@", true);
        // link management check
        link.checkConsistency(cms);
        // update xml node
        CmsLinkUpdateUtil.updateXmlForVfsFile(link, m_element.addElement(CmsXmlPage.NODE_LINK));

    }
523065
public List<CmsJspResourceWrapper> readFilesInFolder(String resourcePath) throws CmsException {

        return CmsJspElFunctions.convertResourceList(m_cms, m_cms.getFilesInFolder(resourcePath));
    }
1287963
public void setIds(java.util.Collection<String> ids) {
        if (ids == null) {
            this.ids = null;
            return;
        }

        this.ids = new com.amazonaws.internal.SdkInternalList<String>(ids);
    }
1366830
protected List<CmsModelResourceInfo> createModelInfos(List<CmsNewResourceInfo> resourceInfos) {

        List<CmsModelResourceInfo> result = new ArrayList<CmsModelResourceInfo>();
        for (CmsNewResourceInfo resInfo : resourceInfos) {
            CmsModelResourceInfo model = new CmsModelResourceInfo();
            model.setTitle(resInfo.getTitle());
            model.setSubTitle(resInfo.getSubTitle());
            model.setStructureId(resInfo.getCopyResourceId());
            model.setResourceType(CmsGwtConstants.TYPE_CONTAINERPAGE);
            result.add(model);
        }
        return result;
    }
1175915
protected List<CmsResource> getDirectPages() throws CmsException {

        List<CmsResource> result = new ArrayList<CmsResource>();
        result.addAll(getNavigationPages());
        Set<String> includeRoots = m_includeExcludeSet.getIncludeRoots();
        for (String includeRoot : includeRoots) {
            try {
                CmsResource resource = m_guestCms.readResource(includeRoot);
                if (resource.isFile()) {
                    result.add(resource);
                } else {
                    List<CmsResource> subtreeFiles = m_guestCms.readResources(
                        includeRoot,
                        CmsResourceFilter.DEFAULT_FILES,
                        true);
                    result.addAll(subtreeFiles);
                }
            } catch (CmsVfsResourceNotFoundException e) {
                LOG.warn("Could not read include resource: " + includeRoot);
            }
        }
        Iterator<CmsResource> filterIter = result.iterator();
        while (filterIter.hasNext()) {
            CmsResource currentResource = filterIter.next();
            if (currentResource.isInternal() || m_includeExcludeSet.isExcluded(currentResource.getRootPath())) {
                filterIter.remove();
            }
        }
        return result;
    }
1061662
public List<CmsCategory> readResourceCategories(CmsObject cms, CmsResource resource) throws CmsException {

        return internalReadResourceCategories(cms, resource, false);
    }
807419
private void initDeletedResources(CmsObject cms, List<I_CmsHistoryResource> deletedResources) throws CmsException {

        Collections.sort(deletedResources, new Comparator<I_CmsHistoryResource>() {

            public int compare(I_CmsHistoryResource first, I_CmsHistoryResource second) {

                return first.getRootPath().compareTo(second.getRootPath());
            }
        });
        m_deletedResourceContainer.removeAllComponents();
        m_selectionContainer = new IndexedContainer();
        m_selectionContainer.addContainerProperty(PROP_SELECTED, Boolean.class, Boolean.FALSE);
        m_okButton.setEnabled(!deletedResources.isEmpty());
        if (deletedResources.isEmpty()) {
            m_deletedResourceContainer.addComponent(
                new Label(CmsVaadinUtils.getMessageText(org.opencms.workplace.list.Messages.GUI_LIST_EMPTY_0)));

        }
        for (I_CmsHistoryResource deleted : deletedResources) {
            I_CmsResourceType resType = OpenCms.getResourceManager().getResourceType(deleted.getTypeId());
            String typeName = resType.getTypeName();
            CmsExplorerTypeSettings explorerType = OpenCms.getWorkplaceManager().getExplorerTypeSetting(typeName);
            String title = cms.getRequestContext().removeSiteRoot(deleted.getRootPath());

            String subtitle = CmsVaadinUtils.getMessageText(
                org.opencms.ui.Messages.GUI_RESTOREDELETED_DATE_VERSION_2,
                CmsVfsService.formatDateTime(cms, deleted.getDateLastModified()),
                "" + deleted.getVersion());
            if (explorerType == null) {
                explorerType = OpenCms.getWorkplaceManager().getExplorerTypeSetting(
                    deleted.isFile()
                    ? CmsResourceTypeUnknownFile.RESOURCE_TYPE_NAME
                    : CmsResourceTypeUnknownFolder.RESOURCE_TYPE_NAME);
            }
            CmsResourceInfo info = new CmsResourceInfo(
                title,
                subtitle,
                CmsResourceUtil.getBigIconResource(explorerType, deleted.getName()));
            info.setWidth("100%");
            HorizontalLayout hl = new HorizontalLayout();
            hl.setWidth("100%");
            CheckBox checkbox = new CheckBox();
            hl.addComponent(checkbox);
            hl.addComponent(info);
            hl.setExpandRatio(info, 1);
            hl.setComponentAlignment(checkbox, Alignment.MIDDLE_LEFT);
            m_selectionContainer.addItem(deleted.getStructureId());
            checkbox.setPropertyDataSource(
                m_selectionContainer.getItem(deleted.getStructureId()).getItemProperty(PROP_SELECTED));
            m_deletedResourceContainer.addComponent(hl);
        }

    }
845873
private List<CmsDecorationMap> getDecorationMaps(CmsObject cms, List<CmsResource> decorationListFiles) {

        List<CmsDecorationMap> decorationMaps = new ArrayList<CmsDecorationMap>();
        Iterator<CmsResource> i = decorationListFiles.iterator();
        while (i.hasNext()) {
            CmsResource res = i.next();
            try {
                CmsDecorationMap decMap = (CmsDecorationMap)CmsVfsMemoryObjectCache.getVfsMemoryObjectCache().getCachedObject(
                    cms,
                    res.getRootPath());
                if (decMap == null) {
                    decMap = new CmsDecorationMap(cms, res, this);
                    CmsVfsMemoryObjectCache.getVfsMemoryObjectCache().putCachedObject(cms, res.getRootPath(), decMap);
                }

                decorationMaps.add(decMap);
            } catch (CmsException e) {
                if (LOG.isErrorEnabled()) {
                    LOG.error(
                        Messages.get().getBundle().key(
                            Messages.LOG_DECORATION_DEFINITION_CREATE_MAP_2,
                            res.getName(),
                            e));
                }
            }
        }
        return decorationMaps;
    }
852989
protected List<CmsResource> getResources() {

        List<CmsResource> result = Collections.emptyList();
        // get all image resources of the folder
        CmsResourceFilter filter = CmsResourceFilter.DEFAULT;
        try {
            CmsObject cms = getCms();
            result = cms.readResources(getParamResource(), filter, false);

        } catch (CmsException e) {
            // log, should never happen
            if (LOG.isErrorEnabled()) {
                LOG.error(e.getLocalizedMessage(getLocale()));
            }
        }
        return result;
    }
180465
protected List<CmsUUID> itemIdsToUUIDs(Collection<String> itemIds) {

        List<CmsUUID> ids = new ArrayList<CmsUUID>();
        for (String itemId : itemIds) {
            ids.add(getUUIDFromItemID(itemId));
        }
        return ids;
    }
1015713
public List<I_CmsFormatterBean> getDisplayFormatters(CmsObject cms) {

        List<I_CmsFormatterBean> result = new ArrayList<I_CmsFormatterBean>();

        for (I_CmsFormatterBean formatter : getCachedFormatters().getFormatters().values()) {
            if (formatter.isDisplayFormatter()) {
                result.add(formatter);
            }
        }
        return result;
    }
1295097
private List<CmsSearchIndexSource> searchIndexSources() {

        CmsSearchManager manager = OpenCms.getSearchManager();
        I_CmsSearchIndex index = manager.getIndex(getParamIndexName());
        List<CmsSearchIndexSource> sources = index.getSources();
        return sources;
    }
1354245
public Map<CmsUUID, CmsClientSitemapEntry> getEntriesById(Collection<CmsUUID> ids) {

        // TODO: use some map of id -> entry instead
        List<CmsClientSitemapEntry> entriesToProcess = new ArrayList<CmsClientSitemapEntry>();
        Map<CmsUUID, CmsClientSitemapEntry> result = new HashMap<CmsUUID, CmsClientSitemapEntry>();

        entriesToProcess.add(m_data.getRoot());
        while (!entriesToProcess.isEmpty()) {
            CmsClientSitemapEntry entry = entriesToProcess.remove(entriesToProcess.size() - 1);
            if (ids.contains(entry.getId())) {
                result.put(entry.getId(), entry);
                if (result.size() == ids.size()) {
                    return result;
                }
            }
            entriesToProcess.addAll(entry.getSubEntries());
        }
        return result;
    }
1157690
public Map<String, String> getParameters(CmsObject cms) {

        Map<String, String> result = new LinkedHashMap<String, String>(m_parameters);
        if (cms != null) {
            String userParamsStr = (String)(cms.getRequestContext().getCurrentUser().getAdditionalInfo().get(
                "ADE_PARAMS"));
            if (userParamsStr != null) {
                Map<String, String> userParams = CmsStringUtil.splitAsMap(userParamsStr, "|", ":");
                result.putAll(userParams);
            }
        }
        return result;
    }
99637
protected List<CmsResource> getChildren(CmsResource resource) throws CmsException {

        return m_cms.getSubFolders(resource.getRootPath(), m_filter);
    }