Package name.pehl.karaka.server.sampledata

Source Code of name.pehl.karaka.server.sampledata.ClientProducer

package name.pehl.karaka.server.sampledata;

import java.util.ArrayList;
import java.util.List;

import javax.enterprise.inject.Produces;
import javax.inject.Inject;

import name.pehl.karaka.server.client.entity.Client;

class ClientProducer
{
    static String[] names = new String[] {"ACME", "FooBar", "United", "Blabla"};
    @Inject LoremIpsum loremIpsum;


    @Produces
    public List<Client> produceClients()
    {
        List<Client> clients = new ArrayList<Client>();
        for (String name : names)
        {
            Client client = new Client(name, loremIpsum.randomWords(3));
            clients.add(client);
        }
        return clients;
    }
}
TOP

Related Classes of name.pehl.karaka.server.sampledata.ClientProducer

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.