I thinks its a repository, since its getting data from a persistance store (the filesystem). You should call the repository method within an application service which orchestrates your use cases.
Software engineer with over 10 years experience in different technology stacks, architecting, developing, CI/CD and leading teams. Currently working with Java, Node.JS and Serverless
Software engineer with over 10 years experience in different technology stacks, architecting, developing, CI/CD and leading teams. Currently working with Java, Node.JS and Serverless
It would make sense if it was really getting data from any storage, but I get it from file uploaded by user to my rest controller. It's in-memory, not in file system.
So i think you should parse it using a service/utility class, call this class within your controller, and pass the returned user objects as an usual parameter to your application service class, which would orchestrate your use case without knowloadge about the file. Treat the file as a controller parameter/input, despites the fact that your framework probably doesnt parse it by default.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I thinks its a repository, since its getting data from a persistance store (the filesystem). You should call the repository method within an application service which orchestrates your use cases.
This.
?
It would make sense if it was really getting data from any storage, but I get it from file uploaded by user to my rest controller. It's in-memory, not in file system.
So i think you should parse it using a service/utility class, call this class within your controller, and pass the returned user objects as an usual parameter to your application service class, which would orchestrate your use case without knowloadge about the file. Treat the file as a controller parameter/input, despites the fact that your framework probably doesnt parse it by default.