Initializes the locale comparison view.<p>

@param id the structure id of the currrent sitemap root entry
@param initialComparisonLocale if not null, the initially selected ccomparison locale

@throws CmsException if something goes wrong
193996
public void initialize(CmsUUID id, Locale initialComparisonLocale) throws CmsException {

        removeAllComponents();
        CmsObject cms = A_CmsUI.getCmsObject();
        CmsResource res = cms.readResource(id);
        m_currentRoot = res;
        CmsSite site = OpenCms.getSiteManager().getSiteForRootPath(res.getRootPath());

        Locale rootLocale = OpenCms.getLocaleManager().getDefaultLocale(cms, res);
        m_rootLocale = rootLocale;
        Locale mainLocale = site.getMainTranslationLocale(null);
        List<Locale> secondaryLocales = site.getSecondaryTranslationLocales();

        List<Locale> possibleLocaleSelections = getMainLocaleSelectOptions(cms, res, mainLocale, secondaryLocales);
        m_rootLocaleSelector = new ComboBox();
        m_rootLocaleSelector.addStyleName("o-sitemap-localeselect");
        m_rootLocaleSelector.setNullSelectionAllowed(false);
        for (Locale selectableLocale : possibleLocaleSelections) {
            m_rootLocaleSelector.addItem(selectableLocale);
            m_rootLocaleSelector.setItemIcon(selectableLocale, FontOpenCms.SPACE);
            m_rootLocaleSelector.setItemCaption(
                selectableLocale,
                selectableLocale.getDisplayName(A_CmsUI.get().getLocale()));
        }
        m_rootLocaleSelector.setItemIcon(mainLocale, MAIN_LOCALE_ICON);
        m_rootLocaleSelector.setValue(m_rootLocale);
        m_rootLocaleSelector.addValueChangeListener(new ValueChangeListener() {

            private static final long serialVersionUID = 1L;

            @SuppressWarnings("synthetic-access")
            public void valueChange(ValueChangeEvent event) {

                if (!m_handlingLocaleChange) {
                    m_handlingLocaleChange = true;
                    try {
                        Locale newLocale = (Locale)(event.getProperty().getValue());
                        switchToLocale(newLocale);
                    } catch (Exception e) {
                        LOG.error(e.getLocalizedMessage(), e);
                        CmsErrorDialog.showErrorDialog(e);
                    } finally {
                        m_handlingLocaleChange = false;
                    }
                }
            }
        });

        m_comparisonLocaleSelector = new ComboBox();
        m_comparisonLocaleSelector.addStyleName("o-sitemap-localeselect");
        m_comparisonLocaleSelector.setNullSelectionAllowed(false);

        List<Locale> comparisonLocales = getComparisonLocales();
        Locale selectedComparisonLocale = null;
        for (Locale comparisonLocale : comparisonLocales) {
            m_comparisonLocaleSelector.addItem(comparisonLocale);
            m_comparisonLocaleSelector.setItemIcon(comparisonLocale, FontOpenCms.SPACE);
            m_comparisonLocaleSelector.setItemCaption(
                comparisonLocale,
                comparisonLocale.getDisplayName(A_CmsUI.get().getLocale()));
            if ((selectedComparisonLocale == null) && !comparisonLocale.equals(m_rootLocale)) {
                selectedComparisonLocale = comparisonLocale;
            }
            if ((initialComparisonLocale != null)
                && comparisonLocale.equals(initialComparisonLocale)
                && !comparisonLocale.equals(m_rootLocale)) {
                // if an initial comparison locale is given, it should have priority over the first comparison locale
                selectedComparisonLocale = comparisonLocale;
            }

        }
        m_comparisonLocale = selectedComparisonLocale;
        m_comparisonLocaleSelector.setValue(selectedComparisonLocale);
        m_comparisonLocaleSelector.setItemIcon(mainLocale, MAIN_LOCALE_ICON);

        m_comparisonLocaleSelector.addValueChangeListener(new ValueChangeListener() {

            private static final long serialVersionUID = 1L;

            @SuppressWarnings("synthetic-access")
            public void valueChange(ValueChangeEvent event) {

                if (!m_handlingLocaleChange) {
                    m_handlingLocaleChange = true;
                    try {
                        Locale locale = (Locale)(event.getProperty().getValue());
                        if (m_rootLocale.equals(locale)) {
                            Locale oldComparisonLocale = m_comparisonLocale;
                            if (getLocaleGroup().getResourcesByLocale().keySet().contains(oldComparisonLocale)) {
                                m_comparisonLocale = locale;
                                switchToLocale(oldComparisonLocale);
                                updateLocaleWidgets();
                            } else {
                                Notification.show(
                                    CmsVaadinUtils.getMessageText(
                                        Messages.GUI_LOCALECOMPARE_CANNOT_SWITCH_COMPARISON_LOCALE_0));
                                m_comparisonLocaleSelector.setValue(oldComparisonLocale);
                            }
                        } else {
                            m_comparisonLocale = locale;
                            updateLocaleWidgets();
                            initTree(m_currentRoot);
                        }

                    } catch (Exception e) {
                        LOG.error(e.getLocalizedMessage(), e);
                        CmsErrorDialog.showErrorDialog(e);
                    } finally {
                        m_handlingLocaleChange = false;
                    }
                }
            }
        });

        CssLayout localeSelectors = new CssLayout();
        localeSelectors.addStyleName(OpenCmsTheme.SITEMAP_LOCALE_BAR);

        m_rootLocaleSelector.setCaption(CmsVaadinUtils.getMessageText(Messages.GUI_LOCALECOMPARE_MAIN_LOCALE_0));
        m_comparisonLocaleSelector.setCaption(
            CmsVaadinUtils.getMessageText(Messages.GUI_LOCALECOMPARE_COMPARISON_LOCALE_0));

        localeSelectors.setWidth("100%");
        localeSelectors.addComponent(m_rootLocaleSelector);
        localeSelectors.addComponent(m_comparisonLocaleSelector);
        // localeSelectors.setComponentAlignment(wrapper2, Alignment.MIDDLE_RIGHT);

        setSpacing(true);
        addComponent(localeSelectors);
        addComponent(m_treeContainer);
        m_treeContainer.setWidth("100%");
        initTree(res);
    }
