Creates the publish resource warnings.<p>

@return a map from structure ids to the warnings for the corresponding resources
7471
protected Map<CmsUUID, CmsPublishResourceInfo> computeWarnings() {

        Map<CmsUUID, CmsPublishResourceInfo> warnings = Maps.newHashMap();
        Set<CmsResource> resourcesWithoutErrors = new HashSet<CmsResource>(m_resources.values());

        List<I_PublishResourceValidator> validators = getValidators();
        List<Set<CmsResource>> excludedSetsForValidators = Lists.newArrayList();
        for (int i = 0; i < validators.size(); i++) {
            I_PublishResourceValidator validator = validators.get(i);
            Set<CmsResource> excluded = validator.findInvalidResources(resourcesWithoutErrors);
            resourcesWithoutErrors.removeAll(excluded);
            excludedSetsForValidators.add(excluded);
        }
        for (CmsResource resource : m_resources.values()) {
            CmsPublishResourceInfo info = null;
            try {
                for (int i = 0; i < validators.size(); i++) {
                    if (excludedSetsForValidators.get(i).contains(resource)) {
                        info = validators.get(i).getInfoForResource(resource);
                        break;
                    }
                }
            } catch (CmsException e) {
                LOG.error(e.getLocalizedMessage(), e);
            }
            warnings.put(resource.getStructureId(), info);
        }
        return warnings;
    }
613009
private List<CmsResource> getResources() {

        List<CmsResource> result = new LinkedList<CmsResource>();
        CmsObject cms = getCms();
        CmsResourceFilter filter = CmsResourceFilter.ALL;
        try {
            for (String path : m_paths) {
                List<CmsResource> resources = cms.readResources(path, filter, true);
                result.addAll(resources);
            }
        } catch (CmsException e) {
            if (LOG.isErrorEnabled()) {
                LOG.error(Messages.get().getBundle().key(Messages.LOG_ERR_PROPERTYVIEWER_READRESOURCES_0), e);
            }
            result = Collections.emptyList();
        }
        return result;
    }
82748
public List<CmsResource> getResourcesWithBrokenLinks() {

        if (m_resourcesWithBrokenLinks == null) {
            // sort the resulting hash map
            List<String> resources = new ArrayList<String>(m_brokenRelations.keySet());
            Collections.sort(resources);

            m_resourcesWithBrokenLinks = new ArrayList<CmsResource>(resources.size());
            m_notVisibleResourcesCount = 0;
            // remove not visible resources
            CmsResourceFilter filter = CmsResourceFilter.IGNORE_EXPIRATION.addRequireVisible();
            String storedSiteRoot = m_cms.getRequestContext().getSiteRoot();
            try {
                m_cms.getRequestContext().setSiteRoot("/");
                Iterator<String> itResources = resources.iterator();
                while (itResources.hasNext()) {
                    String resourceName = itResources.next();
                    try {
                        m_resourcesWithBrokenLinks.add(m_cms.readResource(resourceName, filter));
                    } catch (Exception e) {
                        // resource is not visible, increase count
                        m_notVisibleResourcesCount++;
                    }
                }
            } finally {
                m_cms.getRequestContext().setSiteRoot(storedSiteRoot);
            }
        }
        return m_resourcesWithBrokenLinks;
    }
844927
public String build() {
        if (!root.containsKey("mdm")) {
            insertCustomAlert();
            root.put("aps", aps);
        }
        try {
            return mapper.writeValueAsString(root);
        } catch (final Exception e) {
            throw new RuntimeException(e);
        }
    }
1082049
public Description build() {
        if (null == name) {
            throw new IllegalStateException("name is not set");
        }
        final String title1 = null != title ? title : name;
        final List<Property> properties1 = buildProperties();
        final Map<String, String> mapping1 = Collections.unmodifiableMap(mapping);
        final Map<String, String> mapping2 = Collections.unmodifiableMap(fwkmapping);
        final Map<String, String> metadata2 = Collections.unmodifiableMap(metadata);
        return new Description() {
            @Override
            public String getName() {
                return name;
            }

            @Override
            public String getTitle() {
                return title1;
            }

            @Override
            public String getDescription() {
                return description;
            }

            @Override
            public List<Property> getProperties() {
                return properties1;
            }

            @Override
            public Map<String, String> getPropertiesMapping() {
                return mapping1;
            }

            @Override
            public Map<String, String> getFwkPropertiesMapping() {
                return mapping2;
            }

            @Override
            public Map<String, String> getMetadata() {
                return metadata2;
            }

            @Override
            public String toString() {
                return "PropertyDescription{" +
                        "name = " + getName() + ", " +
                        "title = " + getTitle() + ", " +
                        "description = " + getDescription() + ", " +
                        "properties = " + getProperties() + ", " +
                        "mapping = " + getPropertiesMapping() +
                        "frameworkMapping = " + getFwkPropertiesMapping() +
                        "metadata = " + metadata2 +
                        "}";
            }
        };
    }
1145974
public void publish() {

        CmsDirectPublishDialogAction action = new CmsDirectPublishDialogAction();
        List<CmsResource> resources = getBundleResources();
        I_CmsDialogContext context = new A_CmsDialogContext("", ContextType.appToolbar, resources) {

            public void focus(CmsUUID structureId) {

                //Nothing to do.
            }

            public List<CmsUUID> getAllStructureIdsInView() {

                return null;
            }

            public void updateUserInfo() {

                //Nothing to do.
            }
        };
        action.executeAction(context);
        updateLockInformation();

    }
