Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: streamlined2/PublicLibrary
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: view-layer-unit-tests
Choose a base ref
...
head repository: streamlined2/PublicLibrary
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 12 commits
  • 43 files changed
  • 1 contributor

Commits on May 26, 2023

  1. Draft 45. Added unit test for LibrarianController class

    1. Added unit test LibrarianControllerTest for LibrarianController
    class;
    2. Fixed 'toString' method implementation for nullable fields
    'credentials', 'birthDay' of empty PersonDto instance;
    3. Path variables' values in ValidationControllerTest class represented
    as method 'perform' parameters.
    streamlined2 committed May 26, 2023
    Configuration menu
    Copy the full SHA
    aeb87ac View commit details
    Browse the repository at this point in the history

Commits on May 27, 2023

  1. Draft 46. Added short description for project

    1. Added short description for project.
    streamlined2 committed May 27, 2023
    Configuration menu
    Copy the full SHA
    9b2181d View commit details
    Browse the repository at this point in the history

Commits on May 28, 2023

  1. Draft 47. Excluded non-available books when saving approved ones

    1. Added query method 'getNonAvailableBooks' to ApprovalRepository to
    fetch set of approved for transfer but yet not returned by customer
    books;
    2. Method 'saveApproval' of DefaultApprovalService class checks if
    requested for approval book is not available for order by calling method
    'getNonAvailableBooks' of ApprovalRepository.
    streamlined2 committed May 28, 2023
    Configuration menu
    Copy the full SHA
    d3afd19 View commit details
    Browse the repository at this point in the history

Commits on May 31, 2023

  1. Draft 48. Added email service implementation

    1. Added email sender bean 'mailSender' to LibraryApplication class;
    2. Added interface NotificationService and implementation class
    DefaultNotificationService for email delivery service;
    3. Method 'save' of DefaultCustomerService sends email notification
    after new customer registered;
    4. Fixed mistake in authorization expression for method 'save' of
    CustomerService interface (librarian's login doesn't need to coincide
    with registered customer's login);
    5. Added phone and email parameters to endpoint 'savePersonalData' of
    CustomerController class; added UI controls for primary phone and email
    to 'register-new-customer' form.
    streamlined2 committed May 31, 2023
    Configuration menu
    Copy the full SHA
    d41bead View commit details
    Browse the repository at this point in the history
  2. Draft 49. Event pool and sender worker thread added

    1. Enabled task scheduling in LibraryApplication class;
    2. Added blocking queue for events in DefaultNotificationService class;
    method 'notifyNewCustomerRegistered' appends new event to queue; method
    'deliverMessages' periodically delivers accumulated messages; enum class
    Event renamed to EventType; added record class Event to hold message
    information.
    streamlined2 committed May 31, 2023
    Configuration menu
    Copy the full SHA
    c5a5ef7 View commit details
    Browse the repository at this point in the history

Commits on Jun 1, 2023

  1. Draft 50. Request acknowledgement notification added

    1. Method 'getAuthorTitlePublishYear' added to entity class Book;
    2. Method 'saveRequest' of class DefaultRequestService sends
    notification after request entity stored successfully;
    3. Added method 'notifyRequestReceived' declaration and implementation
    to interface NotificationService and class DefaultNotificationService.
    streamlined2 committed Jun 1, 2023
    Configuration menu
    Copy the full SHA
    ecc3009 View commit details
    Browse the repository at this point in the history
  2. Draft 51. Notification sent when books approved, transferred, returned

    1. Added methods 'notifyApprovalReceived', 'notifyTransferAccomplished',
    'notifyReturnAccomplished' to interface NotificationService;
    2. Methods DefaultApprovalService.saveApproval,
    DefaultTransferService.saveTransfer, DefaultReturnService.saveReturn
    call appropriate methods of NotificationService to send notification by
    email;
    3. Added implementation for methods 'notifyApprovalReceived',
    'notifyTransferAccomplished', 'notifyReturnAccomplished' to
    DefaultNotificationService class;
    4. Added mock for notification service to ApprovalServiceTest class;
    checked cases when all books available and some books are unavailable.
    streamlined2 committed Jun 1, 2023
    Configuration menu
    Copy the full SHA
    5d77432 View commit details
    Browse the repository at this point in the history

Commits on Jun 3, 2023

  1. Draft 52. Notifications duplicated to topics via Kafka producer

    1. Added Kafka configuration class KafkaConfiguration that defines beans
    for topic list, Kafka admin, producer factory and template;
    2. Added record Message which holds generic information to be sent via
    sender classes;
    3. MessageType extracted into public enum class;
    4. Added interface Sender and implementing classes EmailSender,
    KafkaSender to deliver messages to customer's email or Kafka topic;
    5. Refactored class DefaultNotificationService:
    a) added list of sender beans senderList;
    b) non-related code extracted to EmailSender class, Message record,
    MessageType enum class.
    streamlined2 committed Jun 3, 2023
    Configuration menu
    Copy the full SHA
    d95433e View commit details
    Browse the repository at this point in the history

Commits on Jun 4, 2023

  1. Draft 53. Handle error while sending message to Kafka topic

    1. Added CantSendKafkaMessageException class;
    2. KafkaSender uses CompletableFuture to handle error while sending
    message to broker topic and re-throw wrapped exception
    CantSendKafkaMessageException.
    streamlined2 committed Jun 4, 2023
    Configuration menu
    Copy the full SHA
    1af2a27 View commit details
    Browse the repository at this point in the history
  2. Draft 54. Custom Kafka message serializer implemented

    1. Added KafkaMessageSerializationException class;
    2. Changed type of message from String to Message for producer factory
    and template beans in KafkaConfiguration class;
    3. Added methods 'getBookIds' to Message and MessageType classes;
    4. Added custom Kafka message serializer class MessageSerializer.
    streamlined2 committed Jun 4, 2023
    Configuration menu
    Copy the full SHA
    5b46feb View commit details
    Browse the repository at this point in the history
  3. Draft 55. Message classes replaced with Event type hierarchy

    1. Added interface CustomerRelated for customer related events, abstract
    class Event and derived classes NewCustomerCreatedEvent,
    RequestReceivedEvent, ApprovalReceivedEvent, ReturnAccomplishedEvent,
    TransferAccomplishedEvent;
    2. Added method 'accepts' to interface Sender,
    DefaultNotificationService checks if sender accepts given kind of event;
    3. Class EmailSender sends Email only for customer related events;
    4. Class KafkaSender maps event to Kafka topic according to event class
    name and sends message to that topic via MessageSerializer; topic list
    moved from KafkaConfiguration to KafkaSender class;
    5. Removed classes Message, MessageType;
    6. Added UnacceptableOperationException class.
    streamlined2 committed Jun 4, 2023
    Configuration menu
    Copy the full SHA
    6181041 View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2023

  1. Draft 56. Refactoring of KafkaSender and EmailSender classes

    1. List of Kafka topics converted to map with event class as key in
    KafkaSender class; method 'mapEventToTopic' fetches topic from the map
    by event class;
    2. Refactored method 'send' of class EmailSender which accepts only
    CustomerRelated events.
    streamlined2 committed Jun 5, 2023
    Configuration menu
    Copy the full SHA
    4a76011 View commit details
    Browse the repository at this point in the history
Loading