Initializes repositories using an admin CMS object.<p>

@param cms the CMS object with admin privileges
485265
public void initializeCms(CmsObject cms) {

        List<String> toRemove = new ArrayList<String>();
        // Repositories which can't be fully initialized need to be removed.
        for (I_CmsRepository repository : m_repositoryMap.values()) {
            String repoName = repository.getName();
            try {
                repository.initializeCms(cms);
            } catch (CmsException e) {
                LOG.warn("Could not fully initialize repository " + repoName, e);
                toRemove.add(repoName);
            }
        }
        for (String removeRepo : toRemove) {
            m_repositoryMap.remove(removeRepo);
        }
        m_hasJlan = !getRepositories(CmsJlanRepository.class).isEmpty();
        if (!CmsShell.isJlanDisabled() && m_hasJlan) {
            CmsJlanUsers.setAdminCms(cms);
            m_jlanThreadManager = new CmsJlanThreadManager();
            m_jlanThreadManager.start();
        }

    }
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);
    }
494843
public void initConfiguration() throws CmsConfigurationException {

        for (I_CmsRepository rep : m_repositoryList) {
            if (CmsLog.INIT.isInfoEnabled()) {
                CmsLog.INIT.info(
                    Messages.get().getBundle().key(
                        Messages.INIT_ADD_REPOSITORY_2,
                        rep.getClass().getName(),
                        rep.getName()));
            }
            rep.initConfiguration();
            m_repositoryMap.put(rep.getName(), rep);
        }
        m_frozen = true;

        if (CmsLog.INIT.isInfoEnabled()) {
            CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_REPOSITORY_CONFIG_FINISHED_0));
        }

    }
290225
private void init(Set<CmsResource> resources, List<CmsUser> user) {

        addStyleName("o-no-padding");
        m_container = new IndexedContainer();
        m_container.addContainerProperty(PROP_ELEMENT, CmsResourceInfo.class, null);

        for (CmsResource res : resources) {
            Item item = m_container.addItem(res);
            if (item != null) { //Item is null if resource is dependency of multiple groups/user to delete
                item.getItemProperty(PROP_ELEMENT).setValue(new CmsResourceInfo(res));
            }
        }
        if (user != null) {
            for (CmsUser us : user) {
                Item item = m_container.addItem(us);
                if (item != null) { //Item is null if User is dependency of multiple groups to delete
                    item.getItemProperty(PROP_ELEMENT).setValue(
                        new CmsResourceInfo(
                            us.getSimpleName(),
                            us.getDescription(),
                            new CmsCssIcon(OpenCmsTheme.ICON_USER)));
                }
            }
        }
        setColumnHeaderMode(ColumnHeaderMode.HIDDEN);
        setContainerDataSource(m_container);
        setVisibleColumns(PROP_ELEMENT);

    }
373881
public void initialize(CmsObject cms) {

        m_adminCms = cms;
        // initialize static export RFS path (relative to web application)
        m_staticExportPath = normalizeExportPath(m_staticExportPathConfigured);
        m_staticExportWorkPath = normalizeExportPath(getExportWorkPathForConfiguration());
        if (m_staticExportPath.equals(OpenCms.getSystemInfo().getWebApplicationRfsPath())) {
            throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_INVALID_EXPORT_PATH_0));
        }
        // initialize prefix variables
        m_rfsPrefix = normalizeRfsPrefix(m_rfsPrefixConfigured);
        Iterator<CmsStaticExportRfsRule> itRfsRules = m_rfsRules.iterator();
        while (itRfsRules.hasNext()) {
            CmsStaticExportRfsRule rule = itRfsRules.next();
            try {
                rule.setExportPath(normalizeExportPath(rule.getExportPathConfigured()));
            } catch (CmsIllegalArgumentException e) {
                CmsLog.INIT.warn(e.getMessageContainer());
                rule.setExportPath(m_staticExportPath);
            }
            try {
                rule.setExportWorkPath(normalizeExportPath(rule.getExportWorkPathConfigured()));
            } catch (CmsIllegalArgumentException e) {
                CmsLog.INIT.warn(e.getMessageContainer());
                rule.setExportWorkPath(m_staticExportWorkPath);
            }
            rule.setRfsPrefix(normalizeRfsPrefix(rule.getRfsPrefixConfigured()));
        }
        m_vfsPrefix = insertContextStrings(m_vfsPrefixConfigured);
        m_vfsPrefix = CmsFileUtil.normalizePath(m_vfsPrefix, '/');
        if (CmsResource.isFolder(m_vfsPrefix)) {
            // ensure prefix does NOT end with a folder '/'
            m_vfsPrefix = m_vfsPrefix.substring(0, m_vfsPrefix.length() - 1);
        }
        if (CmsLog.INIT.isDebugEnabled()) {
            if (cms != null) {
                CmsLog.INIT.debug(Messages.get().getBundle().key(Messages.INIT_SE_MANAGER_CREATED_1, cms));
            } else {
                CmsLog.INIT.debug(Messages.get().getBundle().key(Messages.INIT_SE_MANAGER_CREATED_0));
            }
        }

        m_cacheOnlineLinks = CmsMemoryMonitor.createLRUCacheMap(2048);
        OpenCms.getMemoryMonitor().register(this.getClass().getName() + ".m_cacheOnlineLinks", m_cacheOnlineLinks);

        m_cacheExportUris = CmsMemoryMonitor.createLRUCacheMap(2048);
        OpenCms.getMemoryMonitor().register(this.getClass().getName() + ".m_cacheExportUris", m_cacheExportUris);

        m_cacheSecureLinks = CmsMemoryMonitor.createLRUCacheMap(2048);
        OpenCms.getMemoryMonitor().register(this.getClass().getName() + ".m_cacheSecureLinks", m_cacheSecureLinks);

        m_cacheExportLinks = CmsMemoryMonitor.createLRUCacheMap(2048);
        OpenCms.getMemoryMonitor().register(this.getClass().getName() + ".m_cacheExportLinks", m_cacheExportLinks);

        // register this object as event listener
        OpenCms.addCmsEventListener(
            this,
            new int[] {
                I_CmsEventListener.EVENT_PUBLISH_PROJECT,
                I_CmsEventListener.EVENT_CLEAR_CACHES,
                I_CmsEventListener.EVENT_UPDATE_EXPORTS});

        m_exportFolderMatcher = new CmsExportFolderMatcher(m_exportFolders, m_testResource);

        // get the default accept-language header value
        m_defaultAcceptLanguageHeader = CmsAcceptLanguageHeaderParser.createLanguageHeader();

        // get the default accept-charset header value
        m_defaultAcceptCharsetHeader = OpenCms.getSystemInfo().getDefaultEncoding();

        // get the export url prefix
        int pos = m_exportUrl.indexOf("://");
        if (pos > 0) {
            // absolute link, remove http://servername
            int pos2 = m_exportUrl.indexOf('/', pos + 3);
            if (pos2 > 0) {
                m_exportUrlPrefix = m_exportUrl.substring(pos2);
            } else {
                // should never happen
                m_exportUrlPrefix = "";
            }
        } else {
            m_exportUrlPrefix = m_exportUrl;
        }
        if (CmsLog.INIT.isInfoEnabled()) {
            if (isStaticExportEnabled()) {
                CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_STATIC_EXPORT_ENABLED_0));
                CmsLog.INIT.info(
                    Messages.get().getBundle().key(
                        Messages.INIT_EXPORT_DEFAULT_1,
                        Boolean.valueOf(getExportPropertyDefault())));
                itRfsRules = m_rfsRules.iterator();
                while (itRfsRules.hasNext()) {
                    CmsStaticExportRfsRule rfsRule = itRfsRules.next();
                    CmsLog.INIT.info(
                        Messages.get().getBundle().key(
                            Messages.INIT_EXPORT_RFS_RULE_EXPORT_PATH_2,
                            rfsRule.getSource(),
                            rfsRule.getExportPath()));
                    CmsLog.INIT.info(
                        Messages.get().getBundle().key(
                            Messages.INIT_EXPORT_RFS_RULE_RFS_PREFIX_2,
                            rfsRule.getSource(),
                            rfsRule.getRfsPrefix()));
                    if (rfsRule.getUseRelativeLinks() != null) {
                        if (rfsRule.getUseRelativeLinks().booleanValue()) {
                            CmsLog.INIT.info(
                                Messages.get().getBundle().key(
                                    Messages.INIT_EXPORT_RFS_RULE_RELATIVE_LINKS_1,
                                    rfsRule.getSource()));
                        } else {
                            CmsLog.INIT.info(
                                Messages.get().getBundle().key(
                                    Messages.INIT_EXPORT_RFS_RULE_ABSOLUTE_LINKS_1,
                                    rfsRule.getSource()));
                        }
                    }
                }
                // default rule
                CmsLog.INIT.info(
                    Messages.get().getBundle().key(
                        Messages.INIT_EXPORT_RFS_RULE_EXPORT_PATH_2,
                        "/",
                        m_staticExportPath));
                CmsLog.INIT.info(
                    Messages.get().getBundle().key(Messages.INIT_EXPORT_RFS_RULE_RFS_PREFIX_2, "/", m_rfsPrefix));
                if (m_exportRelativeLinks) {
                    CmsLog.INIT.info(
                        Messages.get().getBundle().key(Messages.INIT_EXPORT_RFS_RULE_RELATIVE_LINKS_1, "/"));
                } else {
                    CmsLog.INIT.info(
                        Messages.get().getBundle().key(Messages.INIT_EXPORT_RFS_RULE_ABSOLUTE_LINKS_1, "/"));
                }
                CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_EXPORT_VFS_PREFIX_1, getVfsPrefix()));
                CmsLog.INIT.info(
                    Messages.get().getBundle().key(
                        Messages.INIT_EXPORT_EXPORT_HANDLER_1,
                        getHandler().getClass().getName()));
                CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_EXPORT_URL_1, getExportUrl()));
                CmsLog.INIT.info(
                    Messages.get().getBundle().key(Messages.INIT_EXPORT_OPTIMIZATION_1, getPlainExportOptimization()));
                CmsLog.INIT.info(
                    Messages.get().getBundle().key(Messages.INIT_EXPORT_TESTRESOURCE_1, getTestResource()));
                CmsLog.INIT.info(
                    Messages.get().getBundle().key(
                        Messages.INIT_LINKSUBSTITUTION_HANDLER_1,
                        getLinkSubstitutionHandler().getClass().getName()));
            } else {
                CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_STATIC_EXPORT_DISABLED_0));
            }
        }
    }
