001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common
008: * Development and Distribution License("CDDL") (collectively, the
009: * "License"). You may not use this file except in compliance with the
010: * License. You can obtain a copy of the License at
011: * http://www.netbeans.org/cddl-gplv2.html
012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013: * specific language governing permissions and limitations under the
014: * License. When distributing the software, include this License Header
015: * Notice in each file and include the License file at
016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
017: * particular file as subject to the "Classpath" exception as provided
018: * by Sun in the GPL Version 2 section of the License file that
019: * accompanied this code. If applicable, add the following below the
020: * License Header, with the fields enclosed by brackets [] replaced by
021: * your own identifying information:
022: * "Portions Copyrighted [year] [name of copyright owner]"
023: *
024: * Contributor(s):
025: *
026: * The Original Software is NetBeans. The Initial Developer of the Original
027: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
028: * Microsystems, Inc. All Rights Reserved.
029: *
030: * If you wish your version of this file to be governed by only the CDDL
031: * or only the GPL Version 2, indicate your decision by adding
032: * "[Contributor] elects to include this software in this distribution
033: * under the [CDDL or GPL Version 2] license." If you do not indicate a
034: * single choice of license, a recipient has the option to distribute
035: * your version of this file under either the CDDL, the GPL Version 2 or
036: * to extend the choice of license to its licensees as provided above.
037: * However, if you add GPL Version 2 code and therefore, elected the GPL
038: * Version 2 license, then the option applies only if the new code is
039: * made subject to such option by the copyright holder.
040: */
041:
042: package org.netbeans.modules.apisupport.project.ui.wizard;
043:
044: import org.openide.WizardDescriptor;
045:
046: /**
047: * Model for storing data gained from <em>NetBeans Plug-in Module</em> wizard
048: * panels.
049: *
050: * @author Martin Krauskopf
051: */
052: final class NewModuleProjectData {
053:
054: private WizardDescriptor settings;
055: private final int wizardType;
056:
057: private boolean netBeansOrg;
058: private boolean standalone = true; // standalone is default
059: private String projectName;
060: private String projectLocation;
061: private String projectFolder;
062: private String suiteRoot;
063: private boolean mainProject;
064: private String codeNameBase;
065: private String platformID;
066: private String bundle;
067: private String layer;
068: private String projectDisplayName;
069: private int moduleCounter;
070: private int suiteCounter;
071:
072: /**
073: * @param wizardType one of NewNbModuleWizardIterator.TYPE_*
074: */
075: NewModuleProjectData(int wizardType) {
076: this .wizardType = wizardType;
077: }
078:
079: void setSettings(WizardDescriptor settings) {
080: this .settings = settings;
081: }
082:
083: WizardDescriptor getSettings() {
084: assert settings != null;
085: return settings;
086: }
087:
088: void setStandalone(boolean standalone) {
089: this .standalone = standalone;
090: }
091:
092: void setNetBeansOrg(boolean netBeansOrg) {
093: this .netBeansOrg = netBeansOrg;
094: }
095:
096: boolean isNetBeansOrg() {
097: return netBeansOrg;
098: }
099:
100: boolean isStandalone() {
101: return standalone;
102: }
103:
104: boolean isSuiteComponent() {
105: return !isNetBeansOrg() && !isStandalone();
106: }
107:
108: String getProjectName() {
109: return projectName;
110: }
111:
112: void setProjectName(String projectName) {
113: this .projectName = projectName;
114: }
115:
116: String getProjectLocation() {
117: return projectLocation;
118: }
119:
120: void setProjectLocation(String projectLocation) {
121: this .projectLocation = projectLocation;
122: }
123:
124: String getProjectFolder() {
125: return projectFolder;
126: }
127:
128: void setProjectFolder(String projectFolder) {
129: this .projectFolder = projectFolder;
130: }
131:
132: String getSuiteRoot() {
133: return suiteRoot;
134: }
135:
136: void setSuiteRoot(String suiteRoot) {
137: this .suiteRoot = suiteRoot;
138: }
139:
140: protected boolean isMainProject() {
141: return mainProject;
142: }
143:
144: protected void setMainProject(boolean mainProject) {
145: this .mainProject = mainProject;
146: }
147:
148: String getCodeNameBase() {
149: return codeNameBase;
150: }
151:
152: void setCodeNameBase(String codeNameBase) {
153: this .codeNameBase = codeNameBase;
154: }
155:
156: String getPlatformID() {
157: return platformID;
158: }
159:
160: void setPlatformID(String platformID) {
161: this .platformID = platformID;
162: }
163:
164: String getBundle() {
165: return bundle;
166: }
167:
168: void setBundle(String bundle) {
169: this .bundle = bundle;
170: }
171:
172: String getLayer() {
173: return layer;
174: }
175:
176: void setLayer(String layer) {
177: this .layer = layer;
178: }
179:
180: String getProjectDisplayName() {
181: return projectDisplayName;
182: }
183:
184: void setProjectDisplayName(String projectDisplayName) {
185: this .projectDisplayName = projectDisplayName;
186: }
187:
188: int getModuleCounter() {
189: return moduleCounter;
190: }
191:
192: void setModuleCounter(int counter) {
193: this .moduleCounter = counter;
194: }
195:
196: int getSuiteCounter() {
197: return suiteCounter;
198: }
199:
200: void setSuiteCounter(int counter) {
201: this .suiteCounter = counter;
202: }
203:
204: int getWizardType() {
205: return wizardType;
206: }
207:
208: }
|