775435
public static synchronized void setLocale(String newLocale) throws UnsupportedLocaleException {
        Preconditions.checkArgument(newLocale == null, "newLocale == null");
        if (!newLocale.equals(CURRENT_LOCALE)) {
            LogCentral.setLocale(newLocale);
            CURRENT_LOCALE = newLocale;
        }
    }
1165849
private Locale getLocale() throws CmsException {

        getDocument();
        List<Locale> locales = m_document.getLocales();
        if (locales.contains(Locale.ENGLISH) || locales.isEmpty()) {
            return Locale.ENGLISH;
        }
        return locales.get(0);
    }
606386
private void reloadForLocaleCompareRoot(final EditorMode editorMode) {

        final String localeRootIdStr = CmsJsUtil.getAttributeString(
            CmsJsUtil.getWindow(),
            CmsGwtConstants.VAR_LOCALE_ROOT);
        CmsRpcAction<String> action = new CmsRpcAction<String>() {

            @SuppressWarnings("synthetic-access")
            @Override
            public void execute() {

                start(0, false);
                m_controller.getService().prepareReloadSitemap(new CmsUUID(localeRootIdStr), editorMode, this);
            }

            @Override
            protected void onResponse(String result) {

                stop(false);
                if (result != null) {
                    Window.Location.assign(result);
                } else {
                    Window.Location.reload();
                }
            }
        };
        action.execute();

    }
133618
public void initialize(CmsObject cms) throws CmsRoleViolationException {

        OpenCms.getRoleManager().checkRole(cms, CmsRole.WORKPLACE_MANAGER);
        try {
            // store the Admin cms to index Cms resources
            m_adminCms = OpenCms.initCmsObject(cms);
        } catch (CmsException e) {
            // this should never happen
            LOG.error(e.getLocalizedMessage(), e);
        }
        // make sure the site root is the root site
        m_adminCms.getRequestContext().setSiteRoot("/");

        // create the extraction result cache
        m_extractionResultCache = new CmsExtractionResultCache(
            OpenCms.getSystemInfo().getAbsoluteRfsPathRelativeToWebInf(getDirectory()),
            "/extractCache");
        initializeFieldConfigurations();
        initializeIndexes();
        initOfflineIndexes();

        // register this object as event listener
        OpenCms.addCmsEventListener(
            this,
            new int[] {
                I_CmsEventListener.EVENT_CLEAR_CACHES,
                I_CmsEventListener.EVENT_PUBLISH_PROJECT,
                I_CmsEventListener.EVENT_REBUILD_SEARCHINDEXES});
    }
