View on GitHub

Refactoring with Guava

...the functional way!

Download this project as a .zip file Download this project as a tar.gz file

Context

You have just started a new project in a corporate and investment bank, and you have to improve quality and maintainability of an existing blotter application.

A blotter consists in a list of products displayed to users.

Product visibility depends of participant teams which are indicated on each product. A user who belongs to the team which is affected to a product as participant can show this product in its blotter. This rule is also suitable for subteams.

Participant Teams

Three different types of blotter exist with specific rules:

Organization

Each user belongs to teams and have roles (sales, engineer or trader). Each team contains members which can be users or teams.

A task is assigned to a member (user or team) and a role.

Organization

Goal

Refactor existing application by reducing complexity of task and product repositories.

Global Architecture

Use Guava to filter and transform tasks and products according to business rules.

Task helper rules

Task Helper

Blotter service rules

Team and User Blotters

All Products Blotter