Updates title property of site root resource in case of copy from template.<p>

@param res root resource to set titel for
512419
private void setFolderTitle(CmsResource res) {

        try {
            CmsProperty titleProperty = m_cms.readPropertyObject(res, CmsPropertyDefinition.PROPERTY_TITLE, false);
            if (!titleProperty.isNullProperty()) {
                titleProperty.setValue(m_site.getTitle(), CmsProperty.TYPE_INDIVIDUAL);
                m_cms.writePropertyObject(res.getRootPath(), titleProperty);
            } else {
                LOG.error("Editing title property of site root resource was not possible");
                getReport().println(
                    Messages.get().container(Messages.RPT_SITE_ERROR_TITLE_0),
                    I_CmsReport.FORMAT_ERROR);
            }
        } catch (CmsException e) {
            LOG.error("Editing title property of site root resource was not possible", e);
            getReport().println(Messages.get().container(Messages.RPT_SITE_ERROR_TITLE_0), I_CmsReport.FORMAT_ERROR);
            getReport().println(e);
        }

    }
12648
void updateCss() {

        String formatterId = m_formatterSelect.getFormValueAsString();
        CmsFormatterConfig formatter = m_elementBean.getFormatters().get(m_containerId).get(formatterId);
        Set<String> cssResources = formatter.getCssResources();
        for (String cssResource : cssResources) {
            CmsDomUtil.ensureStyleSheetIncluded(cssResource);
        }
        if (formatter.hasInlineCss()) {
            ensureInlineCss(formatterId, formatter.getInlineCss());
        }
    }
50963
protected void fillProperties(CmsObject cms, Item resourceItem, CmsResource resource, CmsUUID parentId) {

        resourceItem.getItemProperty(PROPERTY_RESOURCE).setValue(resource);
        // use the root path as name in case of the root item
        String name = getName(cms, resource, parentId);
        if (resource.isFolder() && !name.endsWith("/")) {
            name += "/";
        }
        CmsResourceUtil resUtil = new CmsResourceUtil(cms, resource);
        resourceItem.getItemProperty(CmsResourceTableProperty.PROPERTY_RESOURCE_NAME).setValue(name);
        resourceItem.getItemProperty(CmsResourceTableProperty.PROPERTY_STATE).setValue(resource.getState());

        resourceItem.getItemProperty(PROPERTY_INSIDE_PROJECT).setValue(Boolean.valueOf(resUtil.isInsideProject()));
        resourceItem.getItemProperty(CmsResourceTableProperty.PROPERTY_IS_FOLDER).setValue(
            Boolean.valueOf(resource.isFolder()));
        try {
            CmsObject rootCms = OpenCms.initCmsObject(cms);
            rootCms.getRequestContext().setSiteRoot("");
            CmsJspNavBuilder builder = new CmsJspNavBuilder(rootCms);
            CmsJspNavElement nav = builder.getNavigationForResource(
                resource.getRootPath(),
                CmsResourceFilter.ONLY_VISIBLE_NO_DELETED);
            boolean inNavigation = nav.isInNavigation();
            resourceItem.getItemProperty(CmsResourceTableProperty.PROPERTY_IN_NAVIGATION).setValue(
                Boolean.valueOf(inNavigation));

            if (inNavigation) {
                resourceItem.getItemProperty(CmsResourceTableProperty.PROPERTY_NAVIGATION_POSITION).setValue(
                    Float.valueOf(nav.getNavPosition()));
            }
            String navText = null;
            if (nav.getProperties().containsKey(CmsPropertyDefinition.PROPERTY_NAVTEXT)) {
                navText = nav.getProperties().get(CmsPropertyDefinition.PROPERTY_NAVTEXT);
            } else if (nav.getProperties().containsKey(CmsPropertyDefinition.PROPERTY_TITLE)) {
                navText = nav.getProperties().get(CmsPropertyDefinition.PROPERTY_TITLE);
            }
            resourceItem.getItemProperty(CmsResourceTableProperty.PROPERTY_NAVIGATION_TEXT).setValue(navText);
            String folderCaption;
            folderCaption = CmsResourceIcon.getTreeCaptionHTML(name, resUtil, null, false);
            resourceItem.getItemProperty(CmsResourceTableProperty.PROPERTY_TREE_CAPTION).setValue(folderCaption);
            if (inNavigation) {
                if (navText == null) {
                    navText = name;
                }
                String sitemapCaption = CmsResourceIcon.getTreeCaptionHTML(navText, resUtil, null, false);
                resourceItem.getItemProperty(PROPERTY_SITEMAP_CAPTION).setValue(sitemapCaption);
            }

        } catch (CmsException e) {
            LOG.error(e.getLocalizedMessage(), e);
        }

    }
