Skip to content

CategoryServiceImpl.findFirstLevelCategories(): extract representation logic #592

Closed
@php-coder

Description

@php-coder

In the commit b7fe1da (#434) I added CategoryServiceImpl.findFirstLevelCategories() that has mix of business and representation logic. We need this conversion only because Thymeleaf lacks ability to do it (details: https://gist.github.com/php-coder/d3020e4d8d00b8c5befe755c46f06f1b).

We should extract the representation logic. This will simplify findFirstLevelCategories() method, makes testing easier and also, when Thymeleaf will support our need or if we'll change the template engine, it will be more straightforward to remove this "hack".

During refactoring we can also move FirstLevelCategoryDto to another package (for example,controller.dto).

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions