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-2007 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.uml.core.metamodel.structure;
043:
044: import org.netbeans.modules.uml.core.support.IAssociatedProjectSourceRoots;
045: import org.dom4j.Document;
046:
047: import org.netbeans.modules.uml.core.metamodel.core.foundation.IElement;
048: import org.netbeans.modules.uml.core.metamodel.core.foundation.IElementDisposal;
049: import org.netbeans.modules.uml.core.reverseengineering.reframework.parsingframework.ILanguage;
050: import org.netbeans.modules.uml.core.support.umlsupport.IStrings;
051: import org.netbeans.modules.uml.core.support.umlutils.ETList;
052: import org.netbeans.modules.uml.core.typemanagement.ITypeManager;
053: import org.netbeans.modules.uml.core.workspacemanagement.ITwoPhaseCommit;
054: import org.netbeans.modules.uml.core.workspacemanagement.IWSProject;
055:
056: public interface IProject extends IModel, ITwoPhaseCommit {
057: /**
058: * Retrieves the document that holds the data of the project.
059: */
060: public Document getDocument();
061:
062: /**
063: * Retrieves the document that holds the data of the project.
064: */
065: public void setDocument(Document value);
066:
067: /**
068: * Saves this Project to the location specified.
069: */
070: public void save(String fileName, boolean remember);
071:
072: /**
073: * Sets / Gets the name of the file this project will be saved to.
074: */
075: public String getFileName();
076:
077: /**
078: * Sets / Gets the name of the file this project will be saved to.
079: */
080: public void setFileName(String value);
081:
082: /**
083: * Gets the directory where this project will be saved to.
084: */
085: public String getBaseDirectory();
086:
087: /**
088: * Pulls in the default package imports for this project. This is called by default by the Application.
089: */
090: public boolean loadDefaultImports();
091:
092: /**
093: * Sets / Gets the name of the mode this project is in.
094: */
095: public String getMode();
096:
097: /**
098: * Sets / Gets the name of the mode this project is in.
099: */
100: public void setMode(String value);
101:
102: /**
103: * Sets / Gets the name of the language to use for this project when in Implementation mode.
104: */
105: public String getDefaultLanguage();
106:
107: /**
108: * Sets / Gets the name of the language to use for this project when in Implementation mode.
109: */
110: public void setDefaultLanguage(String value);
111:
112: /**
113: * The object responsible for handling the maintenance and purging of deleted items.
114: */
115: public IElementDisposal getElementDisposal();
116:
117: /**
118: * The object responsible for handling the maintenance and purging of deleted items.
119: */
120: public void setElementDisposal(IElementDisposal value);
121:
122: /**
123: * The ID that identifies this Project in the SC tool.
124: */
125: public String getSourceControlID();
126:
127: /**
128: * The ID that identifies this Project in the SC tool.
129: */
130: public void setSourceControlID(String value);
131:
132: /**
133: * Extracts the passed in element from the Projects document, allowing for Version control.
134: */
135: public void extractElement(IElement element);
136:
137: /**
138: * The TypeManager associated with this Project.
139: */
140: public ITypeManager getTypeManager();
141:
142: /**
143: * Gets the language to use for this project when in Implementation mode.
144: */
145: public ILanguage getDefaultLanguage2();
146:
147: /**
148: * Retrieves the WSProject that corresponds with this IProject.
149: */
150: public IWSProject getWSProject();
151:
152: /**
153: * Returns the child item dirty flag.
154: */
155: public boolean getChildrenDirty();
156:
157: /**
158: * Returns the child item dirty flag.
159: */
160: public void setChildrenDirty(boolean value);
161:
162: public boolean getDirty();
163:
164: /**
165: * Closes this Project. The Project object should not be used after this method is called
166: */
167: public void close();
168:
169: /**
170: * Adds an absolute path to an external library to this Project
171: */
172: public void addReferencedLibrary(String libLocation);
173:
174: /**
175: * Removes the location of a referenced library from this Project's list of libraries.
176: */
177: public void removeReferencedLibrary(String libLocation);
178:
179: /**
180: * The collection of locations of libraries this Project references.
181: */
182: public ETList<String> getReferencedLibraries();
183:
184: /**
185: * Sets the Project into more of a reference mode, turning off roundtrip behaviors.
186: */
187: public boolean getLibraryState();
188:
189: /**
190: * Sets the Project into more of a reference mode, turning off roundtrip behaviors.
191: */
192: public void setLibraryState(boolean value);
193:
194: /**
195: * Retrieves the referenced library with the passed in location.
196: */
197: public IProject getReferencedLibraryProjectByLocation(
198: String refLibLoc);
199:
200: /**
201: * Retrieves all the referenced libraries associated with this Project.
202: */
203: public ETList<IProject> getReferencedLibraryProjects();
204:
205: public void prepareNode();
206:
207: /**
208: * Add an element that must be removed before project is saved.
209: */
210: public void addRemoveOnSave(IElement element);
211:
212: /**
213: * Sets the source roots that is associated with the project.
214: */
215: public void setAssociatedProjectSourceRoots(
216: IAssociatedProjectSourceRoots sourceRoots);
217:
218: /**
219: * Retrieve the source roots associated with the project.
220: */
221: public IAssociatedProjectSourceRoots getAssociatedProjectSourceRoots();
222: }
|