337502
def _add_res(line):
    '''
    
    '''
    global resource
    fields = line.strip().split()

    if resource:
        ret.append(resource)
        resource = {}

    resource["resource name"] = fields[0]
    resource["local role"] = fields[1].split(":")[1]
    resource["local volumes"] = []
    resource["peer nodes"] = []
95579
private void writePointerLink(CmsResource res) throws CmsException {

        String resPath = getCms().getSitePath(res);
        String currentPropertyValue = getParamPropertyValue();
        boolean locked = true;
        CmsLock lock = getCms().getLock(res);
        if (lock.isUnlocked()) {
            // lock resource before operation
            getCms().lockResource(resPath);
            locked = false;
        }
        CmsFile file = getCms().readFile(res);
        file.setContents(currentPropertyValue.getBytes());
        checkLock(getCms().getSitePath(res));
        getCms().writeFile(file);
        if (!locked) {
            // unlock the resource
            getCms().unlockResource(resPath);
        }
    }
479885
void updateReplace() {

        boolean replace = m_replace.getValue().booleanValue();

        m_replaceResource.setVisible(replace ? SearchType.resourcetype.equals(m_searchType.getValue()) : replace);
        m_replacePattern.setVisible(
            replace
            ? !SearchType.resourcetype.equals(m_searchType.getValue())
                & !SearchType.renameContainer.equals(m_searchType.getValue())
            : replace);

        m_newName.setVisible(replace ? SearchType.renameContainer.equals(m_searchType.getValue()) : replace);
        m_oldName.setVisible(replace ? SearchType.renameContainer.equals(m_searchType.getValue()) : replace);

        m_workProject.setVisible(replace);

        m_search.setCaption(
            replace
            ? CmsVaadinUtils.getMessageText(Messages.GUI_SOURCESEARCH_REPLACE_0)
            : CmsVaadinUtils.getMessageText(Messages.GUI_SOURCESEARCH_SEARCH_0));

    }
