
package de.ivu.elect.jee.presentation.dynamicform;

import java.util.Collection;
import java.util.function.Consumer;

import javax.faces.convert.Converter;
import javax.faces.validator.Validator;

public interface Property {

  PropertyType getType();

  void setType(PropertyType type);

  boolean isAccessableOnPageLoad();

  boolean hasValue();

  String getLabel();

  void setLabel(String label);

  String getTooltip();

  void setTooltip(String tooltip);

  String getStyleClass();

  void setStyleClass(String styleClass);

  boolean isRequired();

  void setRequired(boolean required);

  boolean isReadonly();

  void setReadonly(boolean readonly);

  boolean isVisibleOnPageLoad();

  void setVisibleOnPageLoad(boolean visible);

  boolean isVisible();

  void setVisible(boolean visible);

  Collection<Property> getObservingProperties();

  Collection<Property> getObservedProperties();

  @Deprecated // nicht überschreiben => appendObservedPropertyValueChangedConsumer() verwenden
  void onObservedPropertyValueChanged(Property observedProperty);

  void appendObservedPropertyValueChangedConsumer(Consumer<Property> observedPropertyConsumer);

  Collection<Validator> getValidators();

  Converter getConverter();

  void setConverter(Converter converter);

}
