Class CmsPropertySubmitHandler

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.String getAndRemoveValue​(java.util.Map<java.lang.String,​java.lang.String> map, java.lang.String key)
      Helper method which retrieves a value for a given key from a map and then deletes the entry for the key.
      protected java.util.List<org.opencms.gwt.shared.property.CmsPropertyModification> getPropertyChanges​(java.util.Map<java.lang.String,​java.lang.String> fieldValues)
      Converts a map of field values to a list of property changes.
      void onSubmitForm​(CmsForm form, java.util.Map<java.lang.String,​java.lang.String> fieldValues, java.util.Set<java.lang.String> editedFields)
      The method which should be called when a CmsForm is submitted.
      protected java.lang.String removeTabSuffix​(java.lang.String fieldId)
      Removes the tab suffix from a field id.
      protected java.util.Set<java.lang.String> removeTabSuffixes​(java.util.Collection<java.lang.String> fieldIds)
      Removes the tab suffixes from each field id of a collection.
      protected java.util.Map<java.lang.String,​java.lang.String> removeTabSuffixes​(java.util.Map<java.lang.String,​java.lang.String> fieldValues)
      Removes the tab suffixes from the keys of a map.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getAndRemoveValue

        protected java.lang.String getAndRemoveValue​(java.util.Map<java.lang.String,​java.lang.String> map,
                                                     java.lang.String key)
        Helper method which retrieves a value for a given key from a map and then deletes the entry for the key.

        Parameters:
        map - the map from which to retrieve the value
        key - the key
        Returns:
        the removed value
      • getPropertyChanges

        protected java.util.List<org.opencms.gwt.shared.property.CmsPropertyModification> getPropertyChanges​(java.util.Map<java.lang.String,​java.lang.String> fieldValues)
        Converts a map of field values to a list of property changes.

        Parameters:
        fieldValues - the field values
        Returns:
        the property changes
      • removeTabSuffix

        protected java.lang.String removeTabSuffix​(java.lang.String fieldId)
        Removes the tab suffix from a field id.

        Parameters:
        fieldId - a field id
        Returns:
        the field id without the suffix
      • removeTabSuffixes

        protected java.util.Set<java.lang.String> removeTabSuffixes​(java.util.Collection<java.lang.String> fieldIds)
        Removes the tab suffixes from each field id of a collection.

        Parameters:
        fieldIds - the field ids from which to remove the tab suffix
        Returns:
        a new collection of field ids without tab suffixes
      • removeTabSuffixes

        protected java.util.Map<java.lang.String,​java.lang.String> removeTabSuffixes​(java.util.Map<java.lang.String,​java.lang.String> fieldValues)
        Removes the tab suffixes from the keys of a map.

        Parameters:
        fieldValues - a map of field values
        Returns:
        a new map of field values, with tab suffixes removed from the keys