333734
private void setFieldsForSite(boolean enableAll) {

        try {
            if (!CmsStringUtil.isEmptyOrWhitespaceOnly(m_site.getSiteRoot())) {
                CmsProperty prop = m_clonedCms.readPropertyObject(
                    m_site.getSiteRoot(),
                    CmsPropertyDefinition.PROPERTY_TEMPLATE,
                    false);
                if (!prop.isNullProperty()) {
                    if (!m_templates.contains(prop.getValue())) {
                        m_simpleFieldTemplate.addItem(prop.getValue());
                    }
                    m_simpleFieldTemplate.select(prop.getValue());
                } else {
                    if (!m_templates.isEmpty()) {
                        m_simpleFieldTemplate.setValue(m_templates.get(0).getRootPath());
                    }
                }
                m_simpleFieldTemplate.setEnabled(enableAll);
            }
        } catch (CmsException e) {
            LOG.error("Unable to read template property.", e);
        }

        m_simpleFieldSiteRoot.setVisible(true);
        m_simpleFieldSiteRoot.setValue(m_site.getSiteRoot());
        m_simpleFieldSiteRoot.setCmsObject(m_clonedCms);
        m_simpleFieldSiteRoot.addValidator(new SiteRootValidator());
        m_simpleFieldSiteRoot.setEnabled(enableAll);
        m_simpleFieldSiteRoot.addValueChangeListener(new ValueChangeListener() {

            /**vaadin serial id. */
            private static final long serialVersionUID = 4680456758446195524L;

            public void valueChange(ValueChangeEvent event) {

                setTemplateField();
                checkOnOfflineSiteRoot();
            }

        });
        m_simpleFieldParentFolderName.setVisible(false);
        m_simpleFieldFolderName.setVisible(false);

        displayResourceInfoDirectly(
            Collections.singletonList(
                new CmsResourceInfo(
                    m_site.getTitle(),
                    m_site.getSiteRoot(),
                    m_manager.getFavIcon(m_site.getSiteRoot()))));

        m_tab.removeTab(m_tab.getTab(4));
        m_simpleFieldTitle.removeTextChangeListener(null);
        m_simpleFieldTitle.setEnabled(enableAll);
        m_simpleFieldParentFolderName.setEnabled(false);
        m_simpleFieldParentFolderName.setValue(
            m_site.getSiteRoot().substring(
                0,
                m_site.getSiteRoot().length()
                    - m_site.getSiteRoot().split("/")[m_site.getSiteRoot().split("/").length - 1].length()));

        m_simpleFieldFolderName.removeAllValidators(); //can not be changed
        m_fieldCreateOU.setVisible(false);

        m_alreadyUsedURL.remove(m_site.getSiteMatcher().forDifferentScheme("https")); //Remove current url to avoid validation problem
        m_alreadyUsedURL.remove(m_site.getSiteMatcher().forDifferentScheme("http"));

        setFieldTitle(m_site.getTitle());
        setFieldFolder(getFolderNameFromSiteRoot(m_site.getSiteRoot()));
        m_simpleFieldFolderName.setEnabled(false);
        m_simpleFieldTitle.setEnabled(enableAll);

        setFieldServer(m_site.getUrl());
        m_simpleFieldServer.setEnabled(enableAll);
        if (m_site.hasSecureServer()) {
            m_fieldSecureServer.setValue(m_site.getSecureUrl());
        }
        if (m_site.getErrorPage() != null) {
            m_fieldErrorPage.setValue(m_site.getErrorPage());
        }
        m_fieldWebServer.setValue(new Boolean(m_site.isWebserver()));
        m_fieldWebServer.setEnabled(enableAll);
        m_fieldExclusiveURL.setValue(new Boolean(m_site.isExclusiveUrl()));
        m_fieldExclusiveURL.setEnabled(enableAll);
        m_fieldExclusiveError.setValue(new Boolean(m_site.isExclusiveError()));
        m_fieldExclusiveError.setEnabled(enableAll);

        Map<String, String> siteParameters = m_site.getParameters();
        for (Entry<String, String> parameter : siteParameters.entrySet()) {
            addParameter(getParameterString(parameter));
        }

        List<CmsSiteMatcher> siteAliases = m_site.getAliases();

        for (CmsSiteMatcher siteMatcher : siteAliases) {
            if (enableAll) {
                m_aliasGroup.addRow(createAliasComponent(siteMatcher.getUrl(), siteMatcher.isRedirect()));
            } else {
                Component c = createAliasComponent(siteMatcher.getUrl(), siteMatcher.isRedirect());
                c.setEnabled(false);
                m_aliases.addComponent(c);
            }
        }

        setTemplateField();

        setUpComboBoxPosition();

        if (!m_fieldSecureServer.isEmpty()) {
            m_fieldExclusiveURL.setEnabled(true && enableAll);
            m_fieldExclusiveError.setEnabled(true && enableAll);
        }
        setFaviconIfExist();
        checkOnOfflineSiteRoot();
        m_fieldUploadFavIcon.setVisible(false);
        m_simpleFieldEncryption.setContainerDataSource(getSSLModeContainer("caption", true, m_site.getSSLMode()));
        m_simpleFieldEncryption.select(m_site.getSSLMode());
        m_simpleFieldEncryption.setEnabled(enableAll);

        m_fieldErrorPage.setEnabled(enableAll);
        m_addParameter.setVisible(enableAll);
        m_fieldPosition.setEnabled(enableAll);
    }
