Updates the site path info.<p>

@param sitePath the new site path
326547
public void updateSitePath(String sitePath) {

        String oldPath = getSitePath();
        getListItemWidget().setSubtitleLabel(sitePath);
        for (Widget child : getChildren()) {
            ((CmsGalleryTreeItem)child).updateParentPath(sitePath, oldPath);
        }
    }
1346754
public void updateSite(CmsObject cms, CmsSite oldSite, CmsSite newSite) throws CmsException {

        if (oldSite != null) {
            // remove the old site
            removeSite(cms, oldSite);
        }

        if (newSite != null) {
            // add the new site
            addSite(cms, newSite);
        }
    }
12558
protected void update(CmsRequestContext context) {

        m_timeUpdated = System.currentTimeMillis();
        m_siteRoot = context.getSiteRoot();
        setProject(context.getCurrentProject().getUuid());
        m_ouFqn = context.getOuFqn();
    }
1369101
public void loadResourceInfo(final String resourcePath) {

        CmsRpcAction<CmsResourceInfoBean> action = new CmsRpcAction<CmsResourceInfoBean>() {

            /**
             * @see org.opencms.gwt.client.rpc.CmsRpcAction#execute()
             */
            @Override
            public void execute() {

                getService().getResourceInfo(resourcePath, getLocale(), this);
            }

            /**
             * @see org.opencms.gwt.client.rpc.CmsRpcAction#onResponse(java.lang.Object)
             */
            @Override
            protected void onResponse(CmsResourceInfoBean result) {

                showData(result);
            }
        };
        action.execute();
    }
234297
public void applyWorkplaceAppSettings() {

        // add site path property to container
        m_container.addContainerProperty(
            CmsResourceTableProperty.PROPERTY_SITE_PATH,
            CmsResourceTableProperty.PROPERTY_SITE_PATH.getColumnType(),
            CmsResourceTableProperty.PROPERTY_SITE_PATH.getDefaultValue());

        // replace the resource name column with the path column
        Object[] visibleCols = m_fileTable.getVisibleColumns();
        for (int i = 0; i < visibleCols.length; i++) {
            if (CmsResourceTableProperty.PROPERTY_RESOURCE_NAME.equals(visibleCols[i])) {
                visibleCols[i] = CmsResourceTableProperty.PROPERTY_SITE_PATH;
            }
        }
        m_fileTable.setVisibleColumns(visibleCols);
        m_fileTable.setColumnCollapsible(CmsResourceTableProperty.PROPERTY_SITE_PATH, false);
        m_fileTable.setColumnHeader(
            CmsResourceTableProperty.PROPERTY_SITE_PATH,
            CmsVaadinUtils.getMessageText(CmsResourceTableProperty.PROPERTY_SITE_PATH.getHeaderKey()));

        // update column visibility according to the latest file explorer settings
        CmsFileExplorerSettings settings;
        try {
            settings = OpenCms.getWorkplaceAppManager().getAppSettings(
                A_CmsUI.getCmsObject(),
                CmsFileExplorerSettings.class);

            setTableState(settings);
        } catch (Exception e) {
            LOG.error("Error while reading file explorer settings from user.", e);
        }
        m_fileTable.setSortContainerPropertyId(CmsResourceTableProperty.PROPERTY_SITE_PATH);
        setActionColumnProperty(CmsResourceTableProperty.PROPERTY_SITE_PATH);
        setMenuBuilder(new CmsResourceContextMenuBuilder());
    }
1062959
public void setSourcePath(String sourcePath) {
		this.sourcePath = new ArrayList<>();
		for (final String path : Strings.split(sourcePath, Pattern.quote(File.pathSeparator))) {
			this.sourcePath.add(normalizeFile(path));
		}
	}
444167
public boolean isSiteUnderSite(String siteRootPath) {

        for (String siteRoot : getSiteRoots()) {
            if ((siteRootPath.length() > siteRoot.length())
                & siteRootPath.startsWith(CmsFileUtil.addTrailingSeparator(siteRoot))) {
                return true;
            }
        }
        return false;
    }
604936
protected void onSiteChange(String site) {

        try {
            m_treeData.removeAllItems();
            CmsObject rootCms = OpenCms.initCmsObject(A_CmsUI.getCmsObject());
            rootCms.getRequestContext().setSiteRoot("");
            CmsResource siteRootResource = rootCms.readResource(site);

            m_treeData.initRoot(rootCms, siteRootResource);
            m_fileTree.expandItem(siteRootResource.getStructureId());
            m_siteRoot = site;
            updateRoot(rootCms, siteRootResource);
        } catch (CmsException e) {
            LOG.error(e.getLocalizedMessage(), e);
        }
    }