71600
public void updateCmsObject(CmsObject cms) {

        try {
            m_cms = OpenCms.initCmsObject(cms);
        } catch (CmsException e) {
            LOG.error(e.getLocalizedMessage(), e);
            m_cms = cms;
        }
    }
601394
private void init(CmsResource resource, CmsObject cms) {

        List<CmsProperty> properties;

        try {
            properties = cms.readPropertyObjects(resource, false);
        } catch (CmsException e) {
            m_priority = 0;
            m_title = "";
            return;
        }

        try {
            m_priority = Integer.parseInt(
                CmsProperty.get(CmsPriorityResourceCollector.PROPERTY_PRIORITY, properties).getValue());
        } catch (NumberFormatException e) {
            m_priority = CmsPriorityResourceCollector.PRIORITY_STANDARD;
        }

        m_title = CmsProperty.get(CmsPropertyDefinition.PROPERTY_TITLE, properties).getValue();
        if (CmsStringUtil.isEmpty(m_title)) {
            m_title = "";
        }
    }
1119055
public void initialize(CmsObject cms) {

        if (CmsLog.INIT.isInfoEnabled()) {
            CmsLog.INIT.info(
                Messages.get().getBundle().key(
                    Messages.INIT_NUM_SITE_ROOTS_CONFIGURED_1,
                    new Integer((m_siteMatcherSites.size() + ((m_defaultUri != null) ? 1 : 0)))));
        }

        try {

            m_clone = OpenCms.initCmsObject(cms);
            m_clone.getRequestContext().setSiteRoot("");
            m_clone.getRequestContext().setCurrentProject(m_clone.readProject(CmsProject.ONLINE_PROJECT_NAME));

            CmsObject cms_offline = OpenCms.initCmsObject(m_clone);
            CmsProject tempProject = cms_offline.createProject(
                "tempProjectSites",
                "",
                "/Users",
                "/Users",
                CmsProject.PROJECT_TYPE_TEMPORARY);
            cms_offline.getRequestContext().setCurrentProject(tempProject);

            m_siteUUIDs = new HashMap<CmsUUID, CmsSite>();
            // check the presence of sites in VFS

            m_onlyOfflineSites = new ArrayList<CmsSite>();

            for (CmsSite site : m_siteMatcherSites.values()) {
                checkUUIDOfSiteRoot(site, m_clone, cms_offline);
                try {
                    CmsResource siteRes = m_clone.readResource(site.getSiteRoot());
                    site.setSiteRootUUID(siteRes.getStructureId());

                    m_siteUUIDs.put(siteRes.getStructureId(), site);
                    // during server startup the digester can not access properties, so set the title afterwards
                    if (CmsStringUtil.isEmptyOrWhitespaceOnly(site.getTitle())) {
                        String title = m_clone.readPropertyObject(
                            siteRes,
                            CmsPropertyDefinition.PROPERTY_TITLE,
                            false).getValue();
                        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(title)) {
                            site.setTitle(title);
                        }
                    }
                } catch (Throwable t) {
                    if (CmsLog.INIT.isWarnEnabled()) {
                        CmsLog.INIT.warn(Messages.get().getBundle().key(Messages.INIT_NO_ROOT_FOLDER_1, site));
                    }
                }
            }
            cms_offline.deleteProject(tempProject.getUuid());

            // check the presence of the default site in VFS
            if (CmsStringUtil.isEmptyOrWhitespaceOnly(m_defaultUri)) {
                m_defaultSite = null;
            } else {
                m_defaultSite = new CmsSite(m_defaultUri, CmsSiteMatcher.DEFAULT_MATCHER);
                try {
                    m_clone.readResource(m_defaultSite.getSiteRoot());
                } catch (Throwable t) {
                    if (CmsLog.INIT.isWarnEnabled()) {
                        CmsLog.INIT.warn(
                            Messages.get().getBundle().key(Messages.INIT_NO_ROOT_FOLDER_DEFAULT_SITE_1, m_defaultSite));
                    }
                }
            }
            if (m_defaultSite == null) {
                m_defaultSite = new CmsSite("/", CmsSiteMatcher.DEFAULT_MATCHER);
            }
            if (CmsLog.INIT.isInfoEnabled()) {
                if (m_defaultSite != null) {
                    CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_DEFAULT_SITE_ROOT_1, m_defaultSite));
                } else {
                    CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_DEFAULT_SITE_ROOT_0));
                }
            }
            initWorkplaceMatchers();

            // set site lists to unmodifiable
            setSiteMatcherSites(m_siteMatcherSites);

            // store additional site roots to optimize lookups later
            for (String root : m_siteRootSites.keySet()) {
                if (!root.startsWith(SITES_FOLDER) || (root.split("/").length >= 4)) {
                    m_additionalSiteRoots.add(root);
                }
            }

            if (m_sharedFolder == null) {
                m_sharedFolder = DEFAULT_SHARED_FOLDER;
            }

            // initialization is done, set the frozen flag to true
            m_frozen = true;
        } catch (CmsException e) {
            LOG.warn(e);
        }
        if (!m_isListenerSet) {
            OpenCms.addCmsEventListener(this, new int[] {I_CmsEventListener.EVENT_PUBLISH_PROJECT});
            m_isListenerSet = true;
        }
    }
