Interface ContactService

    • Method Detail

      • addContact

        int addContact​(@NotNull
                       @NotNull UUID targetEntityKey,
                       @NotNull @Valid
                       @NotNull @Valid Contact contact)
        Add a new Contact to a target entity.
        Parameters:
        targetEntityKey - key of target entity
        contact - Contact to add
        Returns:
        key of Contact added
      • deleteContact

        void deleteContact​(@NotNull
                           @NotNull UUID targetEntityKey,
                           int contactKey)
        Delete an existing Contact from a target entity by contact key.
        Parameters:
        targetEntityKey - key of target entity
        contactKey - Contact key to delete
      • listContacts

        List<ContactlistContacts​(@NotNull
                                   @NotNull UUID targetEntityKey)
        List all contacts of a target entity.
        Parameters:
        targetEntityKey - key of target entity
        Returns:
        list of contacts that belong to the entity
      • updateContact

        void updateContact​(@NotNull
                           @NotNull UUID targetEntityKey,
                           @NotNull @Valid
                           @NotNull @Valid Contact contact)
        Updates the given contact for the target entity.
        Parameters:
        targetEntityKey - Which must be the the owner of the contact or else an exception will be thrown.
        contact - To update