Update the resource type.<p>

@param window
437037
protected void updateResourceType(Window window) {

        if (!((CmsModuleRow)m_table.getValue()).equals(
            new CmsModuleRow(OpenCms.getModuleManager().getModule(m_type.getModuleName())))) {
            CmsModule newModule = ((CmsModuleRow)m_table.getValue()).getModule().clone();
            CmsModule oldModule = OpenCms.getModuleManager().getModule(m_type.getModuleName()).clone();

            m_type.setModuleName(newModule.getName());

            List<I_CmsResourceType> newTypes = Lists.newArrayList(newModule.getResourceTypes());
            newTypes.add(m_type);
            newModule.setResourceTypes(newTypes);
            List<CmsExplorerTypeSettings> oldSettings = new ArrayList<CmsExplorerTypeSettings>(
                oldModule.getExplorerTypes());
            CmsExplorerTypeSettings settings = new CmsExplorerTypeSettings();

            settings.setName(m_type.getTypeName());
            settings = oldSettings.get(oldSettings.indexOf(settings));
            oldSettings.remove(settings);
            List<CmsExplorerTypeSettings> newSettings = new ArrayList<CmsExplorerTypeSettings>(
                newModule.getExplorerTypes());
            newSettings.add(settings);
            oldModule.setExplorerTypes(oldSettings);
            newModule.setExplorerTypes(newSettings);

            List<I_CmsResourceType> oldTypes = Lists.newArrayList(oldModule.getResourceTypes());
            oldTypes.remove(m_type);
            oldModule.setResourceTypes(oldTypes);
            if (m_schemaOK) {
                List<String> oldResources = Lists.newArrayList(oldModule.getResources());
                oldResources.remove(m_typeXML.getSchema());
                oldModule.setResources(oldResources);

                List<String> newResources = Lists.newArrayList(newModule.getResources());
                newResources.add(m_typeXML.getSchema());
                newModule.setResources(newResources);

            }
            try {
                OpenCms.getModuleManager().updateModule(A_CmsUI.getCmsObject(), oldModule);
                OpenCms.getModuleManager().updateModule(A_CmsUI.getCmsObject(), newModule);
                OpenCms.getResourceManager().initialize(A_CmsUI.getCmsObject());
                OpenCms.getWorkplaceManager().removeExplorerTypeSettings(oldModule);
                OpenCms.getWorkplaceManager().addExplorerTypeSettings(newModule);
                OpenCms.getWorkplaceManager().initialize(A_CmsUI.getCmsObject());

            } catch (CmsException e) {
                LOG.error("Unable to move resource type", e);
            }

        }
        window.close();
        A_CmsUI.get().reload();
    }
926858
public void setContentType(String contentType) {
        if (contentType == null) {
            _properties.remove(AMQP_PROP_CONTENT_TYPE);
            return;
        }
        
        _properties.put(AMQP_PROP_CONTENT_TYPE, contentType);
    }
156411
public void updateTree(CmsUUID id) {

        CmsObject cms = A_CmsUI.getCmsObject();
        updateResourceInTree(cms, id);

    }
396298
public void setElementView(CmsElementViewInfo viewInfo, Runnable nextAction) {

        if (viewInfo != null) {
            m_elementView = viewInfo;

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

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

                    getContainerpageService().setElementView(m_elementView.getElementViewId(), this);
                }

                @Override
                protected void onResponse(Void result) {

                    // nothing to do
                }
            };
            action.execute();
            m_currentEditLevel = -1;
            reinitializeButtons();
            reInitInlineEditing();
            updateGalleryData(true, nextAction);
        }
    }
56695
public void update(String ou, I_CmsOuTreeType type, CmsUUID groupID) {

        update(ou, type, groupID, m_filterTable.getValue());

    }
809893
public void setResourceType(java.util.Collection<StringFilter> resourceType) {
        if (resourceType == null) {
            this.resourceType = null;
            return;
        }

        this.resourceType = new java.util.ArrayList<StringFilter>(resourceType);
    }
1316207
private void setClickListener() {

        m_ok.addClickListener(new Button.ClickListener() {

            private static final long serialVersionUID = 6621475980210242125L;

            public void buttonClick(com.vaadin.ui.Button.ClickEvent event) {

                try {
                    CmsResourceFilter filter = getType() == null
                    ? CmsResourceFilter.ALL
                    : CmsResourceFilter.requireType(getType());
                    results.addResult(
                        new CmsResourceTypeStatResult(
                            getType(),
                            (String)m_siteSelect.getValue(),
                            getCmsObject().readResources("/", filter, true).size()));
                    m_results.setVisible(true);
                    results.setVerticalLayout(m_resLayout, false);
                } catch (CmsException e) {
                    LOG.error("Unable to read resource tree", e);
                }
            }
        });
    }
146341
protected void updateRoot(CmsObject rootCms, CmsResource siteRootResource) {

        m_root = siteRootResource;
        m_currentCms = rootCms;
        updateView();
    }
