Class DefaultReferenceSelectorModel

All Implemented Interfaces:
ReferenceSelectorModel, SelectorModel
Direct Known Subclasses:
DefaultMediaReferenceSelectorModel

public class DefaultReferenceSelectorModel extends AbstractReferenceSelectorModel
Represents default model for reference selector component
  • Field Details

  • Constructor Details

    • DefaultReferenceSelectorModel

      public DefaultReferenceSelectorModel()
    • DefaultReferenceSelectorModel

      public DefaultReferenceSelectorModel(ObjectType rootType)
  • Method Details

    • setItems

      public void setItems(List<Object> items)
    • setMode

      public void setMode(SelectorModel.Mode mode)
    • setAutoCompleteResult

      public void setAutoCompleteResult(List<? extends Object> autoCompleteResult)
    • setTemporaryItems

      public void setTemporaryItems(List<Object> temporaryItems)
    • setSearchResult

      public void setSearchResult(List<? extends Object> searchResult)
    • setMinAutoCompleteTextLength

      public void setMinAutoCompleteTextLength(int minAutoCompleteTextLength)
    • setMaxAutoCompleteResultSize

      public void setMaxAutoCompleteResultSize(int maxAutoCompleteResultSize)
    • setPageSize

      public void setPageSize(int pageSize)
    • getPageSize

      public int getPageSize()
    • getAutoCompleteResult

      public List<? extends Object> getAutoCompleteResult()
    • getItems

      @Deprecated public List<Object> getItems()
      Deprecated.
      since 6.3, use getValue() instead
      Returns the items held by this selector model.
      Returns:
      the items
    • getValue

      public Object getValue()
    • getTemporaryItems

      public List<Object> getTemporaryItems()
    • getMinAutoCompleteTextLength

      public int getMinAutoCompleteTextLength()
    • getMaxAutoCompleteResultSize

      public int getMaxAutoCompleteResultSize()
    • getMode

      public SelectorModel.Mode getMode()
    • getAutocompleteSearchType

      public ObjectType getAutocompleteSearchType()
    • getLabel

      public String getLabel()
    • getSearchResult

      public List<? extends Object> getSearchResult()
    • isMultiple

      public boolean isMultiple()
    • setMultiple

      public void setMultiple(boolean multiple)
    • addItem

      public boolean addItem(Object item)
    • addItemNotConfirmed

      public boolean addItemNotConfirmed(Object itemNotConfirmed)
    • selectTemporaryItem

      public boolean selectTemporaryItem(Object item)
    • selectItem

      public boolean selectItem(Object item)
    • deselectItem

      public boolean deselectItem(Object item)
    • deselectTemporaryItem

      public boolean deselectTemporaryItem(Object item)
    • deselectTemporaryItems

      public boolean deselectTemporaryItems()
    • addItems

      public boolean addItems(List collection)
    • selectTemporaryItems

      public boolean selectTemporaryItems(Collection collection)
    • selectItems

      public boolean selectItems(Collection items)
    • addItemsNotConfirmed

      public boolean addItemsNotConfirmed(Collection items)
    • removeItem

      public boolean removeItem(int index)
    • removeItemNotConfirmed

      public boolean removeItemNotConfirmed(int index)
    • moveItem

      public boolean moveItem(int fromIndex, int toIndex)
    • moveTemporaryItem

      public boolean moveTemporaryItem(int fromIndex, int toIndex)
    • removeItems

      public boolean removeItems(Collection indexes)
    • clearItems

      public void clearItems()
    • setItem

      public boolean setItem(int index, Object item)
    • addTemporaryItem

      public boolean addTemporaryItem(Object item)
    • addTemporaryItems

      public boolean addTemporaryItems(Collection items)
    • removeTemporaryItem

      public boolean removeTemporaryItem(Object item)
    • removeTemporaryItem

      public boolean removeTemporaryItem(int index)
    • clearTemporaryItems

      public void clearTemporaryItems()
    • getTotalSize

      public int getTotalSize()
      Returns:
      the totalSize
    • setTotalSize

      public void setTotalSize(int totalSize)
      Parameters:
      totalSize - the totalSize to set
    • reset

      public void reset()
    • cancel

      public void cancel()
    • getItemLabel

      public String getItemLabel(Object item)
    • getRootType

      public ObjectType getRootType()
      Description copied from interface: ReferenceSelectorModel
      Returns the root type of this reference collection editor i.e. the type of the items which this editor should hold references to.

      Note: If the root search type differs from the root type, this editor will actually hold items of the type returned by ReferenceSelectorModel.getRootSearchType(). In this case information about the root type is generally needed for value handling.

      Returns:
      the root type of this editor
      See Also:
    • getTypeService

      public TypeService getTypeService()
    • getSearchProvider

      protected SearchProvider getSearchProvider()
    • setRootType

      public void setRootType(ObjectType rootType)
      Sets the root type of this reference selector i.e. the type of the items which this editor holds references to.

      Note: Unless search type has been set explicitly, getRootSearchType() will return the same type as getRootType().

      Parameters:
      rootType - reference type
      See Also:
    • getRootSearchType

      public ObjectType getRootSearchType()
      Description copied from interface: ReferenceSelectorModel
      Returns the type for which this reference collection editor should search for.

      Generally, if no root search type has been explicitly set, this method returns the same type as ReferenceSelectorModel.getRootType().

      Note: The root search type is actually the type of the items held by this editor, whereas root type is the type which should be used for persisting values.
      Returns:
      the type for which this reference collection editor should search for
      See Also:
    • setRootSearchType

      public void setRootSearchType(ObjectType rootSearchType)
      Sets the type for which this reference selector should search for. If rootSearchType is null getRootSearchType() will return the same type as getRootType().
      Parameters:
      rootSearchType - the type of the items to search for
      See Also:
    • setAutocompleteSearchType

      public void setAutocompleteSearchType(ObjectType autocompletionSearchType)
    • getNotConfirmedItems

      public List getNotConfirmedItems()
    • getActualSelectedTempItems

      public List<Object> getActualSelectedTempItems()
    • getActualSelectedItems

      public List<Object> getActualSelectedItems()
    • saveItems

      public void saveItems()
    • getListViewConfiguration

      protected ListViewConfiguration getListViewConfiguration(ObjectTemplate objectTemplate, String code)
    • getAdvancedSearchConfiguration

      protected AdvancedSearchConfiguration getAdvancedSearchConfiguration(ObjectTemplate objectTemplate, String code)
    • getUIConfigurationService

      protected UIConfigurationService getUIConfigurationService()
    • getLoginService

      protected LoginService getLoginService()
    • initAdvanceModeModels

      public void initAdvanceModeModels()
    • doSearch

      public void doSearch(ObjectTemplate objectType, AdvancedSearchParameterContainer parameterContainer, int currentPage)
    • createSearchParameterValues

      protected void createSearchParameterValues(AdvancedSearchParameterContainer parameterContainer, List<SearchParameterValue> paramValues, List<List<SearchParameterValue>> orValues)
    • createAdvancedTableModel

      public DefaultAdvancedSearchModel createAdvancedTableModel()
    • createDefaultTableModel

      public MutableTableModel createDefaultTableModel()
    • getColumnModelListener

      protected ColumnModelListener getColumnModelListener()
    • storeListViewConfiguration

      protected void storeListViewConfiguration()
    • setParameters

      public void setParameters(Map<String,? extends Object> parameters)
    • getParameters

      public Map<String,? extends Object> getParameters()
    • getTableModel

      public MutableTableModel getTableModel()
    • getAdvancedSearchModel

      public AdvancedSearchModel getAdvancedSearchModel()