OW2 Consortium elastic-grid

Rev

Rev 205 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
316 jeje 1
/**
182 jeje 2
 * Elastic Grid
205 jeje 3
 * Copyright (C) 2008-2009 Elastic Grid, LLC.
2 jeje 4
 *
182 jeje 5
 * This program is free software: you can redistribute it and/or modify
6
 * it under the terms of the GNU Affero General Public License as
55 jeje 7
 * published by the Free Software Foundation, either version 3 of the
182 jeje 8
 * License, or (at your option) any later version.
2 jeje 9
 *
182 jeje 10
 * This program is distributed in the hope that it will be useful,
55 jeje 11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
182 jeje 13
 * GNU Affero General Public License for more details.
55 jeje 14
 *
182 jeje 15
 * You should have received a copy of the GNU Affero General Public License
316 jeje 16
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
 */
18
 
2 jeje 19
package com.elasticgrid.model.internal;
20
 
21
import com.elasticgrid.model.Application;
316 jeje 22
import com.elasticgrid.model.Service;
23
import java.util.HashSet;
24
import java.util.Set;
2 jeje 25
 
26
/**
27
 * @author Jerome Bernard
28
 */
29
public class ApplicationImpl implements Application {
30
    private String name;
316 jeje 31
    private Set<Service> services = new HashSet<Service>();
2 jeje 32
 
33
    public String getName() {
34
        return name;
35
    }
36
 
316 jeje 37
    public Application name(String name) {
38
        this.name = name;
39
        return this;
2 jeje 40
    }
41
 
316 jeje 42
    public Set<Service> getServices() {
43
        return services;
2 jeje 44
    }
45
 
316 jeje 46
    public Service service(String name) {
47
        Service service = new ServiceImpl(name);
48
        services.add(service);
49
        return service;
2 jeje 50
    }
51
}