private boolean performDialogOperation(HttpServletRequest request) throws CmsException {

        List<CmsPropertyDefinition> propertyDef = getCms().readAllPropertyDefinitions();
        boolean useTempfileProject = Boolean.valueOf(getParamUsetempfileproject()).booleanValue();
        try {
            if (useTempfileProject) {
                switchToTempProject();
            }
            Map<String, CmsProperty> activeProperties = getActiveProperties();
            String activeTab = getActiveTabName();
            List<CmsProperty> propertiesToWrite = new ArrayList<CmsProperty>();

            // check all property definitions of the resource for new values
            Iterator<CmsPropertyDefinition> i = propertyDef.iterator();
            while (i.hasNext()) {
                CmsPropertyDefinition curPropDef = i.next();
                String propName = CmsEncoder.escapeXml(curPropDef.getName());
                String valueStructure = null;
                String valueResource = null;

                if (key(Messages.GUI_PROPERTIES_INDIVIDUAL_0).equals(activeTab)) {
                    // get parameters from the structure tab
                    valueStructure = request.getParameter(PREFIX_VALUE + propName);
                    valueResource = request.getParameter(PREFIX_RESOURCE + propName);
                    if ((valueStructure != null)
                        && !"".equals(valueStructure.trim())
                        && valueStructure.equals(valueResource)) {
                        // the resource value was shown/entered in input field, set structure value to empty String
                        valueStructure = "";
                    }
                } else {
                    // get parameters from the resource tab
                    valueStructure = request.getParameter(PREFIX_STRUCTURE + propName);
                    valueResource = request.getParameter(PREFIX_VALUE + propName);
                }

                // check values for blanks and null
                if (valueStructure != null) {
                    valueStructure = valueStructure.trim();
                }

                if (valueResource != null) {
                    valueResource = valueResource.trim();
                }

                // create new CmsProperty object to store
                CmsProperty newProperty = new CmsProperty();
                newProperty.setName(curPropDef.getName());
                newProperty.setStructureValue(valueStructure);
                newProperty.setResourceValue(valueResource);

                // get the old property values
                CmsProperty oldProperty = activeProperties.get(curPropDef.getName());
                if (oldProperty == null) {
                    // property was not set, create new empty property object
                    oldProperty = new CmsProperty();
                    oldProperty.setName(curPropDef.getName());
                }

                boolean writeStructureValue = false;
                boolean writeResourceValue = false;
                String oldValue = oldProperty.getStructureValue();
                String newValue = newProperty.getStructureValue();

                // write the structure value if the existing structure value is not null and we want to delete the structure value
                writeStructureValue = ((oldValue != null) && newProperty.isDeleteStructureValue());
                // or if we want to write a value which is neither the delete value or an empty value
                writeStructureValue |= !newValue.equals(oldValue)
                    && !"".equalsIgnoreCase(newValue)
                    && !CmsProperty.DELETE_VALUE.equalsIgnoreCase(newValue);
                // set the structure value explicitly to null to leave it as is in the database
                if (!writeStructureValue) {
                    newProperty.setStructureValue(null);
                }

                oldValue = oldProperty.getResourceValue();
                newValue = newProperty.getResourceValue();

                // write the resource value if the existing resource value is not null and we want to delete the resource value
                writeResourceValue = ((oldValue != null) && newProperty.isDeleteResourceValue());
                // or if we want to write a value which is neither the delete value or an empty value
                writeResourceValue |= !newValue.equals(oldValue)
                    && !"".equalsIgnoreCase(newValue)
                    && !CmsProperty.DELETE_VALUE.equalsIgnoreCase(newValue);
                // set the resource value explicitly to null to leave it as is in the database
                if (!writeResourceValue) {
                    newProperty.setResourceValue(null);
                }

                if (writeStructureValue || writeResourceValue) {
                    // add property to list only if property values have changed
                    propertiesToWrite.add(newProperty);
                }
            }
            if (propertiesToWrite.size() > 0) {
                // lock resource if autolock is enabled
                checkLock(getParamResource());
                //write the new property values
                getCms().writePropertyObjects(getParamResource(), propertiesToWrite);
            }
        } finally {
            if (useTempfileProject) {
                switchToCurrentProject();
            }
        }
        return true;
    }