857961
public CmsResource createFolder(CmsObject cms) throws CmsException {

        if (m_folder != null) {
            return m_folder;
        }
        return cms.createResource(
            m_path,
            OpenCms.getResourceManager().getResourceType(CmsResourceTypeFolder.RESOURCE_TYPE_NAME).getTypeId());
    }
984248
private Map<String, String> getInfoMap() {

        Map<String, String> infos = new LinkedHashMap<String, String>();
        int corruptedSites = getCorruptedSites().size();
        infos.put(
            CmsVaadinUtils.getMessageText(Messages.GUI_SITE_STATISTICS_NUM_WEBSITES_0),
            String.valueOf(getAllElements().size() + corruptedSites));

        if (corruptedSites > 0) {
            infos.put(
                CmsVaadinUtils.getMessageText(Messages.GUI_SITE_STATISTICS_NUM_CORRUPTED_WEBSITES_0),
                String.valueOf(corruptedSites));
        }

        return infos;
    }
477310
public Map<String, Map<String, CmsJspResourceWrapper>> getLocaleResource() {

        return CmsCollectionsGenericWrapper.createLazyMap(new Transformer() {

            @SuppressWarnings("synthetic-access")
            public Object transform(Object arg) {

                if (!(arg instanceof String)) {
                    return new HashMap<String, CmsJspResourceWrapper>();
                }
                String path = (String)arg;
                try {
                    CmsResource res = m_cms.readResource(path);
                    CmsJspResourceWrapper wrapper = CmsJspResourceWrapper.wrap(m_cms, res);
                    return wrapper.getLocaleResource();
                } catch (Exception e) {
                    LOG.warn(e.getLocalizedMessage(), e);
                    return new HashMap<String, CmsJspResourceWrapper>();
                }
            }

        });
    }
288293
public static List<CmsRelationType> getAll() {

        List<CmsRelationType> all = new ArrayList<CmsRelationType>(Arrays.asList(VALUE_ARRAY));
        all.addAll(OpenCms.getResourceManager().getRelationTypes());
        return Collections.unmodifiableList(all);
    }
917111
public Map<String, String[]> getParameterMap() {

        if (m_parameters == null) {
            m_parameters = CmsRequestUtil.createParameterMap(m_query);
        }
        return m_parameters;
    }
125276
protected CmsBrokenLinkBean createSitemapBrokenLinkBean(CmsResource resource) throws CmsException {

        CmsProperty titleProp = m_cms.readPropertyObject(resource, CmsPropertyDefinition.PROPERTY_TITLE, true);
        String typeName = OpenCms.getResourceManager().getResourceType(resource).getTypeName();
        String defaultTitle = CmsResource.getName(resource.getRootPath());
        String title = titleProp.getValue(defaultTitle);
        String path = m_cms.getSitePath(resource);
        String subtitle = path;
        return new CmsBrokenLinkBean(resource.getStructureId(), title, subtitle, typeName);
    }
474943
public CmsResource getResource() {

        return new CmsResource(
            m_base.getStructureId(),
            m_base.getResourceId(),
            m_rootPath,
            m_typeId,
            m_isFolder,
            m_base.getFlags(),
            m_base.getProjectLastModified(),
            m_base.getState(),
            m_base.getDateCreated(),
            m_base.getUserCreated(),
            m_base.getDateLastModified(),
            m_base.getUserLastModified(),
            m_base.getDateReleased(),
            m_base.getDateExpired(),
            m_base.getSiblingCount(),
            m_length,
            m_base.getDateContent(),
            m_base.getVersion());
    }
710904
private Multimap<String, I_CmsFormatterBean> getFormattersByType() {

        if (m_formattersByType == null) {
            ArrayListMultimap<String, I_CmsFormatterBean> formattersByType = ArrayListMultimap.create();
            for (I_CmsFormatterBean formatter : m_formatters.values()) {
                for (String typeName : formatter.getResourceTypeNames()) {
                    formattersByType.put(typeName, formatter);
                }
            }
            m_formattersByType = formattersByType;
        }
        Multimap<String, I_CmsFormatterBean> result = Multimaps.unmodifiableMultimap(m_formattersByType);
        return result;
    }
863840
public ResourceMap getPublishRelatedResources() {

        ResourceMap related = computeRelatedResources();
        ResourceMap reachable = computeReachability(related);
        ResourceMap publishRelatedResources = getChangedResourcesReachableFromOriginalResources(reachable);
        removeNestedItemsFromTopLevel(publishRelatedResources);
        //addParentFolders(publishRelatedResources);
        removeUnchangedTopLevelResources(publishRelatedResources, reachable);
        return publishRelatedResources;
    }
1025223
public List<CmsFormatterBean> getFormatters() {

        CmsFormatterBean mainFormatter = createFormatterBean(m_mainFormat, true);
        List<CmsFormatterBean> formatters = new ArrayList<CmsFormatterBean>();
        formatters.add(mainFormatter);
        for (Format format : m_otherFormats) {
            formatters.add(createFormatterBean(format, false));
        }
        return formatters;
    }
1211815
public Map<CmsUUID, I_CmsFormatterBean> getAutoEnabledFormatters() {

        if (m_autoEnabledFormatters == null) {
            Map<CmsUUID, I_CmsFormatterBean> result = Maps.newHashMap();
            for (Map.Entry<CmsUUID, I_CmsFormatterBean> entry : m_formatters.entrySet()) {
                if (entry.getValue().isAutoEnabled()) {
                    result.put(entry.getKey(), entry.getValue());
                }
            }
            m_autoEnabledFormatters = result;
        }
        return Collections.unmodifiableMap(m_autoEnabledFormatters);
    }