444024
private void loadAllRemainingLocalizations() throws CmsException, UnsupportedEncodingException, IOException {

        if (!m_alreadyLoadedAllLocalizations) {
            // is only necessary for property bundles
            if (m_bundleType.equals(BundleType.PROPERTY)) {
                for (Locale l : m_locales) {
                    if (null == m_localizations.get(l)) {
                        CmsResource resource = m_bundleFiles.get(l);
                        if (resource != null) {
                            CmsFile file = m_cms.readFile(resource);
                            m_bundleFiles.put(l, file);
                            SortedProperties props = new SortedProperties();
                            props.load(
                                new InputStreamReader(
                                    new ByteArrayInputStream(file.getContents()),
                                    CmsFileUtil.getEncoding(m_cms, file)));
                            m_localizations.put(l, props);
                        }
                    }
                }
            }
            if (m_bundleType.equals(BundleType.XML)) {
                for (Locale l : m_locales) {
                    if (null == m_localizations.get(l)) {
                        loadLocalizationFromXmlBundle(l);
                    }
                }
            }
            m_alreadyLoadedAllLocalizations = true;
        }

    }
205157
protected Locale getLocaleToUse(CmsObject cms, CmsXmlContent xmlContent) {

        Locale contextLocale = cms.getRequestContext().getLocale();
        if (xmlContent.hasLocale(contextLocale)) {
            return contextLocale;
        }
        Locale defaultLocale = CmsLocaleManager.getDefaultLocale();
        if (xmlContent.hasLocale(defaultLocale)) {
            return defaultLocale;
        }
        if (!xmlContent.getLocales().isEmpty()) {
            return xmlContent.getLocales().get(0);
        } else {
            return defaultLocale;
        }
    }
1039461
public I_CmsDataView createViewInstance(CmsObject cms, Locale locale) {

        try {
            Class<?> cls = Class.forName(m_viewClass);
            Object viewObj = cls.newInstance();
            I_CmsDataView dataView = (I_CmsDataView)viewObj;
            dataView.initialize(cms, m_viewArg, locale);
            return dataView;
        } catch (Exception e) {
            LOG.error(e.getLocalizedMessage(), e);
            return null;
        }
    }
1266590
public void init(CmsObject cms, Locale locale) {

        init(cms, locale, cms.getRequestContext().getUri());
    }
1235535
void ensureSingleLocale(CmsXmlContainerPage containerPage, CmsResource localeRes) throws CmsException {

        CmsObject cms = getCmsObject();
        Locale mainLocale = CmsLocaleManager.getMainLocale(cms, localeRes);
        OpenCms.getLocaleManager();
        Locale defaultLocale = CmsLocaleManager.getDefaultLocale();
        if (containerPage.hasLocale(mainLocale)) {
            removeAllLocalesExcept(containerPage, mainLocale);
            // remove other locales
        } else if (containerPage.hasLocale(defaultLocale)) {
            containerPage.copyLocale(defaultLocale, mainLocale);
            removeAllLocalesExcept(containerPage, mainLocale);
        } else if (containerPage.getLocales().size() > 0) {
            containerPage.copyLocale(containerPage.getLocales().get(0), mainLocale);
            removeAllLocalesExcept(containerPage, mainLocale);
        } else {
            containerPage.addLocale(cms, mainLocale);
        }
    }
359207
public void adjustLocalesForElement(CmsResource elementResource) throws CmsException {

        if (m_copyMode != CopyMode.smartCopyAndChangeLocale) {
            return;
        }

        CmsFile file = m_cms.readFile(elementResource);
        Locale oldLocale = OpenCms.getLocaleManager().getDefaultLocale(m_cms, m_originalPage);
        Locale newLocale = OpenCms.getLocaleManager().getDefaultLocale(m_cms, m_targetFolder);
        CmsXmlContent content = CmsXmlContentFactory.unmarshal(m_cms, file);
        try {
            content.moveLocale(oldLocale, newLocale);
            LOG.info("Replacing locale " + oldLocale + " -> " + newLocale + " for " + elementResource.getRootPath());
            file.setContents(content.marshal());
            m_cms.writeFile(file);
        } catch (CmsXmlException e) {
            LOG.info(
                "NOT replacing locale for "
                    + elementResource.getRootPath()
                    + ": old="
                    + oldLocale
                    + ", new="
                    + newLocale
                    + ", contentLocales="
                    + content.getLocales());
        }

    }
