01: /*
02: * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
03: *
04: * http://izpack.org/
05: * http://izpack.codehaus.org/
06: *
07: * Copyright 2004 Jan Blok
08: *
09: * Licensed under the Apache License, Version 2.0 (the "License");
10: * you may not use this file except in compliance with the License.
11: * You may obtain a copy of the License at
12: *
13: * http://www.apache.org/licenses/LICENSE-2.0
14: *
15: * Unless required by applicable law or agreed to in writing, software
16: * distributed under the License is distributed on an "AS IS" BASIS,
17: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18: * See the License for the specific language governing permissions and
19: * limitations under the License.
20: */
21: package com.izforge.izpack;
22:
23: import com.izforge.izpack.util.OsConstraint;
24:
25: import java.io.Serializable;
26: import java.util.List;
27:
28: /**
29: * @author Jan Blok
30: * @author Dennis Reil, <Dennis.Reil@reddot.de>
31: */
32: public class Panel implements Serializable {
33:
34: static final long serialVersionUID = 8886445274940938809L;
35:
36: /** The panel classname. */
37: public String className;
38:
39: /** The target operation system of this panel */
40: public List<OsConstraint> osConstraints = null;
41:
42: /** the unique id of this panel */
43: protected String panelid;
44:
45: /** condition for this panel */
46: private String condition = null;
47:
48: public String getClassName() {
49: return this .className;
50: }
51:
52: public void setClassName(String className) {
53: this .className = className;
54: }
55:
56: public List<OsConstraint> getOsConstraints() {
57: return this .osConstraints;
58: }
59:
60: public void setOsConstraints(List<OsConstraint> osConstraints) {
61: this .osConstraints = osConstraints;
62: }
63:
64: public String getPanelid() {
65: if (this .panelid == null) {
66: this .panelid = "UNKNOWN (" + className + ")";
67: }
68: return this .panelid;
69: }
70:
71: public void setPanelid(String panelid) {
72: this .panelid = panelid;
73: }
74:
75: /**
76: * @return the condition
77: */
78: public String getCondition() {
79: return this .condition;
80: }
81:
82: /**
83: * @param condition the condition to set
84: */
85: public void setCondition(String condition) {
86: this .condition = condition;
87: }
88:
89: public boolean hasCondition() {
90: return this.condition != null;
91: }
92: }
|