Package de.xima.fc.inbox.model.lazydata
Class LazyGridListProcessModel
- java.lang.Object
-
- javax.faces.model.DataModel<E>
-
- javax.faces.model.ListDataModel<T>
-
- org.primefaces.model.LazyDataModel<IFormRecordWrapper>
-
- de.xima.fc.inbox.model.lazydata.ALazyListProcessModel
-
- de.xima.fc.inbox.model.lazydata.LazyGridListProcessModel
-
- All Implemented Interfaces:
ILazyProcessModel,Serializable,Iterable<IFormRecordWrapper>,org.primefaces.model.SelectableDataModel<IFormRecordWrapper>
public class LazyGridListProcessModel extends ALazyListProcessModel
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringACCESSstatic StringCREATED_FROM_INSTANTstatic StringCREATED_TO_INSTANTstatic StringCREATORstatic StringEDITED_FROM_INSTANTstatic StringEDITED_TO_INSTANTstatic StringEDITORstatic StringGLOBAL-
Fields inherited from class de.xima.fc.inbox.model.lazydata.ALazyListProcessModel
currentFilters, currentlyLoaded, currentSorts, customFilters, selected
-
-
Constructor Summary
Constructors Constructor Description LazyGridListProcessModel(boolean excludeLockedRecords, Mandant client, Projekt project, Locale locale, Postfach... inboxes)LazyGridListProcessModel(boolean excludeLockedRecords, Mandant client, Locale locale, Postfach... inboxes)
-
Method Summary
All Methods Instance Methods Concrete Methods Default Methods Modifier and Type Method Description intcount(Map<String,org.primefaces.model.FilterMeta> filters)de.xima.cmn.criteria.FilterCriteriongetAccessFilter(IUser user)de.xima.cmn.criteria.QueryCriteriaManagergetAllQcm(Map<String,org.primefaces.model.SortMeta> sortBy, Map<String,org.primefaces.model.FilterMeta> filterBy)de.xima.cmn.criteria.FilterCriteriongetCreatedFromFilter(Instant instant)de.xima.cmn.criteria.FilterCriteriongetCreatedToFilter(Instant instant)de.xima.cmn.criteria.FilterCriteriongetCreatorFilter(IUser user)de.xima.cmn.criteria.FilterCriteriongetEditedFromFilter(Instant instant)de.xima.cmn.criteria.FilterCriteriongetEditedToFilter(Instant instant)de.xima.cmn.criteria.FilterCriteriongetEditorFilter(IUser user)de.xima.cmn.criteria.FilterCriteriongetFilter(EInboxFilterTag filterTag)Map<String,de.xima.cmn.criteria.FilterCriterion>getFilters()de.xima.cmn.criteria.FilterCriteriongetGlobalSearchFilterCriterion(EFormRecordQueryType type, String query)de.xima.cmn.criteria.FilterCriteriongetReadMessagesFilter(IUser user, boolean isRead)IFormRecordWrappergetRowData(String rowKey)List<IFormRecordWrapper>load(int first, int pageSize, Map<String,org.primefaces.model.SortMeta> sortBy, Map<String,org.primefaces.model.FilterMeta> filterBy)voidputFilterTag(EInboxFilterTag filterTag)Puts the given filter tag.default voidputGlobalSearchFilter(EFormRecordQueryType type, String query)Puts a global search filter for the given type with the given query.voidremoveFilterTag(EInboxFilterTag filterTag)Removes the specified filter tag.default voidsetAccessFilter(IUser user)Puts a filter where the given user has access to the form record.voidsetAppointmentTemplates(List<AppointmentTemplate> appointmentTemplates)Currently not implemented.voidsetAvailableAppointmentTemplates(List<AppointmentTemplateItem> availableAppointmentTemplates)Currently not implemented.default voidsetCreatedFromFilter(Instant instant)Sets a date filter from which the form records have been created.default voidsetCreatedToFilter(Instant instant)Sets a date filter until which the form records have been created.default voidsetCreatorFilter(IUser user)Puts a filter where the given user is the first submitter (creator) of the form record.default voidsetEditedFromFilter(Instant instant)Sets a date filter from which the form records have been last edited.default voidsetEditedToFilter(Instant instant)Sets a date filter until which the form records have been last edited.default voidsetEditorFilter(IUser user)Puts a filter where the given user is an editor of the form record, meaning they have submitted the form record.voidsetInboxes(Postfach[] inboxes)voidsetInboxes(List<Postfach> inboxes)default voidsetReadMessagesFilter(IUser user)Puts a filter where the given user has read messages in the form record.voidsetSorting(de.xima.cmn.criteria.SortingCriterion sortingCriterion)Currently not implemented.voidsetSortingListener(Consumer<SortingAppliedEvent> sortingListener)Allows to set a listener for 'sorting' events.default voidsetUnreadMessagesFilter(IUser user)Puts a filter where the given user has unread messages in the form record.voidupdateFilter(String filterKey, de.xima.cmn.criteria.FilterCriterion filter)org.apache.commons.lang3.tuple.Pair<List<IFormRecordWrapper>,Set<Long>>updateLoadedModelItems(Set<Long> recordIds)IFormRecordWrapperupdateOpenedModelItem(Long recordId)-
Methods inherited from class de.xima.fc.inbox.model.lazydata.ALazyListProcessModel
getCurrentlyLoadedRowKeys, getRowKey, updateUnreadChatsCounts
-
Methods inherited from class org.primefaces.model.LazyDataModel
getConverter, getMessage, getPageSize, getRowCount, getRowData, getRowData, getRowIndex, getWrappedData, isRowAvailable, iterator, iterator, recalculateFirst, setConverter, setPageSize, setRowCount, setRowIndex, setWrappedData
-
Methods inherited from class javax.faces.model.DataModel
addDataModelListener, getDataModelListeners, removeDataModelListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.xima.fc.inbox.interfaces.lazydata.ILazyProcessModel
getRowCount
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
GLOBAL
public static final String GLOBAL
- See Also:
- Constant Field Values
-
CREATOR
public static final String CREATOR
- See Also:
- Constant Field Values
-
ACCESS
public static final String ACCESS
- See Also:
- Constant Field Values
-
EDITOR
public static final String EDITOR
- See Also:
- Constant Field Values
-
CREATED_FROM_INSTANT
public static final String CREATED_FROM_INSTANT
- See Also:
- Constant Field Values
-
CREATED_TO_INSTANT
public static final String CREATED_TO_INSTANT
- See Also:
- Constant Field Values
-
EDITED_FROM_INSTANT
public static final String EDITED_FROM_INSTANT
- See Also:
- Constant Field Values
-
EDITED_TO_INSTANT
public static final String EDITED_TO_INSTANT
- See Also:
- Constant Field Values
-
-
Method Detail
-
setSortingListener
public void setSortingListener(Consumer<SortingAppliedEvent> sortingListener)
Allows to set a listener for 'sorting' events.- Parameters:
sortingListener- the event consumer- Throws:
NullPointerException- if the passed listener isnull
-
setInboxes
public void setInboxes(Postfach[] inboxes)
-
setSorting
public void setSorting(de.xima.cmn.criteria.SortingCriterion sortingCriterion)
Currently not implemented.
-
setAppointmentTemplates
public void setAppointmentTemplates(List<AppointmentTemplate> appointmentTemplates)
Currently not implemented.
-
setAvailableAppointmentTemplates
public void setAvailableAppointmentTemplates(List<AppointmentTemplateItem> availableAppointmentTemplates)
Currently not implemented.
-
count
public int count(Map<String,org.primefaces.model.FilterMeta> filters)
- Specified by:
countin classorg.primefaces.model.LazyDataModel<IFormRecordWrapper>
-
load
public List<IFormRecordWrapper> load(int first, int pageSize, Map<String,org.primefaces.model.SortMeta> sortBy, Map<String,org.primefaces.model.FilterMeta> filterBy)
- Specified by:
loadin classorg.primefaces.model.LazyDataModel<IFormRecordWrapper>
-
updateOpenedModelItem
public IFormRecordWrapper updateOpenedModelItem(Long recordId)
-
updateLoadedModelItems
public org.apache.commons.lang3.tuple.Pair<List<IFormRecordWrapper>,Set<Long>> updateLoadedModelItems(Set<Long> recordIds)
-
getRowData
public IFormRecordWrapper getRowData(String rowKey)
- Specified by:
getRowDatain interfaceorg.primefaces.model.SelectableDataModel<IFormRecordWrapper>- Overrides:
getRowDatain classorg.primefaces.model.LazyDataModel<IFormRecordWrapper>
-
getAllQcm
public de.xima.cmn.criteria.QueryCriteriaManager getAllQcm(Map<String,org.primefaces.model.SortMeta> sortBy, Map<String,org.primefaces.model.FilterMeta> filterBy)
-
updateFilter
public void updateFilter(String filterKey, de.xima.cmn.criteria.FilterCriterion filter)
-
removeFilterTag
public void removeFilterTag(EInboxFilterTag filterTag)
Description copied from interface:ILazyProcessModelRemoves the specified filter tag.- Parameters:
filterTag- the filter tag to be removed.
-
putFilterTag
public void putFilterTag(EInboxFilterTag filterTag)
Description copied from interface:ILazyProcessModelPuts the given filter tag.- Parameters:
filterTag- the filter tag to be set.
-
getFilters
public Map<String,de.xima.cmn.criteria.FilterCriterion> getFilters()
- Specified by:
getFiltersin interfaceILazyProcessModel- Overrides:
getFiltersin classALazyListProcessModel
-
getCreatedFromFilter
public de.xima.cmn.criteria.FilterCriterion getCreatedFromFilter(Instant instant)
-
getCreatedToFilter
public de.xima.cmn.criteria.FilterCriterion getCreatedToFilter(Instant instant)
-
getCreatorFilter
public de.xima.cmn.criteria.FilterCriterion getCreatorFilter(IUser user)
-
getReadMessagesFilter
public de.xima.cmn.criteria.FilterCriterion getReadMessagesFilter(IUser user, boolean isRead)
-
getEditedFromFilter
public de.xima.cmn.criteria.FilterCriterion getEditedFromFilter(Instant instant)
-
getEditedToFilter
public de.xima.cmn.criteria.FilterCriterion getEditedToFilter(Instant instant)
-
getEditorFilter
public de.xima.cmn.criteria.FilterCriterion getEditorFilter(IUser user)
-
getAccessFilter
public de.xima.cmn.criteria.FilterCriterion getAccessFilter(IUser user)
-
getFilter
public de.xima.cmn.criteria.FilterCriterion getFilter(EInboxFilterTag filterTag)
-
getGlobalSearchFilterCriterion
public de.xima.cmn.criteria.FilterCriterion getGlobalSearchFilterCriterion(EFormRecordQueryType type, String query)
-
putGlobalSearchFilter
public default void putGlobalSearchFilter(EFormRecordQueryType type, String query)
Description copied from interface:ILazyProcessModelPuts a global search filter for the given type with the given query. If the query isnullthe filter will be removed.- Specified by:
putGlobalSearchFilterin interfaceILazyProcessModel- Parameters:
type- the type of the filter determines the form record field to be searched.query- the query string to be set. Ifnullthe filter will be removed.
-
setCreatorFilter
public default void setCreatorFilter(IUser user)
Description copied from interface:ILazyProcessModelPuts a filter where the given user is the first submitter (creator) of the form record.- Specified by:
setCreatorFilterin interfaceILazyProcessModel- Parameters:
user- first submitter (creator). Ifnullthe creator filter will be removed if it was set.
-
setAccessFilter
public default void setAccessFilter(IUser user)
Description copied from interface:ILazyProcessModelPuts a filter where the given user has access to the form record.- Specified by:
setAccessFilterin interfaceILazyProcessModel- Parameters:
user- user to test access for. Ifnullthe access filter will be removed if it was set.
-
setEditorFilter
public default void setEditorFilter(IUser user)
Description copied from interface:ILazyProcessModelPuts a filter where the given user is an editor of the form record, meaning they have submitted the form record.- Specified by:
setEditorFilterin interfaceILazyProcessModel- Parameters:
user- editor. Ifnullthe editor filter will be removed if it was set.
-
setCreatedFromFilter
public default void setCreatedFromFilter(Instant instant)
Description copied from interface:ILazyProcessModelSets a date filter from which the form records have been created.- Specified by:
setCreatedFromFilterin interfaceILazyProcessModel- Parameters:
instant- from which the form records have been created.nullremoves the filter.
-
setCreatedToFilter
public default void setCreatedToFilter(Instant instant)
Description copied from interface:ILazyProcessModelSets a date filter until which the form records have been created.- Specified by:
setCreatedToFilterin interfaceILazyProcessModel- Parameters:
instant- until which the form records have been created.nullremoves the filter.
-
setEditedFromFilter
public default void setEditedFromFilter(Instant instant)
Description copied from interface:ILazyProcessModelSets a date filter from which the form records have been last edited.- Specified by:
setEditedFromFilterin interfaceILazyProcessModel- Parameters:
instant- from which the form records have been last edited.nullremoves the filter.
-
setEditedToFilter
public default void setEditedToFilter(Instant instant)
Description copied from interface:ILazyProcessModelSets a date filter until which the form records have been last edited.- Specified by:
setEditedToFilterin interfaceILazyProcessModel- Parameters:
instant- until which the form records have been last edited.nullremoves the filter.
-
setUnreadMessagesFilter
public default void setUnreadMessagesFilter(IUser user)
Description copied from interface:ILazyProcessModelPuts a filter where the given user has unread messages in the form record.- Specified by:
setUnreadMessagesFilterin interfaceILazyProcessModel- Parameters:
user- user with unread messages. Ifnullthe unread messages filter will be removed if it was set.
-
setReadMessagesFilter
public default void setReadMessagesFilter(IUser user)
Description copied from interface:ILazyProcessModelPuts a filter where the given user has read messages in the form record.- Specified by:
setReadMessagesFilterin interfaceILazyProcessModel- Parameters:
user- user with read messages. Ifnullthe read messages filter will be removed if it was set.
-
-