533648
void setContentDefinition(CmsContentDefinition definition) {

        if (m_availableLocales.isEmpty()) {
            // only set the locales when initially setting the content definition
            m_availableLocales.putAll(definition.getAvailableLocales());
            m_contentLocales.addAll(definition.getContentLocales());
        } else {
            m_contentLocales.add(definition.getLocale());
        }
        m_title = definition.getTitle();
        m_sitePath = definition.getSitePath();
        m_resourceTypeName = definition.getResourceType();
        m_registeredEntities.add(definition.getEntityId());
        String tabs = "";
        for (CmsTabInfo info : definition.getTabInfos()) {
            tabs += info.getTabId() + ":" + info.getStartName() + "   ";
        }
        CmsDebugLog.consoleLog("Tabs: " + tabs);
        m_tabInfos = definition.getTabInfos();
        m_iconClasses = definition.getIconClasses();
        addContentDefinition(definition);
        CmsDefaultWidgetService service = (CmsDefaultWidgetService)getWidgetService();
        service.addConfigurations(definition.getConfigurations());
        service.setSyncValues(definition.getSyncValues());
        service.setSkipPaths(definition.getSkipPaths());
        addEntityChangeHandler(definition.getEntityId(), new ValueChangeHandler<CmsEntity>() {

            public void onValueChange(ValueChangeEvent<CmsEntity> event) {

                setChanged();
            }
        });
    }
585231
private void initLocales(CmsPreviewInfo previewInfo) {

        if (m_localeSelect != null) {
            removeButton(m_localeSelect);
            m_localeSelect = null;
        }
        if (previewInfo.hasAdditionalLocales()) {
            m_localeSelect = new CmsSelectBox(previewInfo.getLocales());
            m_localeSelect.setFormValueAsString(previewInfo.getLocale());
            m_localeSelect.addValueChangeHandler(new ValueChangeHandler<String>() {

                public void onValueChange(ValueChangeEvent<String> event) {

                    loadOtherLocale(event.getValue());
                }
            });
            Style style = m_localeSelect.getElement().getStyle();
            style.setWidth(SELECTBOX_WIDTH, Unit.PX);
            style.setFloat(com.google.gwt.dom.client.Style.Float.LEFT);
            style.setMargin(0, Unit.PX);
            m_localeSelect.truncate(TRUNCATION_PREFIX, SELECTBOX_WIDTH - 20);
            addButton(m_localeSelect);

        }
    }
1300694
CmsModelInfo setDefaultModelPage(CmsResource configFile, CmsUUID modelId) throws CmsException {

        CmsFile file = m_cms.readFile(configFile);
        CmsXmlContent content = CmsXmlContentFactory.unmarshal(m_cms, file);
        Locale locale = getLocale(content);
        int defaultValueIndex = -1;
        String defaultModelTarget = null;
        for (I_CmsXmlContentValue value : content.getValues(CmsConfigurationReader.N_MODEL_PAGE, locale)) {
            I_CmsXmlContentValue linkValue = content.getValue(
                CmsStringUtil.joinPaths(value.getPath(), CmsConfigurationReader.N_PAGE),
                locale);
            I_CmsXmlContentValue isDefaultValue = content.getValue(
                CmsStringUtil.joinPaths(value.getPath(), CmsConfigurationReader.N_IS_DEFAULT),
                locale);
            CmsLink link = ((CmsXmlVfsFileValue)linkValue).getLink(m_cms);
            if ((link != null) && link.getStructureId().equals(modelId)) {
                // store index and site path
                defaultValueIndex = value.getIndex();
                defaultModelTarget = link.getTarget();
            } else {
                isDefaultValue.setStringValue(m_cms, Boolean.FALSE.toString());
            }
        }
        if (defaultValueIndex != -1) {
            // remove the value from the old position and insert it a the top
            content.removeValue(CmsConfigurationReader.N_MODEL_PAGE, locale, defaultValueIndex);
            content.addValue(m_cms, CmsConfigurationReader.N_MODEL_PAGE, locale, 0);
            content.getValue(
                CmsConfigurationReader.N_MODEL_PAGE + "[1]/" + CmsConfigurationReader.N_PAGE,
                locale).setStringValue(m_cms, defaultModelTarget);
            content.getValue(
                CmsConfigurationReader.N_MODEL_PAGE + "[1]/" + CmsConfigurationReader.N_DISABLED,
                locale).setStringValue(m_cms, Boolean.FALSE.toString());
            content.getValue(
                CmsConfigurationReader.N_MODEL_PAGE + "[1]/" + CmsConfigurationReader.N_IS_DEFAULT,
                locale).setStringValue(m_cms, Boolean.TRUE.toString());
        }
        content.setAutoCorrectionEnabled(true);
        content.correctXmlStructure(m_cms);
        file.setContents(content.marshal());
        m_cms.writeFile(file);
        OpenCms.getADEManager().waitForCacheUpdate(false);
        m_adeConfig = OpenCms.getADEManager().lookupConfiguration(m_cms, m_rootResource.getRootPath());
        return getModelInfo();
    }
