Interface ContactHandler
-
public interface ContactHandler
This handler provides access toContact
objects.- Since:
- 11.26
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Optional<Contact>
getContact(Call call)
java.util.Optional<Contact>
getContact(Ticket ticket)
java.util.Optional<Contact>
getContactByContactIdentifier(ContactIdentifier contactIdentifier)
This method returns the optionalContact
for aContactIdentifier
.java.util.Optional<Contact>
getContactByContactIdentifier(ContactIdentifier contactIdentifier, Tenant tenant)
java.util.Optional<Contact>
getContactByID(java.lang.Long id)
This method returns the optionalContact
of an id.java.util.List<Contact>
getContactListByContactIdentifier(ContactIdentifier contactIdentifier)
This method returns a list of all contacts matching any of the search criteria of theContactIdentifier
.java.util.List<Contact>
getContactListByContactIdentifier(ContactIdentifier contactIdentifier, Tenant tenant)
This method returns a list of contacts that are assigned to aTenant
and matching any of the search criteria of theContactIdentifier
.ContactModifier
getContactModifier(Contact contact, java.util.Optional<User> user)
Build aContactModifier
for the passedContact
object.ContactRelationHandler
getContactRelationHandler(Contact contact, java.util.Optional<User> user)
Build aContactRelationHandler
for the passedContact
object.java.util.List<Contact>
getJoinedContactList(Contact contact)
Returns a list of contacts that are joined to the associatedContact
.
-
-
-
Method Detail
-
getContactByID
java.util.Optional<Contact> getContactByID(java.lang.Long id)
-
getContactByContactIdentifier
java.util.Optional<Contact> getContactByContactIdentifier(ContactIdentifier contactIdentifier)
This method returns the optionalContact
for aContactIdentifier
. If the search criteria of theContactIdentifier
do not match anyContact
the method returns an emptyOptional
.- Parameters:
contactIdentifier
- theContactIdentifier
with the search criteria inside.- Returns:
- the optional
Contact
for aContactIdentifier
, or an emptyOptional
if the search criteria of theContactIdentifier
do not match anyContact
. - Since:
- 12.24
-
getContactListByContactIdentifier
java.util.List<Contact> getContactListByContactIdentifier(ContactIdentifier contactIdentifier)
This method returns a list of all contacts matching any of the search criteria of theContactIdentifier
. If more than oneContact
is found, the list is sorted ascending by the contact's id.- Parameters:
contactIdentifier
- theContactIdentifier
with the search criteria inside- Returns:
- the list of matching contacts
- Since:
- 12.24
-
getContactByContactIdentifier
java.util.Optional<Contact> getContactByContactIdentifier(ContactIdentifier contactIdentifier, Tenant tenant)
This method returns the optionalContact
for aContactIdentifier
and aTenant
. If the search criteria of theContactIdentifier
and theTenant
do not belong to anyContact
the method returns an emptyOptional
.- Parameters:
contactIdentifier
- theContactIdentifier
with the search criteria insidetenant
- theTenant
assigned to aContact
- Returns:
- the optional
Contact
for aContactIdentifier
and aTenant
, or an emptyOptional
if the search criteria of theContactIdentifier
and the Tenant do not match anyContact
. - Since:
- 12.24
-
getContactListByContactIdentifier
java.util.List<Contact> getContactListByContactIdentifier(ContactIdentifier contactIdentifier, Tenant tenant)
This method returns a list of contacts that are assigned to aTenant
and matching any of the search criteria of theContactIdentifier
. If more than oneContact
is found, the list is sorted ascending by the contact's id.- Parameters:
contactIdentifier
- theContactIdentifier
with the search criteria insidetenant
- theTenant
assigned to aContact
- Returns:
- the list of matching contacts
- Since:
- 12.24
-
getJoinedContactList
java.util.List<Contact> getJoinedContactList(Contact contact)
Returns a list of contacts that are joined to the associatedContact
. If more than oneContact
is found, the list is sorted ascending by the contact's id.- Parameters:
contact
- theContact
to be used to search for associated contacts- Returns:
- the list of associated contacts
- Since:
- 12.24
-
getContactModifier
ContactModifier getContactModifier(Contact contact, java.util.Optional<User> user)
Build aContactModifier
for the passedContact
object.- Parameters:
contact
- the instance to modifyuser
- pass a user, if called in a user context. Otherwise pass an empty optional.- Returns:
- a
ContactModifier
associated with theContact
. - Since:
- 12.14
-
getContactRelationHandler
ContactRelationHandler getContactRelationHandler(Contact contact, java.util.Optional<User> user)
Build aContactRelationHandler
for the passedContact
object.- Parameters:
contact
- the instance to modifyuser
- pass a user, if called in a user context. Otherwise pass an empty optional.- Returns:
- a
ContactRelationHandler
for theContact
. - Since:
- 12.24
-
-