This is a web application that uses Lietuvos Bankas webservice of currency rate publishing and shows all available rates list in selected period. Request are beeing sent automatically, when changes are apply. When currency rates are not available, app shows alert about it. Incoming data is in XML format.
Interesting code pieces
Thanks to freshly found Lombok library now it is way less pain creating simple pojo classes. Annotation @Data generates getters/setters, toString for me in a just one line of code. Annotation @AllArgsConstructor is used to show Lombok that I will need all arguments contructor here. AccessLevel = public. What can be easier, huh?
And here is the code I used to get and use data from lb.lt . Data comes as XML and is read with DocumentBuilder class from javax.xml.parsers. For this moment, I believe json is easier and much more clear format. But sometimes you shall stick to requirements set by others 🙂
And finally, a small pearl for sorting HashMap:
Here I am returning LinkeHashMap because simple HashMap makes no guarantees about the iteration order.