Gets a ResourceMap which contains, for each resource reachable from the original set of resources, the directly related resources.<p>

@return a map from resources to their directly related resources
327870
private ResourceMap computeRelatedResources() {

        ResourceMap relatedResources = new ResourceMap();
        Set<CmsResource> resourcesToProcess = Sets.newHashSet(m_originalResources);
        Set<CmsResource> processedResources = Sets.newHashSet();
        while (!resourcesToProcess.isEmpty()) {
            CmsResource currentResource = resourcesToProcess.iterator().next();
            resourcesToProcess.remove(currentResource);
            processedResources.add(currentResource);
            if (!currentResource.getState().isDeleted()) {
                Set<CmsResource> directlyRelatedResources = getDirectlyRelatedResources(currentResource);
                for (CmsResource target : directlyRelatedResources) {
                    if (!processedResources.contains(target)) {
                        resourcesToProcess.add(target);
                    }
                    relatedResources.get(currentResource).add(target);
                }
            }
        }
        return relatedResources;
    }
1326376
@Nullable
    public final Resources getResources() {
        Activity activity = getActivity();
        return activity != null ? activity.getResources() : null;
    }
253555
private Map<String, GroovyRunner> getMap() {
        Map<String, GroovyRunner> map = runnerMap;
        if (map == null) {
            writeLock.lock();
            try {
                if ((map = runnerMap) == null) {
                    runnerMap = map = new LinkedHashMap<>();
                    load(null);
                }
            } finally {
                writeLock.unlock();
            }
        }
        return map;
    }
643457
protected Map<String, CmsDefaultSet<String>> safeGetAllowedContextMap() {

        try {
            return OpenCms.getResourceManager().getAllowedContextMap(m_cms);
        } catch (Exception e) {
            LOG.error(e.getLocalizedMessage(), e);
            return Collections.emptyMap();
        }
    }
917111
public Map<String, String[]> getParameterMap() {

        if (m_parameters == null) {
            m_parameters = CmsRequestUtil.createParameterMap(m_query);
        }
        return m_parameters;
    }
594187
public Map<String, Map<String, Set<String>>> getTargetLanguagesMap() {
        if (targetLanguagesMap == null) {
            assert false;
            return Collections.emptyMap();
        }
        return Collections.unmodifiableMap(targetLanguagesMap);
    }
1133726
protected Map<String, CmsProperty> getActiveProperties() {

        // get all used properties for the resource
        if (m_activeProperties == null) {
            try {
                m_activeProperties = CmsPropertyAdvanced.getPropertyMap(
                    getCms().readPropertyObjects(getParamResource(), false));
            } catch (CmsException e) {
                // create an empty list
                if (LOG.isInfoEnabled()) {
                    LOG.info(e.getLocalizedMessage());
                }
                m_activeProperties = new HashMap<String, CmsProperty>();
            }
        }
        return m_activeProperties;
    }
1304134
public Map<String, List<Locale>> getAvailableLocales() {

        if (m_availableLocales == null) {
            // create lazy map only on demand
            m_availableLocales = CmsCollectionsGenericWrapper.createLazyMap(new CmsAvailableLocaleLoaderTransformer());
        }
        return m_availableLocales;
    }
940713
public List<String> getResources() {

        List<String> res = new ArrayList<String>();
        for (I_CmsEditableGroupRow row : m_resourcesGroup.getRows()) {
            res.add(((CmsPathSelectField)row.getComponent()).getValue());
        }
        return res;
    }
771776
public java.util.List<Resource> getResources() {
        if (resources == null) {
            resources = new com.amazonaws.internal.SdkInternalList<Resource>();
        }
        return resources;
    }
612932
public @NotNull List<Resource> getResources() {
    return getResources((Predicate<Resource>)null, (Resource)null);
  }
415168
private Map<String,Object> getMap()
    {
        if (m_data == null)
            m_data = new HashMap<String,Object>();
        return (Map<String, Object>)m_data;
    }
1152159
private Set<CmsResource> getDirectlyRelatedResources(CmsResource currentResource) {

        Set<CmsResource> directlyRelatedResources = Sets.newHashSet();
        List<CmsRelation> relations = getRelationsFromResource(currentResource);
        for (CmsRelation relation : relations) {
            LOG.info("Trying to read resource for relation " + relation.getTargetPath());
            CmsResource target = getResource(relation.getTargetId());
            if (target != null) {
                if (relation.getType().isStrong() || shouldAddWeakRelationTarget(target)) {
                    directlyRelatedResources.add(target);
                }
            }
        }
        try {
            CmsResource parentFolder = m_cms.readParentFolder(currentResource.getStructureId());
            if (parentFolder != null) { // parent folder of root folder is null
                if (parentFolder.getState().isNew() || currentResource.isFile()) {
                    directlyRelatedResources.add(parentFolder);
                }
            }
        } catch (CmsException e) {
            LOG.error(
                "Error processing parent folder for " + currentResource.getRootPath() + ": " + e.getLocalizedMessage(),
                e);
        }

        try {
            directlyRelatedResources.addAll(
                m_relatedResourceProvider.getAdditionalRelatedResources(m_cms, currentResource));
        } catch (Exception e) {
            LOG.error(
                "Error processing additional related resource for "
                    + currentResource.getRootPath()
                    + ": "
                    + e.getLocalizedMessage(),
                e);
        }
        return directlyRelatedResources;
    }
1104754
public java.util.List<ResourceTag> getResourceTagList() {
        if (resourceTagList == null) {
            resourceTagList = new com.amazonaws.internal.SdkInternalList<ResourceTag>();
        }
        return resourceTagList;
    }
783903
public java.util.List<Resource> getTotalResources() {
        if (totalResources == null) {
            totalResources = new com.amazonaws.internal.SdkInternalList<Resource>();
        }
        return totalResources;
    }
236445
@java.lang.Deprecated
  public java.util.Map<java.lang.String, java.lang.String> getResourceLabels() {
    return getResourceLabelsMap();
  }
98092
public Map<K, List<V>> asMap() {
		Map<K, List<V>> view = new LinkedHashMap<K, List<V>>(map.size());
		for (Map.Entry<K, List<V>> entry : map.entrySet()) {
			K key = entry.getKey();
			List<V> value = entry.getValue();
			view.put(key, Collections.unmodifiableList(value));
		}
		return Collections.unmodifiableMap(view);
	}