KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > apisupport > project > ui > wizard > NewModuleProjectData


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.apisupport.project.ui.wizard;
21
22 import org.openide.WizardDescriptor;
23
24 /**
25  * Model for storing data gained from <em>NetBeans Plug-in Module</em> wizard
26  * panels.
27  *
28  * @author Martin Krauskopf
29  */

30 final class NewModuleProjectData {
31
32     private WizardDescriptor settings;
33     private final int wizardType;
34
35     private boolean netBeansOrg;
36     private boolean standalone = true; // standalone is default
37
private String JavaDoc projectName;
38     private String JavaDoc projectLocation;
39     private String JavaDoc projectFolder;
40     private String JavaDoc suiteRoot;
41     private boolean mainProject;
42     private String JavaDoc codeNameBase;
43     private String JavaDoc platformID;
44     private String JavaDoc bundle;
45     private String JavaDoc layer;
46     private String JavaDoc projectDisplayName;
47     private int moduleCounter;
48     private int suiteCounter;
49     
50     /**
51      * @param wizardType one of NewNbModuleWizardIterator.TYPE_*
52      */

53     NewModuleProjectData(int wizardType) {
54         this.wizardType = wizardType;
55     }
56     
57     void setSettings(WizardDescriptor settings) {
58         this.settings = settings;
59     }
60     
61     WizardDescriptor getSettings() {
62         assert settings != null;
63         return settings;
64     }
65     
66     void setStandalone(boolean standalone) {
67         this.standalone = standalone;
68     }
69     
70     void setNetBeansOrg(boolean netBeansOrg) {
71         this.netBeansOrg = netBeansOrg;
72     }
73     
74     boolean isNetBeansOrg() {
75         return netBeansOrg;
76     }
77     
78     boolean isStandalone() {
79         return standalone;
80     }
81     
82     boolean isSuiteComponent() {
83         return !isNetBeansOrg() && !isStandalone();
84     }
85     
86     String JavaDoc getProjectName() {
87         return projectName;
88     }
89     
90     void setProjectName(String JavaDoc projectName) {
91         this.projectName = projectName;
92     }
93     
94     String JavaDoc getProjectLocation() {
95         return projectLocation;
96     }
97     
98     void setProjectLocation(String JavaDoc projectLocation) {
99         this.projectLocation = projectLocation;
100     }
101     
102     String JavaDoc getProjectFolder() {
103         return projectFolder;
104     }
105     
106     void setProjectFolder(String JavaDoc projectFolder) {
107         this.projectFolder = projectFolder;
108     }
109     
110     String JavaDoc getSuiteRoot() {
111         return suiteRoot;
112     }
113     
114     void setSuiteRoot(String JavaDoc suiteRoot) {
115         this.suiteRoot = suiteRoot;
116     }
117     
118     protected boolean isMainProject() {
119         return mainProject;
120     }
121     
122     protected void setMainProject(boolean mainProject) {
123         this.mainProject = mainProject;
124     }
125     
126     String JavaDoc getCodeNameBase() {
127         return codeNameBase;
128     }
129     
130     void setCodeNameBase(String JavaDoc codeNameBase) {
131         this.codeNameBase = codeNameBase;
132     }
133     
134     String JavaDoc getPlatformID() {
135         return platformID;
136     }
137     
138     void setPlatformID(String JavaDoc platformID) {
139         this.platformID = platformID;
140     }
141     
142     String JavaDoc getBundle() {
143         return bundle;
144     }
145     
146     void setBundle(String JavaDoc bundle) {
147         this.bundle = bundle;
148     }
149     
150     String JavaDoc getLayer() {
151         return layer;
152     }
153     
154     void setLayer(String JavaDoc layer) {
155         this.layer = layer;
156     }
157     
158     String JavaDoc getProjectDisplayName() {
159         return projectDisplayName;
160     }
161     
162     void setProjectDisplayName(String JavaDoc projectDisplayName) {
163         this.projectDisplayName = projectDisplayName;
164     }
165     
166     int getModuleCounter() {
167         return moduleCounter;
168     }
169     
170     void setModuleCounter(int counter) {
171         this.moduleCounter = counter;
172     }
173     
174     int getSuiteCounter() {
175         return suiteCounter;
176     }
177     
178     void setSuiteCounter(int counter) {
179         this.suiteCounter = counter;
180     }
181     
182     int getWizardType() {
183         return wizardType;
184     }
185     
186 }
187
Popular Tags