1359525
protected void initCmsContextForUI(HttpServletRequest req, HttpServletResponse res, CmsUIServlet servlet)
    throws IOException, CmsException {

        // instantiate CMS context
        String originalEncoding = req.getCharacterEncoding();
        String referrer = req.getHeader("referer");
        boolean allowPrivilegedLogin = (referrer == null) || !referrer.contains(CmsWorkplaceLoginHandler.LOGIN_HANDLER);

        CmsObject cms = initCmsObject(req, res, allowPrivilegedLogin);
        servlet.setCms(cms);
        if (originalEncoding != null) {
            // getI18NInfo sets wrong encoding
            req.setCharacterEncoding(originalEncoding);
        }
    }
1091129
private CmsPreviewInfo getPreviewInfo(CmsObject cms, CmsResource resource, Locale locale) {

        String title = "";
        try {
            CmsProperty titleProperty = cms.readPropertyObject(resource, CmsPropertyDefinition.PROPERTY_TITLE, false);
            title = titleProperty.getValue("");
        } catch (CmsException e) {
            LOG.warn(e.getLocalizedMessage(), e);
        }
        String noPreviewReason = getNoPreviewReason(cms, resource);
        String previewContent = null;
        int height = 0;
        int width = 0;
        LinkedHashMap<String, String> locales = getAvailableLocales(resource);
        if (noPreviewReason != null) {
            previewContent = "<div>" + noPreviewReason + "</div>";
            return new CmsPreviewInfo(
                "<div>" + noPreviewReason + "</div>",
                null,
                false,
                title,
                cms.getSitePath(resource),
                locale.toString());
        } else if (OpenCms.getResourceManager().matchResourceType(
            CmsResourceTypeImage.getStaticTypeName(),
            resource.getTypeId())) {
            CmsImageScaler scaler = new CmsImageScaler(cms, resource);
            String imageLink = null;
            if (resource instanceof I_CmsHistoryResource) {
                int version = ((I_CmsHistoryResource)resource).getVersion();
                imageLink = OpenCms.getLinkManager().substituteLinkForUnknownTarget(
                    cms,
                    CmsHistoryListUtil.getHistoryLink(cms, resource.getStructureId(), "" + version));
            } else {
                imageLink = OpenCms.getLinkManager().substituteLinkForUnknownTarget(cms, resource.getRootPath());
            }
            imageLink = CmsRequestUtil.appendParameter(imageLink, "random", "" + Math.random());
            previewContent = "<img src=\"" + imageLink + "\" title=\"" + title + "\" style=\"display:block\" />";
            height = scaler.getHeight();
            width = scaler.getWidth();
        } else if (CmsResourceTypeXmlContainerPage.isContainerPage(resource)
            || CmsResourceTypeXmlPage.isXmlPage(resource)) {
            String link = "";
            if (resource instanceof I_CmsHistoryResource) {
                int version = ((I_CmsHistoryResource)resource).getVersion();
                link = OpenCms.getLinkManager().substituteLinkForUnknownTarget(
                    cms,
                    CmsHistoryListUtil.getHistoryLink(cms, resource.getStructureId(), "" + version));
            } else {
                link = OpenCms.getLinkManager().substituteLinkForUnknownTarget(cms, resource.getRootPath());
            }
            return new CmsPreviewInfo(null, link, true, null, cms.getSitePath(resource), locale.toString());
        } else if (CmsResourceTypeXmlContent.isXmlContent(resource)) {
            if (!locales.containsKey(locale.toString())) {
                locale = CmsLocaleManager.getMainLocale(cms, resource);
            }
            previewContent = CmsPreviewService.getPreviewContent(getRequest(), getResponse(), cms, resource, locale);

        } else if (CmsResourceTypePlain.getStaticTypeId() == resource.getTypeId()) {
            try {
                previewContent = "<pre><code>" + new String(cms.readFile(resource).getContents()) + "</code></pre>";
            } catch (CmsException e) {
                LOG.warn(e.getLocalizedMessage(), e);
                previewContent = "<div>"
                    + Messages.get().getBundle(OpenCms.getWorkplaceManager().getWorkplaceLocale(cms)).key(
                        Messages.GUI_NO_PREVIEW_CAN_T_READ_CONTENT_0)
                    + "</div>";
            }
        }
        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(previewContent)) {
            CmsPreviewInfo result = new CmsPreviewInfo(
                previewContent,
                null,
                false,
                title,
                cms.getSitePath(resource),
                locale.toString());
            result.setHeight(height);
            result.setWidth(width);
            result.setLocales(locales);
            return result;
        }
        if (CmsResourceTypeXmlContainerPage.isContainerPage(resource) || CmsResourceTypeXmlPage.isXmlPage(resource)) {
            CmsPreviewInfo result = new CmsPreviewInfo(
                null,
                OpenCms.getLinkManager().substituteLinkForUnknownTarget(cms, resource.getRootPath())
                    + "?"
                    + CmsGwtConstants.PARAM_DISABLE_DIRECT_EDIT
                    + "=true"
                    + "&__locale="
                    + locale.toString(),
                false,
                title,
                cms.getSitePath(resource),
                locale.toString());
            result.setLocales(locales);
            return result;
        }
        return new CmsPreviewInfo(
            null,
            OpenCms.getLinkManager().substituteLinkForUnknownTarget(cms, resource.getRootPath())
                + "?"
                + CmsGwtConstants.PARAM_DISABLE_DIRECT_EDIT
                + "=true",
            true,
            title,
            cms.getSitePath(resource),
            locale.toString());
    }