812975
public void setResource() {

        selectResource(
            m_infoBean.getResourcePath(),
            m_infoBean.getStructureId(),
            m_infoBean.getProperties().get(CmsClientProperty.PROPERTY_TITLE));
    }
998372
protected void updateSearchRoot() throws CmsException {

        CmsObject newCms = OpenCms.initCmsObject(A_CmsUI.getCmsObject());
        newCms.getRequestContext().setSiteRoot((String)m_siteSelect.getValue());
        m_searchRoot.setCmsObject(newCms);
        m_searchRoot.setValue("/");

    }
466301
public void remove(CmsPublishedResource res) {

        remove(res.getStructureId(), res.getRootPath(), res.getType());
    }
271608
protected void update(CmsUUID structureId, String rootPath, int type, CmsResourceState state) {

        if (!isContainerConfiguration(rootPath, type)) {
            return;
        }
        m_updateSet.add(structureId);
    }
632532
public void setTitle(final String title, final Serializable... args) {
		getOrCreateComponentModel().title = I18nUtilities.asMessage(title, args);
	}
404489
protected void writeTitleProperty(CmsResource res) {

        String resPath = getCms().getSitePath(res);
        String currentPropertyValue = getParamPropertyValue();
        try {
            CmsProperty currentProperty = getCms().readPropertyObject(
                resPath,
                CmsPropertyDefinition.PROPERTY_TITLE,
                false);
            // detect if property is a null property or not
            if (currentProperty.isNullProperty()) {
                // create new property object and set key and value
                currentProperty = new CmsProperty();
                currentProperty.setName(CmsPropertyDefinition.PROPERTY_TITLE);
                if (OpenCms.getWorkplaceManager().isDefaultPropertiesOnStructure()) {
                    // set structure value
                    currentProperty.setStructureValue(currentPropertyValue);
                    currentProperty.setResourceValue(null);
                } else {
                    // set resource value
                    currentProperty.setStructureValue(null);
                    currentProperty.setResourceValue(currentPropertyValue);
                }
            } else if (currentProperty.getStructureValue() != null) {
                // structure value has to be updated
                currentProperty.setStructureValue(currentPropertyValue);
                currentProperty.setResourceValue(null);
            } else {
                // resource value has to be updated
                currentProperty.setStructureValue(null);
                currentProperty.setResourceValue(currentPropertyValue);
            }
            CmsLock lock = getCms().getLock(res);
            if (lock.isUnlocked()) {
                // lock resource before operation
                getCms().lockResource(resPath);
            }
            // write the property to the resource
            getCms().writePropertyObject(resPath, currentProperty);
            // unlock the resource
            getCms().unlockResource(resPath);
        } catch (CmsException e) {
            // writing the property failed, log error
            LOG.error(e.getLocalizedMessage(), e);
        }
    }
1231445
@Override
    public void setTitle(final String title) {
        if (this.title == null) {
            this.title = new SyndContentImpl();
        }
        this.title.setValue(title);
    }
578005
public void add(CmsResource resource) {

        if (!m_processedIds.contains(resource.getStructureId())) {
            m_resources.add(resource);
            m_processedIds.add(resource.getStructureId());
            m_changed |= !(resource.getState().isUnchanged());
        }
    }
63644
public function updateTreeTitle(&$title)
    {
        if ($this->owner->AccessAllSubsites) {
            $title = _t(__CLASS__ . '.GlobalGroup', 'global group');
            $title = htmlspecialchars($this->owner->Title, ENT_QUOTES) . ' <i>(' . $title . ')</i>';
        } else {
            $subsites = Convert::raw2xml(implode(', ', $this->owner->Subsites()->column('Title')));
            $title = htmlspecialchars($this->owner->Title) . " <i>($subsites)</i>";
        }
    }
237556
public void setParentResource(CmsResource parentResource) {

        if (parentResource.isFile()) {
            m_parentPath = CmsResource.getFolderPath(parentResource.getRootPath());
        } else {
            m_parentPath = parentResource.getRootPath();
        }
    }