package jp.sourceforge.glad.example.service.hello.impl;

import jp.sourceforge.glad.example.service.hello.HelloService;
import jp.sourceforge.glad.example.service.hello.dto.MessageDto;

public class HelloServiceImpl implements HelloService {

    public MessageDto sayHello(String name) {
        MessageDto message = new MessageDto(name);
        if (name == null || name.length() == 0) {
            message.setBody("Hello, World!");
        } else {
            message.setBody("Hello, " + name + "!");
        }
        return message;
    }

}