316899
protected void initExplorerTypeSettings() {

        try {
            CmsResource res = getCms().readResource(getParamResource(), CmsResourceFilter.ALL);
            if (res.isFolder()) {
                if (!getParamResource().endsWith("/")) {
                    // append folder separator to resource name
                    setParamResource(getParamResource() + "/");
                }
            }
            String resTypeName = OpenCms.getResourceManager().getResourceType(res.getTypeId()).getTypeName();
            // get settings for resource type
            setExplorerTypeSettings(getSettingsForType(resTypeName));
            setShowNavigation(getExplorerTypeSettings().isShowNavigation());
        } catch (Throwable e) {
            // error reading file, show error dialog
            try {
                includeErrorpage(this, e);
            } catch (JspException exc) {
                LOG.error(
                    Messages.get().getBundle().key(Messages.LOG_ERROR_INCLUDE_FAILED_1, FILE_DIALOG_SCREEN_ERRORPAGE));
            }
        }
    }
141250
private void setResourceTypes(Map<String, String[]> types) {

        if ((types == null) || (types.size() == 0)) {
            setValidConfiguration(false);
            LOG.error(Messages.get().getBundle().key(Messages.LOG_NO_RESOURCE_TYPES_0));
        }
        m_resTypes = types;
    }
869015
public void update(String ou, I_CmsOuTreeType type, CmsUUID roleOrGroupID, String filter) {

        CmsStateBean stateBean = new CmsStateBean(ou, type, roleOrGroupID, filter);
        openSubView(stateBean.getState(), true);

    }
422971
public void getNewElement(final String resourceType, final I_CmsSimpleCallback<CmsContainerElementData> callback) {

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

            @Override
            public void execute() {

                getContainerpageService().getNewElementData(
                    getData().getRpcContext(),
                    getData().getDetailId(),
                    getRequestParams(),
                    resourceType,
                    getPageState(),
                    getLocale(),
                    this);
            }

            @Override
            protected void onResponse(CmsContainerElementData result) {

                m_elements.put(result.getClientId(), result);
                callback.execute(result);
            }
        };
        action.execute();
    }
669617
public void update(CmsEntity entity) {

        List<Object> baseObjects = CmsEntity.getValuesForPath(entity, m_basePath);
        LinkedHashMap<String, String> options = Maps.newLinkedHashMap();
        for (Object baseObject : baseObjects) {
            List<Object> valueValues = CmsEntity.getValuesForPath(baseObject, m_valuePath);
            List<Object> descriptionValues = CmsEntity.getValuesForPath(baseObject, m_descriptionPath);
            if (valueValues.size() > 0) {
                String value = (String)valueValues.get(0);
                String description = value;
                if (descriptionValues.size() > 0) {
                    description = (String)descriptionValues.get(0);
                }
                options.put(value, description);
            }
        }
        replaceOptions(options);
    }
753574
public void addProperty(String propertyType) {

        if (m_properties == null) {
            // this list will be used and clean up in the importResource method
            m_properties = new HashMap<String, CmsProperty>();
        }
        try {
            if ((m_propertyName == null) || getIgnoredProperties().contains(m_propertyName)) {
                // continue if the current property (name) should be ignored or is null
                return;
            }
            CmsProperty property = m_properties.get(m_propertyName);
            if (property == null) {
                property = new CmsProperty();
                property.setName(m_propertyName);
                property.setAutoCreatePropertyDefinition(true);
                m_properties.put(m_propertyName, property);
            }

            if (m_propertyValue == null) {
                m_propertyValue = "";
            }

            if ((propertyType != null) && propertyType.equals(PROPERTY_ATTRIB_TYPE_SHARED)) {
                // it is a shared/resource property value
                property.setResourceValue(m_propertyValue);
            } else {
                // it is an individual/structure value
                property.setStructureValue(m_propertyValue);
            }
        } finally {
            m_propertyName = null;
            m_propertyValue = null;
        }
    }
976910
public void removeType(String resourceType) {

        m_searchObject.removeType(resourceType);
        m_searchObjectChanged = true;
        ValueChangeEvent.fire(this, m_searchObject);
    }
727362
public void setType(String type) {

        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(type)) {
            m_type = Type.parse(type.trim());
        }
    }
1150889
public synchronized void updateAndPersistSendWindow() throws SIResourceException
  {

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(this, tc, "updateAndPersistSendWindow" );

    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
    {
      SibTr.debug(tc, "definedSendWindow is: " + definedSendWindow 
          + " sendWindow is " +  sendWindow + " containsGuesses is " + containsGuesses
          + " totalMessages is " + totalMessages);
    }

    // If our current sendWindow is less than this new value
    // we can move to the new value straight away and send
    // any messages which were between the two
    if( definedSendWindow > sendWindow ) 
    {
      // If the stream containsGuesses we can't send
      // anything at the moment so we do the code
      // below in noGuessesInStream() instead
      if (!containsGuesses)
      {
        long oldSendWindow = sendWindow;
        sendWindow = definedSendWindow;  
        persistSendWindow(sendWindow, null); 
        // Send the messages up to the new send window
        // this will update firstMsgOutsideWindow
        sendMsgsInWindow(oldSendWindow, sendWindow);
      }
    } 
    else
    {
       // sendWindow is being reduced
       if ( definedSendWindow > totalMessages )
       {
         // sendWindow is being reduced but is bigger than 
         // totalMessages so we can just set it
         sendWindow = definedSendWindow;  
         persistSendWindow(sendWindow, null);    
       }
       else if ( totalMessages < sendWindow)
       {
         sendWindow = totalMessages;
         persistSendWindow(sendWindow, null); 
       }
    }
      
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "updateAndPersistSendWindow");
  }