Class FieldsMeta<T extends org.cxbox.api.data.dto.DataResponseDTO>

java.lang.Object
org.cxbox.api.data.dto.rowmeta.FieldsDTO
org.cxbox.core.dto.rowmeta.RowDependentFieldsMeta<T>
org.cxbox.core.dto.rowmeta.FieldsMeta<T>
All Implemented Interfaces:
Iterable<org.cxbox.api.data.dto.rowmeta.FieldDTO>
Direct Known Subclasses:
EngineFieldsMeta

public class FieldsMeta<T extends org.cxbox.api.data.dto.DataResponseDTO> extends RowDependentFieldsMeta<T>
  • Constructor Details

    • FieldsMeta

      public FieldsMeta(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
  • Method Details

    • addConcreteFilterValue

      public final void addConcreteFilterValue(DtoField<? super T,?> field, org.cxbox.api.data.dictionary.SimpleDictionary dictDTO)
      Adds a value to the existing list of filterable values
      Parameters:
      field - widget field with type dictionary
      dictDTO - DTO with dictionary value
    • enableFilter

      @SafeVarargs public final void enableFilter(DtoField<? super T,?>... fields)
    • setAllFilterValuesByLovType

      public final void setAllFilterValuesByLovType(DtoField<? super T,?> field, org.cxbox.api.data.dictionary.IDictionaryType type)
      Parameters:
      field - dto field
      type - dictionary type


      Field filter drop-downs (on List widgets header and so on) values sorted by display_order, then by key. display_order can be null

      See dicts.sort and LinkedHashMap lines in DictionaryCacheImpl.Cache.load()


      Attention - sorting rows in List widgets always ignores display_order and is done by lov.key lexicographically!

    • setAllFilterValuesByLovType

      public final void setAllFilterValuesByLovType(DtoField<?,?> field, @NonNull @NonNull org.cxbox.api.data.dictionary.IDictionaryType type, @NonNull @NonNull Comparator<org.cxbox.api.data.dictionary.SimpleDictionary> comparator)
      Parameters:
      field - dto field
      type - dictionary type
      comparator - filter drop-downs will show values sorted by this comparator

      Attention - sorting rows in List widgets always ignores display_order and is done by lov.key lexicographically!

    • setConcreteFilterValues

      public final void setConcreteFilterValues(DtoField<? super T,?> field, Collection<org.cxbox.api.data.dictionary.SimpleDictionary> dictDtoList)
    • setEnumFilterValues

      public <T extends org.cxbox.api.data.dto.DataResponseDTO, E extends Enum> void setEnumFilterValues(@NonNull @NonNull FieldsMeta<T> fieldsMeta, @Nullable DtoField<? super T,E> field, @NonNull @NonNull E... values)
    • setForceActive

      @SafeVarargs public final void setForceActive(DtoField<? super T,?>... fields)
    • setEphemeral

      @SafeVarargs public final void setEphemeral(DtoField<? super T,?>... fields)
    • setHidden

      @SafeVarargs public final void setHidden(DtoField<? super T,?>... fields)
    • setFilterValuesWithIcons

      public final void setFilterValuesWithIcons(DtoField<? super T,?> field, org.cxbox.api.data.dictionary.IDictionaryType type, Map<org.cxbox.api.data.dictionary.LOV,org.cxbox.api.data.dto.rowmeta.IconCode> valueIconMap)
    • setFileAccept

      public final void setFileAccept(DtoField<? super T,?> field, @NonNull @NonNull List<String> accept)