1224594
public void changeSite(String siteRoot, String path, boolean force) {

        CmsObject cms = A_CmsUI.getCmsObject();
        String currentSiteRoot = cms.getRequestContext().getSiteRoot();
        if (force || !currentSiteRoot.equals(siteRoot)) {
            CmsAppWorkplaceUi.get().changeSite(siteRoot);
            if (path == null) {
                path = m_locationCache.getFileExplorerLocation(siteRoot);
                if (CmsStringUtil.isEmptyOrWhitespaceOnly(siteRoot)
                    && ((path == null) || !path.startsWith("/system"))) {
                    // switching to the root site and previous root site folder is not below /system
                    // -> stay in the current folder
                    path = m_locationCache.getFileExplorerLocation(currentSiteRoot);
                    if (path != null) {
                        path = CmsStringUtil.joinPaths(currentSiteRoot, path);
                    }
                }
            }
            openPath(path, true);
            Container container = m_siteSelector.getContainerDataSource();
            for (Object id : container.getItemIds()) {
                String key = (String)id;
                if (CmsStringUtil.comparePaths(key, siteRoot)) {
                    siteRoot = key;
                    break;
                }
            }
            m_siteSelector.select(siteRoot);
        }
    }
641459
public void updateRequestData(CmsFlexRequest cmsFlexRequest) {

        CmsResource detailRes = CmsDetailPageResourceHandler.getDetailResource(cmsFlexRequest);
        m_detailContentResource = detailRes;
        m_request = cmsFlexRequest;

    }
848711
@SuppressWarnings("deprecation")
    private void adjustFolderType(CmsResource siteRootResource) throws CmsLoaderException, CmsException {

        if (OpenCms.getResourceManager().getResourceType(
            CmsResourceTypeFolder.RESOURCE_TYPE_NAME) == OpenCms.getResourceManager().getResourceType(
                siteRootResource)) {

            siteRootResource.setType(
                OpenCms.getResourceManager().getResourceType(
                    CmsResourceTypeFolderSubSitemap.TYPE_SUBSITEMAP).getTypeId());
            m_cms.writeResource(siteRootResource);
        }
    }
18421
public void onReceiveSitemapPreloadData(CmsSitemapEntryBean sitemapPreloadData) {

        fillWithPreloadInfo(Collections.singletonList(sitemapPreloadData));
        String siteRoot = sitemapPreloadData.getSiteRoot();
        if (siteRoot != null) {
            selectSite(siteRoot);
        }
    }
427376
public void setWorkplaceSite(String newSite) {

        String oldSite = getWorkplaceSite();
        // get the site list
        String siteList = getExtProperty("site.root.list");
        // replace old site URL in site list with new site URL
        siteList = CmsStringUtil.substitute(siteList, oldSite, newSite);
        setExtProperty("site.root.list", siteList);
        setExtProperty("site.workplace", newSite);
    }
1041442
public void addSite(String siteKey) {
		ValueMap gv = new ValueMap(siteKey);
		if (!this.valueMaps.contains(gv)) {
			this.valueMaps.add(gv);
		}
	}
659038
public void update(CmsClientSitemapEntry source) {

        copyMembers(source);
        // position values < 0 are considered as not set
        if (source.getPosition() >= 0) {
            setPosition(source.getPosition());
        }
    }
565781
private void cleanupOldPaths(String oldSitepath, String newSitepath) {

        // use a separate list to avoid concurrent changes
        List<CmsClientSitemapEntry> entries = new ArrayList<CmsClientSitemapEntry>(m_entriesById.values());
        for (CmsClientSitemapEntry entry : entries) {
            if (entry.getSitePath().startsWith(oldSitepath)) {
                String currentPath = entry.getSitePath();
                String updatedSitePath = CmsStringUtil.joinPaths(
                    newSitepath,
                    currentPath.substring(oldSitepath.length()));
                entry.updateSitePath(updatedSitePath, this);
            }
        }
    }
425480
public void changeSite(String siteRoot) {

        if (!getCmsObject().getRequestContext().getSiteRoot().equals(siteRoot)) {
            getCmsObject().getRequestContext().setSiteRoot(siteRoot);
            getWorkplaceSettings().setSite(siteRoot);
            OpenCms.getSessionManager().updateSessionInfo(getCmsObject(), getHttpSession());
        }
    }