1228613
protected void setupCms(CmsObject cms) {

        cms.getRequestContext().setUri("/");
        cms.getRequestContext().setSiteRoot((String)m_site.getValue());
        try {
            cms.getRequestContext().setCurrentProject(cms.readProject((CmsUUID)m_project.getValue()));
        } catch (CmsException e) {
            LOG.error("Unable to read Project", e);
        }
    }
695608
public void init(CmsObject cms, List<CmsResource> resources) {

        m_cms = cms;
        m_resources = resources;
    }
1278572
public void setDefaultUserSettings(CmsDefaultUserSettings defaultUserSettings) {

        m_defaultUserSettings = defaultUserSettings;

        if (CmsLog.INIT.isInfoEnabled()) {
            CmsLog.INIT.info(
                Messages.get().getBundle().key(
                    Messages.INIT_DEFAULT_USER_SETTINGS_1,
                    m_defaultUserSettings.getClass().getName()));
        }
    }
496598
private CmsObject getAdminCms(CmsObject cms) throws CmsException {

        CmsObject adminCms = OpenCms.initCmsObject(m_adminCms);
        adminCms.getRequestContext().setSiteRoot(cms.getRequestContext().getSiteRoot());
        adminCms.getRequestContext().setRequestTime(cms.getRequestContext().getRequestTime());
        adminCms.getRequestContext().setCurrentProject(cms.getRequestContext().getCurrentProject());
        adminCms.getRequestContext().setEncoding(cms.getRequestContext().getEncoding());
        adminCms.getRequestContext().setUri(cms.getRequestContext().getUri());
        return adminCms;
    }
