Class AbstractDataComponent<CC extends Component>

All Implemented Interfaces:
Component, LabeledComponent, DataComponent
Direct Known Subclasses:
AbstractDocumentField, AmountFieldImpl, BirthDateFieldImpl, CheckboxImpl, CodeFieldImpl, ComboBoxImpl, CreatePasswordFieldImpl, CustomDataFieldImpl, DateFieldImpl, DatetimeFieldImpl, DefaultIteratorComponent, DefaultTable, DisplayExpressionFieldImpl, DisplayFieldImpl, DurationFieldImpl, FieldImpl, HtmlFieldImpl, ImageFieldImpl, LatitudeFieldImpl, LongitudeFieldImpl, MultiSelectBoxImpl, NumberFieldImpl, PathFieldImpl, PositionSearchFieldImpl, PulldownDateFieldImpl, RangeFieldImpl, RemoteFieldImpl, SimpleForm, SingleSelectBoxImpl, TextAreaImpl, TextFieldImpl, TimeFieldImpl

@Deprecated public abstract class AbstractDataComponent<CC extends Component> extends AbstractLabeledComponent<CC> implements DataComponent
Deprecated.
  • Constructor Details

    • AbstractDataComponent

      protected AbstractDataComponent(boolean acceptChildren, @Nullable @Nullable Component parent)
      Deprecated.
      T
      Parameters:
      acceptChildren - set this explicit in your constructor. If true, the implementation will accept children, (For exaple an group-component), otherwise not (For example a textfield-component).
      parent - The parent of this component, null if none.
  • Method Details

    • getDataNavigationType

      public Component.DataNavigationType getDataNavigationType()
      Deprecated.
      Description copied from class: AbstractLabeledComponent
      Subclasses must override this if they don't want to inherit the NONE value.
      Specified by:
      getDataNavigationType in interface Component
      Overrides:
      getDataNavigationType in class AbstractLabeledComponent<CC extends Component>
      Returns:
      Tells what kind of component it is in relation to data.
    • mapAllAttributesTo

      protected void mapAllAttributesTo(Component comp)
      Deprecated.
      Description copied from class: AbstractComponent
      Copies the attributes of this component into the passed component.

      This is used to copy the attributes collected by the xml reading process from "general" field tags into datatype-specific customized fields (mapped by FieldComponentConverter). And also for copying instances, kind of like cloning.

      Override this in your subclasses. Also, subclasses are required to let their anchestors do their work using super.copyOtherFields(cpy).

      Overrides:
      mapAllAttributesTo in class AbstractLabeledComponent<CC extends Component>
      Parameters:
      comp - The new field into which everything needs to be copied.
    • getPath

      public DataPath getPath()
      Deprecated.
      Specified by:
      getPath in interface DataComponent
    • setPath

      public void setPath(DataPath dataPath)
      Deprecated.
      Specified by:
      setPath in interface DataComponent
      Parameters:
      dataPath - For example the entity field name.
    • getDataType

      @Nullable public @Nullable String getDataType()
      Deprecated.
      Specified by:
      getDataType in interface DataComponent
      Returns:
      The 'datatype' attribute. This can be hardcoded in xml (nulldatasource) or come from the entity field in the entity system, or be null.
    • setDataType

      public void setDataType(String dataType)
      Deprecated.
      Specified by:
      setDataType in interface DataComponent
    • getReverseRelationName

      @Nullable public @Nullable String getReverseRelationName()
      Deprecated.
      Description copied from interface: DataComponent
      Returns the reverse relation as String if the data type is an entity. Otherwise NULL will be returned.
      Specified by:
      getReverseRelationName in interface DataComponent
    • setReverseRelationName

      public void setReverseRelationName(String reverseRelationName)
      Deprecated.
      Specified by:
      setReverseRelationName in interface DataComponent
    • hasNonEmptyValidator

      public boolean hasNonEmptyValidator()
      Deprecated.
      Specified by:
      hasNonEmptyValidator in interface DataComponent
      Returns:
      Tells if this data component has a validator, a GroupValidator to be precise, which has at least one entry.
      See Also:
    • getValidator

      public GroupValidator getValidator()
      Deprecated.
      Specified by:
      getValidator in interface DataComponent
      Returns:
      The outermost group validator which may contain children, or null if none.
      See Also:
    • setValidator

      public void setValidator(AndGroupValidator validator)
      Deprecated.
      Specified by:
      setValidator in interface DataComponent
    • getDefaultValue

      @Nullable public @Nullable DefaultValueDescriptor getDefaultValue()
      Deprecated.
      Specified by:
      getDefaultValue in interface DataComponent
      Returns:
      the default value for this form component as specified in the form xml.
    • setDefaultValue

      public void setDefaultValue(DefaultValueDescriptor value)
      Deprecated.
      Description copied from interface: DataComponent
      Sets the default value for this form component.
      Specified by:
      setDefaultValue in interface DataComponent
    • setLocalizedLanguage

      public void setLocalizedLanguage(String language)
      Deprecated.
      Description copied from interface: DataComponent
      This is called from within the merge process.
      Specified by:
      setLocalizedLanguage in interface DataComponent
    • isLocalized

      public boolean isLocalized()
      Deprecated.
      Description copied from interface: DataComponent
      Tells if this field is multilingual. If it is then this field model most likely has siblings; for every system language there is such a field model for the same field.
      Specified by:
      isLocalized in interface DataComponent
    • getLocalizedLanguage

      @Nullable public @Nullable String getLocalizedLanguage()
      Deprecated.
      Description copied from interface: DataComponent
      Returns the language for which this field is if it is localized, null if not.
      Specified by:
      getLocalizedLanguage in interface DataComponent
      Returns:
      2-letter iso code in lower case eg 'fr', or null if not localized.
    • getDefaultDataType

      public String getDefaultDataType()
      Deprecated.
      Description copied from interface: DataComponent
      Returns the default data type to use for this data component.

      For example a text-field uses the "string" while the email-field uses the virtual type "email".

      Specified by:
      getDefaultDataType in interface DataComponent
      Returns:
      The name of the nice2 data type.
    • getConstriction

      @Nullable public @Nullable String getConstriction()
      Deprecated.
      Specified by:
      getConstriction in interface DataComponent
    • setConstriction

      public void setConstriction(@Nullable @Nullable String constriction)
      Deprecated.
      Specified by:
      setConstriction in interface DataComponent
    • setDefaultLangOnly

      public void setDefaultLangOnly(boolean defaultLangOnly)
      Deprecated.
      Specified by:
      setDefaultLangOnly in interface DataComponent
    • isDefaultLangOnly

      public boolean isDefaultLangOnly()
      Deprecated.
      Specified by:
      isDefaultLangOnly in interface DataComponent
    • setIgnoreCopy

      public void setIgnoreCopy(boolean ignoreCopy)
      Deprecated.
      Specified by:
      setIgnoreCopy in interface DataComponent
    • isIgnoreCopy

      public boolean isIgnoreCopy()
      Deprecated.
      Specified by:
      isIgnoreCopy in interface DataComponent