Class FormRecordChatHandler
java.lang.Object
de.xima.fc.handler.AMSApiHandler
de.xima.fc.handler.entity.GenericHandler
de.xima.fc.handler.entity.FormRecordChatHandler
- All Implemented Interfaces:
IAPIHandler, IFormRecordChatHandler, IGenericHandler, Serializable
Handler implementation for reading and writing
FormRecordChat entities.- Since:
- 8.2.0
- Author:
- XIMA Media GmbH
- See Also:
-
Field Summary
Fields inherited from class GenericHandler
LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAllByRecord(UserContext uc, String recordUuid) Finds all chats for the form record given by its UUID.getByRecordAndUser(UserContext uc, UUID recordUuid, IUser user, int page, int pageSize, Locale locale) Finds the chats for the form record given by its UUID if the given user can access the chat.getByUser(UserContext uc, IUser user) Finds all form record chats the given userhas access to.getByUser(UserContext uc, IUser user, int page, int pageSize, int offset) Finds all form record chats the given user has access to via the public REST API.getByUuid(UserContext uc, UUID uuid) Finds the chat for the given UUID.getByUuidAndUser(UserContext uc, UUID uuid, IUser user) Finds the chat for the given UUID if the given user can access the chat.getDetailsByUuidAndUser(UserContext uc, UUID uuid, IUser user, Locale locale) Finds the chat for the given UUID if the given user can access the chat.getFormRecordChatsPage(UserContext uc, PageQuery page, FormRecordChatsQuery query, boolean skipCount) Finds all form record chats that match the given query.voidmarkReadByEndUser(UserContext uc, UUID chatUuid, IUser user) Marks the chat as read for the given end user.voidmarkReadByInboxUser(UserContext uc, UUID chatUuid, IUser user) Marks the chat as read for the given inbox user.Methods inherited from class GenericHandler
create, create, delete, delete, deleteBy, deleteById, deleteById, getAll, getAllBy, getAttributes, getAttributes, getBy, getById, getById, getById, getEntityRefs, getSingleAttributes, getSingleAttributes, resultTotalCount, serializableList, update, updateMethods inherited from class AMSApiHandler
getNameMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IAPIHandler
getNameMethods inherited from interface IGenericHandler
create, create, delete, delete, deleteBy, deleteById, deleteById, getAll, getAllBy, getAttributes, getAttributes, getBy, getById, getById, getById, getEntityRefs, getSingleAttributes, getSingleAttributes, resultTotalCount, update, update
-
Constructor Details
-
FormRecordChatHandler
public FormRecordChatHandler()
-
-
Method Details
-
getByUuid
Description copied from interface:IFormRecordChatHandlerFinds the chat for the given UUID.- Specified by:
getByUuidin interfaceIFormRecordChatHandler- Parameters:
uc- user context for accessing the databaseuuid- the UUID of the chat- Returns:
- The chat with the given UUID
-
getByUuidAndUser
Description copied from interface:IFormRecordChatHandlerFinds the chat for the given UUID if the given user can access the chat.- Specified by:
getByUuidAndUserin interfaceIFormRecordChatHandler- Parameters:
uc- user context for database transactions.uuid- the UUID of the chatuser- user to get the chat for.- Returns:
- The chat with the given UUID if it exists and the user can access it.
nullotherwise. - See Also:
-
getDetailsByUuidAndUser
public DetailedFormRecordChatDTO getDetailsByUuidAndUser(UserContext uc, UUID uuid, IUser user, Locale locale) Description copied from interface:IFormRecordChatHandlerFinds the chat for the given UUID if the given user can access the chat.- Specified by:
getDetailsByUuidAndUserin interfaceIFormRecordChatHandler- Parameters:
uc- user context for database transactions.uuid- the UUID of the chatuser- user to get the chat for.locale- the locale to use for the DTO.- Returns:
- The chat with the given UUID if it exists and the user can access it.
nullotherwise. - See Also:
-
getByUser
Description copied from interface:IFormRecordChatHandlerFinds all form record chats the given userhas access to.- Specified by:
getByUserin interfaceIFormRecordChatHandler- Parameters:
uc- user context for database transactions.user- user to get the chats for.- Returns:
- a list of the user's form record chats ordered by their creation instant (desc).
- See Also:
-
getByUser
public PagedResult<FormRecordChat> getByUser(UserContext uc, IUser user, int page, int pageSize, int offset) Description copied from interface:IFormRecordChatHandlerFinds all form record chats the given user has access to via the public REST API.- Specified by:
getByUserin interfaceIFormRecordChatHandler- Parameters:
uc- user context for database transactions.user- user to get the chats for.page- to get. Identifies the page by page number. The first page number is 1.pageSize- size of the page to get.offset- The number of form record chats to skip before starting to collect the result. The offset starts at the beginning of the page given by the page number parameter.- Returns:
- a list of the user's form record chats ordered by their creation instant (desc).
- See Also:
-
getFormRecordChatsPage
public PagedResult<BaseFormRecordChatDTO> getFormRecordChatsPage(UserContext uc, PageQuery page, FormRecordChatsQuery query, boolean skipCount) Description copied from interface:IFormRecordChatHandlerFinds all form record chats that match the given query.- Specified by:
getFormRecordChatsPagein interfaceIFormRecordChatHandler- Parameters:
uc- user context for accessing the database.page- to get.query- to filter the form record chats.skipCount- whether to skip the count query.- Returns:
- a list of form record chats that match the query ordered by their creation instant (desc).
-
markReadByEndUser
Description copied from interface:IFormRecordChatHandlerMarks the chat as read for the given end user.- Specified by:
markReadByEndUserin interfaceIFormRecordChatHandler- Parameters:
uc- user context for accessing the database.chatUuid- the UUID of the chatuser- the end user to mark the chat as read for.
-
markReadByInboxUser
Description copied from interface:IFormRecordChatHandlerMarks the chat as read for the given inbox user.- Specified by:
markReadByInboxUserin interfaceIFormRecordChatHandler- Parameters:
uc- user context for accessing the database.chatUuid- the UUID of the chatuser- the inbox user to mark the chat as read for.
-
getByRecordAndUser
public PagedResult<BaseFormRecordChatDTO> getByRecordAndUser(UserContext uc, UUID recordUuid, IUser user, int page, int pageSize, Locale locale) Description copied from interface:IFormRecordChatHandlerFinds the chats for the form record given by its UUID if the given user can access the chat.- Specified by:
getByRecordAndUserin interfaceIFormRecordChatHandler- Parameters:
uc- user context for accessing the database.recordUuid- the UUID of the form recorduser- to get the form record chats for.page- to get.pageSize- size of the page to get.- Returns:
- a list of form record chats the user has access to ordered by their creation instant (desc).
nullif the form record given by the UUID could not be found. - See Also:
-
getAllByRecord
Description copied from interface:IFormRecordChatHandlerFinds all chats for the form record given by its UUID.- Specified by:
getAllByRecordin interfaceIFormRecordChatHandler- Parameters:
uc- user context for accessing the database.recordUuid- the UUID of the form record- Returns:
- a list of form record chats ordered by their creation instant (desc).
nullif the form record given by the UUID could not be found.
-