KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > petals > jbi > management > systemstate > ServiceAssemblyState


1 /**
2  * PETALS - PETALS Services Platform.
3  * Copyright (c) 2006 EBM Websourcing, http://www.ebmwebsourcing.com/
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * -------------------------------------------------------------------------
19  * $Id: ServiceAssemblyState.java 154 28 avr. 2006 ofabre $
20  * -------------------------------------------------------------------------
21  */

22 package org.objectweb.petals.jbi.management.systemstate;
23
24 import org.objectweb.petals.util.StringHelper;
25
26 /**
27  *
28  * @author Olivier Fabre, Adrien LOUIS - EBM Websourcing
29  *
30  */

31 public class ServiceAssemblyState {
32     private String JavaDoc archiveURL;
33
34     private String JavaDoc installURL;
35
36     private String JavaDoc lifecycleState;
37
38     private String JavaDoc name;
39
40     public ServiceAssemblyState() {
41         super();
42     }
43
44     public ServiceAssemblyState(String JavaDoc name, String JavaDoc installURL, String JavaDoc zipURL,
45         String JavaDoc lifecycleState) {
46         super();
47         this.name = name;
48         this.installURL = installURL;
49         this.archiveURL = zipURL;
50         this.lifecycleState = lifecycleState;
51     }
52
53     public boolean equals(Object JavaDoc o) {
54         if (o instanceof ServiceAssemblyState) {
55             ServiceAssemblyState cc = (ServiceAssemblyState) o;
56
57             return StringHelper.equal(name, cc.name)
58                 && StringHelper.equal(installURL, cc.installURL)
59                 && StringHelper.equal(archiveURL, cc.archiveURL)
60                 && StringHelper.equal(lifecycleState, cc.lifecycleState);
61         } else {
62             return false;
63         }
64     }
65
66     public String JavaDoc getArchiveURL() {
67         return archiveURL;
68     }
69
70     public String JavaDoc getInstallURL() {
71         return installURL;
72     }
73
74     public String JavaDoc getLifecycleState() {
75         return lifecycleState;
76     }
77
78     public String JavaDoc getName() {
79         return name;
80     }
81
82     public int hashCode() {
83         int hashCode = 0;
84         if (archiveURL != null) {
85             hashCode += archiveURL.hashCode();
86         }
87         if (installURL != null) {
88             hashCode += installURL.hashCode();
89         }
90         if (lifecycleState != null) {
91             hashCode += lifecycleState.hashCode();
92         }
93         if (name != null) {
94             hashCode += name.hashCode();
95         }
96         return hashCode;
97     }
98
99     public void setArchiveURL(String JavaDoc zipURL) {
100         this.archiveURL = zipURL;
101     }
102
103     public void setInstallURL(String JavaDoc installURL) {
104         this.installURL = installURL;
105     }
106
107     public void setLifecycleState(String JavaDoc lifecycleState) {
108         this.lifecycleState = lifecycleState;
109     }
110
111     public void setName(String JavaDoc name) {
112         this.name = name;
113     }
114 }
115
Popular Tags