420160
@SuppressWarnings("null")
    private void init(CmsObject cms) throws Exception {

        CmsFile configFile = cms.readFile(m_resource);
        CmsXmlContent content = CmsXmlContentFactory.unmarshal(cms, configFile);
        m_title = content.getValue(N_TITLE, CmsConfigurationReader.DEFAULT_LOCALE).getStringValue(cms);
        I_CmsXmlContentValue titleKey = content.getValue(N_TITLE_KEY, CmsConfigurationReader.DEFAULT_LOCALE);
        if ((titleKey != null) && CmsStringUtil.isNotEmptyOrWhitespaceOnly(titleKey.getStringValue(cms))) {
            m_titleKey = titleKey.getStringValue(cms);
        }
        I_CmsXmlContentValue orderVal = content.getValue(N_ORDER, CmsConfigurationReader.DEFAULT_LOCALE);
        if (orderVal != null) {
            try {
                m_order = Integer.parseInt(orderVal.getStringValue(cms));
            } catch (Exception e) {
                LOG.error(e.getLocalizedMessage(), e);
                m_order = DEFAULT_ORDER;
            }
        } else {
            m_order = DEFAULT_ORDER;
        }

        I_CmsXmlContentValue parentView = content.getValue("Parent", CmsConfigurationReader.DEFAULT_LOCALE);
        if (parentView != null) {
            CmsUUID parentViewId = null;
            try {
                CmsXmlVarLinkValue elementViewValue = (CmsXmlVarLinkValue)parentView;
                String stringValue = elementViewValue.getStringValue(cms);
                if (CmsStringUtil.isEmpty(stringValue)) {
                    parentViewId = CmsUUID.getNullUUID();
                } else if (stringValue.equals(PARENT_NONE)) {
                    parentViewId = null;
                } else if (stringValue.startsWith(CmsConfigurationReader.VIEW_SCHEME)) {
                    parentViewId = new CmsUUID(stringValue.substring(CmsConfigurationReader.VIEW_SCHEME.length()));
                } else {
                    parentViewId = elementViewValue.getLink(cms).getStructureId();
                }
            } catch (Exception e) {
                LOG.error(e.getLocalizedMessage(), e);
            }
            m_parentViewId = parentViewId;
        }

    }