private boolean performDialogOperation ( HttpServletRequest request ) throws CmsException { List < CmsPropertyDefinition > propertyDef = getCms ( ) . readAllPropertyDefinitions ( ) ; boolean useTempfileProject = Boolean . valueOf ( getParamUsetempfileproject ( ) ) . booleanValue ( ) ; try { if ( useTempfileProject ) { switchToTempProject ( ) ; } Map < String , CmsProperty > activeProperties = getActiveProperties ( ) ; String activeTab = getActiveTabName ( ) ; List < CmsProperty > propertiesToWrite = new ArrayList < CmsProperty > ( ) ; Iterator < CmsPropertyDefinition > i = propertyDef . iterator ( ) ; while ( i . hasNext ( ) ) { CmsPropertyDefinition curPropDef = i . next ( ) ; String propName = CmsEncoder . escapeXml ( curPropDef . getName ( ) ) ; String valueStructure = null ; String valueResource = null ; if ( key ( Messages . GUI_PROPERTIES_INDIVIDUAL_0 ) . equals ( activeTab ) ) { valueStructure = request . getParameter ( PREFIX_VALUE + propName ) ; valueResource = request . getParameter ( PREFIX_RESOURCE + propName ) ; if ( ( valueStructure != null ) && ! "" . equals ( valueStructure . trim ( ) ) && valueStructure . equals ( valueResource ) ) { valueStructure = "" ; } } else { valueStructure = request . getParameter ( PREFIX_STRUCTURE + propName ) ; valueResource = request . getParameter ( PREFIX_VALUE + propName ) ; } if ( valueStructure != null ) { valueStructure = valueStructure . trim ( ) ; } if ( valueResource != null ) { valueResource = valueResource . trim ( ) ; } CmsProperty newProperty = new CmsProperty ( ) ; newProperty . setName ( curPropDef . getName ( ) ) ; newProperty . setStructureValue ( valueStructure ) ; newProperty . setResourceValue ( valueResource ) ; CmsProperty oldProperty = activeProperties . get ( curPropDef . getName ( ) ) ; if ( oldProperty == null ) { oldProperty = new CmsProperty ( ) ; oldProperty . setName ( curPropDef . getName ( ) ) ; } boolean writeStructureValue = false ; boolean writeResourceValue = false ; String oldValue = oldProperty . getStructureValue ( ) ; String newValue = newProperty . getStructureValue ( ) ; writeStructureValue = ( ( oldValue != null ) && newProperty . isDeleteStructureValue ( ) ) ; writeStructureValue |= ! newValue . equals ( oldValue ) && ! "" . equalsIgnoreCase ( newValue ) && ! CmsProperty . DELETE_VALUE . equalsIgnoreCase ( newValue ) ; if ( ! writeStructureValue ) { newProperty . setStructureValue ( null ) ; } oldValue = oldProperty . getResourceValue ( ) ; newValue = newProperty . getResourceValue ( ) ; writeResourceValue = ( ( oldValue != null ) && newProperty . isDeleteResourceValue ( ) ) ; writeResourceValue |= ! newValue . equals ( oldValue ) && ! "" . equalsIgnoreCase ( newValue ) && ! CmsProperty . DELETE_VALUE . equalsIgnoreCase ( newValue ) ; if ( ! writeResourceValue ) { newProperty . setResourceValue ( null ) ; } if ( writeStructureValue || writeResourceValue ) { propertiesToWrite . add ( newProperty ) ; } } if ( propertiesToWrite . size ( ) > 0 ) { checkLock ( getParamResource ( ) ) ; getCms ( ) . writePropertyObjects ( getParamResource ( ) , propertiesToWrite ) ; } } finally { if ( useTempfileProject ) { switchToCurrentProject ( ) ; } } return true ; }
Performs the editing of the resources properties.<p>

@param request the HttpServletRequest
@return true, if the properties were successfully changed, otherwise false
@throws CmsException if editing is not successful