Interface EditorValue<T>

All Known Subinterfaces:
CheckboxEditorValue, ComboboxEditorValue, ContentAreaListValue, ContentListEditorValue, DatasetEditorValue, DateEditorValue, DomEditorValue, DomTableEditorValue, FileEditorValue, ImageMapEditorValue, LinkEditorValue, LinkListEditorValue, ListEditorValue, MediumEditorValue<T>, NumberEditorValue, ObjectChooserEditorValue, PageRefEditorValue, PermissionEditorValue, PictureEditorValue, RadiobuttonEditorValue, ReferenceEditorValue, SiteStoreVariableValue, TabListEditorValue, TextareaEditorValue, TextEditorValue, TextualEditorValue, TNodesEditorValue, ToggleEditorValue

@Deprecated public interface EditorValue<T>
Deprecated.
since 5.2.21 - use ValueEngineer instead.
Interface providing generic access to an editor value object.

Note: Components, which allow types of objects other than the defined value type to beassimilated, are urged to place an "Assimilation Note" in their type documentation.

Since:
2.3.17
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Deprecated.
    Marker for preset copy mode
    static final String
    Deprecated.
    Marker for default values
    static final String
    Deprecated.
    Marker for delete values
    static final Language
    Deprecated.
    Language used for fallback values.
    static final String
    Deprecated.
    Key used for identifying language nodes
    static final Language
    Deprecated.
    Language used for language independent editor values.
    static final String
    Deprecated.
    Marker for unsupported editors
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deprecated.
    Add the given listener to become notified about changes.
    void
    assimilate(Language language, Object object)
    Deprecated.
    Assimilate the value object for the specified language, if possible.
    Note: Passing null as argument will be evaluated as clear!
    void
    beSet(Language language)
    Deprecated.
    Mark the current value for the given language to be set, i.e., isSet(Language) will evaluate to true and, if thecurrent value is null, isEmpty(Object) willevaluate to true, too.
    void
    Deprecated.
    Unset the value for all languages.
    void
    clear(Language language)
    Deprecated.
    Unset the value for the specified language, i.e.
    Deprecated.
    Finds references within this editor and returns them as a list.
    get(Language language)
    Deprecated.
    Get the value object in the specified language.
    Deprecated.
    Get the type of content handled by the editor.
    Deprecated.
    Get DataValue object this editor belongs to.
    Deprecated.
    Get the languages valid for the current editing operation, where the key is the language abbreviation and the value is the language object.
    Deprecated.
    Get the form definition.
    Deprecated.
    since 4.0.17 - use getForm() instead
    List<? extends Match>
    getMatches(Language language, Request request)
    Deprecated.
    Find matches for the given request.
    Deprecated.
    This method returns a string representation for search and indexing usage.
    Deprecated.
    Get the tag name associated with this editor.
    Deprecated.
    Get the type of value the editor takes.
    void
    initialize(UserService userService, DataValue parent, Element dataNode, GomFormElement formElement)
    Deprecated.
    Initialize this editor.
    boolean
    Deprecated.
    Indicates the value representing default data.
    boolean
    isEmpty(T object)
    Deprecated.
    Test the given object for being empty.
    boolean
    Deprecated.
    States, if this editor is language dependent.
    boolean
    Deprecated.
    Indicates that a value is set for at least one language.
    boolean
    isSet(Language language)
    Deprecated.
    Indicates that a value for the given language is set or is backed by a language independent value.
    boolean
    Deprecated.
    Indicates, whether the editor has a valid setting wrt. its GOM.
    void
    Deprecated.
    Remove the listener from being notified about changes.
    void
    set(Language language, T object)
    Deprecated.
    Set the value object for the specified language.
    void
    Deprecated.
    Set the tag name associated with this editor.
    void
    Deprecated.
    Set values of editor by dataXml element.
    Deprecated.
    Get an XML string representation of the editor's values.
    toXml(Language language)
    Deprecated.
    Get an XML string representation of the editor's value in the specified language.
    void
    validate(Language language, T value)
    Deprecated.
    Checks for the given value to be valid in the specified language wrt. the editor's GOM.
  • Field Details

    • SOLE_LANGUAGE

      static final Language SOLE_LANGUAGE
      Deprecated.
      Language used for language independent editor values.
      Since:
      4.0.17
    • FALLBACK_LANGUAGE

      static final Language FALLBACK_LANGUAGE
      Deprecated.
      Language used for fallback values.
      Since:
      4.0.17
    • LANG_KEY

      static final String LANG_KEY
      Deprecated.
      Key used for identifying language nodes
      Since:
      4.0.17
      See Also:
    • UNSUPPORTED

      static final String UNSUPPORTED
      Deprecated.
      Marker for unsupported editors
      Since:
      4.0.17
      See Also:
    • DEFAULT

      static final String DEFAULT
      Deprecated.
      Marker for default values
      Since:
      4.0.52
      See Also:
    • COPY_PRESET

      static final String COPY_PRESET
      Deprecated.
      Marker for preset copy mode
      Since:
      4.0.126
      See Also:
    • DELETE

      static final String DELETE
      Deprecated.
      Marker for delete values
      Since:
      4.0.135
      See Also:
  • Method Details

    • initialize

      void initialize(UserService userService, DataValue parent, Element dataNode, GomFormElement formElement)
      Deprecated.
      Initialize this editor.
      Parameters:
      userService - The userService to be used.
      parent - The parent DataValue object.
      dataNode - <CMS_VALUE name=...>...</CMS_VALUE>
      formElement - The form element defining the elements GUI.
      Since:
      4.0.17
    • setValueNode

      void setValueNode(Element dataXml)
      Deprecated.
      Set values of editor by dataXml element. This method may be called more than once.
      Parameters:
      dataXml - DataXML object containing values
      Since:
      3.0.121
    • toXml

      String toXml()
      Deprecated.
      Get an XML string representation of the editor's values.
      Returns:
      The XML string
      Since:
      2.3.17
    • toXml

      String toXml(Language language)
      Deprecated.
      Get an XML string representation of the editor's value in the specified language. The returned string will be valid XML, where the root node is a LANG node having the language abbreviation as id.
      Parameters:
      language - The language to create a representation for.
      Returns:
      The produced XML.
      Since:
      4.0.17
    • getGuiXml

      @Deprecated Element getGuiXml()
      Deprecated.
      since 4.0.17 - use getForm() instead
      Get the XML describing the GUI elements for the underlying editor.
      Returns:
      The GUI's XML
      Since:
      2.3.17
    • getValueType

      @NotNull Class<T> getValueType()
      Deprecated.
      Get the type of value the editor takes. The returned value must not be null and corresponds to the generic type T.
      Returns:
      The value's type.
      Since:
      4.0.17
    • getContentType

      Class<?> getContentType()
      Deprecated.
      Get the type of content handled by the editor. Returns the same as getValueType() for non-list-based value types and returnsthe element type for list-based value types.
      Returns:
      The value's content type.
      Since:
      4.0.17
    • setTagName

      void setTagName(String value)
      Deprecated.
      Set the tag name associated with this editor.
      Parameters:
      value - the tag name
      Since:
      4.0.17
    • getTagName

      String getTagName()
      Deprecated.
      Get the tag name associated with this editor.
      Returns:
      The editor's tag name.
      Since:
      4.0.17
    • getForm

      Deprecated.
      Get the form definition.
      Returns:
      The form definition.
      Since:
      4.0.17
    • isLanguageDependent

      boolean isLanguageDependent()
      Deprecated.
      States, if this editor is language dependent.
      Returns:
      true, if language dependent.
      Since:
      4.0.17
    • getEditorLanguages

      Map<String,Language> getEditorLanguages()
      Deprecated.
      Get the languages valid for the current editing operation, where the key is the language abbreviation and the value is the language object.
      Returns:
      A map of languages.
      Since:
      4.0.17
    • get

      @Nullable T get(Language language)
      Deprecated.
      Get the value object in the specified language. If the editor is not language dependent, the returned object always will be the same for any given language.
      Parameters:
      language - The language to look up.
      Returns:
      The language specific value object.
      Since:
      4.0.17
    • set

      void set(Language language, T object) throws InvalidValueException
      Deprecated.
      Set the value object for the specified language. If the editor is not language dependent, the language will be ignored.
      Parameters:
      language - The language to use.
      object - The object to store.
      Throws:
      InvalidValueException - If the given object is no valid value.
      Since:
      4.0.17
    • assimilate

      void assimilate(Language language, Object object) throws IllegalArgumentException, InvalidValueException
      Deprecated.
      Assimilate the value object for the specified language, if possible.
      Note: Passing null as argument will be evaluated as clear!
      Parameters:
      language - The language to assimilate for.
      object - The object to be assimilated.
      Throws:
      IllegalArgumentException - If the object cannot be assimilated.
      InvalidValueException - If the object's value is not valid.
      Since:
      4.0.17
    • isEmpty

      boolean isEmpty(T object)
      Deprecated.
      Test the given object for being empty.

      Default implementation checks for value being null.

      Parameters:
      object - The object to test.
      Returns:
      true, iff the value is treated as empty.
      Since:
      4.0.17
    • isSet

      boolean isSet()
      Deprecated.
      Indicates that a value is set for at least one language.
      Returns:
      true, if at least one language is set to a value.
      Since:
      4.0.120
    • isSet

      boolean isSet(Language language)
      Deprecated.
      Indicates that a value for the given language is set or is backed by a language independent value.
      Parameters:
      language - The language to look up.
      Returns:
      true, if a value is set or backed up.
      Since:
      4.0.17
    • beSet

      void beSet(Language language)
      Deprecated.
      Mark the current value for the given language to be set, i.e., isSet(Language) will evaluate to true and, if thecurrent value is null, isEmpty(Object) willevaluate to true, too.
      Parameters:
      language - The language to be marked as set.
      Since:
      4.0.17
    • clear

      void clear()
      Deprecated.
      Unset the value for all languages.
      Since:
      2.3.17
      See Also:
    • clear

      void clear(Language language)
      Deprecated.
      Unset the value for the specified language, i.e. isEmpty(Object)will evaluate to true on the current value and isSet(Language)will evaluate to false.
      Parameters:
      language - The language to reset values in.
      Since:
      3.0.78
    • getSearchableString

      String getSearchableString(Language language)
      Deprecated.
      This method returns a string representation for search and indexing usage.
      Parameters:
      language - The language to get a searchable string for.
      Returns:
      String representation of this editor.
      Since:
      3.1.158
    • findReferences

      @NotNull List<Reference> findReferences() throws RuntimeException
      Deprecated.
      Finds references within this editor and returns them as a list.

      Important:

      • References of default values will be ignored!
      • RuntimeException could be thrown in case of problematic/invalid references!
      Returns:
      A list of references.
      Throws:
      RuntimeException - in case of any problems with referenced elements.
      Since:
      4.0.17
    • getDataValue

      DataValue getDataValue()
      Deprecated.
      Get DataValue object this editor belongs to.
      Since:
      4.0.17
    • isDefault

      boolean isDefault()
      Deprecated.
      Indicates the value representing default data.
      Returns:
      true, if the value represents default data.
      Since:
      4.0.17
    • addEditorValueListener

      void addEditorValueListener(EditorValueListener listener)
      Deprecated.
      Add the given listener to become notified about changes.
      Parameters:
      listener - The listener to add.
      Since:
      4.0.17
    • removeEditorValueListener

      void removeEditorValueListener(EditorValueListener listener)
      Deprecated.
      Remove the listener from being notified about changes.
      Parameters:
      listener - The listener to be removed.
      Since:
      4.0.17
    • isValid

      boolean isValid()
      Deprecated.
      Indicates, whether the editor has a valid setting wrt. its GOM.
      Returns:
      true, iff valid.
      Since:
      3.1.358
    • validate

      void validate(Language language, @Nullable T value) throws InvalidValueException
      Deprecated.
      Checks for the given value to be valid in the specified language wrt. the editor's GOM.
      Parameters:
      language - The language to check for.
      value - The value to be checked.
      Throws:
      InvalidValueException - If the value is invalid.
      Since:
      4.0.17
    • getMatches

      @NotNull List<? extends Match> getMatches(Language language, Request request)
      Deprecated.
      Find matches for the given request.
      Parameters:
      language - The language to seach in.
      request - The request to find matches for.
      Returns:
      A list of editor specific match description objects.
      Since:
      4.0.17