797148
public void upgradeContent(CmsObject cms) throws CmsException {

        if (m_content == null) {
            m_content = cms.readFile(m_resource).getContents();
        }
    }
1050457
public void initialize(CmsObject cms) throws CmsException {

        m_publishEngine.initialize(cms, m_publishQueuePersistance, m_publishQueueShutdowntime);
        m_frozen = true;
    }
501442
private void init(CmsObject cms, final Window window, final CmsAccountsApp app) {

        CmsVaadinUtils.readAndLocalizeDesign(this, CmsVaadinUtils.getWpMessagesForCurrentLocale(), null);
        try {
            displayResourceInfoDirectly(
                Collections.singletonList(
                    CmsAccountsApp.getOUInfo(
                        OpenCms.getOrgUnitManager().readOrganizationalUnit(A_CmsUI.getCmsObject(), m_ouName))));
        } catch (CmsException e) {
            LOG.error("Unable to read OU", e);
        }
        m_icon.setContentMode(ContentMode.HTML);
        m_icon.setValue(FontOpenCms.WARNING.getHtml());
        m_cms = cms;
        m_okButton.addClickListener(new ClickListener() {

            private static final long serialVersionUID = -7845894751587879028L;

            public void buttonClick(ClickEvent event) {

                deletePrincipal();
                window.close();
                app.reload();

            }

        });

        m_cancelButton.addClickListener(new ClickListener() {

            private static final long serialVersionUID = 6649262870116199591L;

            public void buttonClick(ClickEvent event) {

                window.close();

            }

        });
    }
643888
public void setRepositories(java.util.Collection<Repository> repositories) {
        if (repositories == null) {
            this.repositories = null;
            return;
        }

        this.repositories = new java.util.ArrayList<Repository>(repositories);
    }
1351489
protected void initContent(CmsReplaceInfo replaceInfo) {

        m_replaceInfo = replaceInfo;
        CmsListItemWidget fileInfoItem = new CmsListItemWidget(m_replaceInfo.getFileInfo());
        m_mainPanel.setReplaceInfo(fileInfoItem);
        if (!m_replaceInfo.isLockable()) {
            m_mainPanel.displayDialogInfo(Messages.get().key(Messages.GUI_REPLACE_LOCKED_RESOURCE_0), true);
        } else {
            m_mainPanel.displayDialogInfo(Messages.get().key(Messages.GUI_REPLACE_INFO_0), false);
            checkFileType();
            createButtons();
        }
    }