KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > spi > project > CopyOperationImplementation


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 package org.netbeans.spi.project;
20
21 import java.io.File JavaDoc;
22 import java.io.IOException JavaDoc;
23 import org.netbeans.api.project.Project;
24
25 /**
26  * Project Copy Operation. Allows to gather information necessary for project
27  * copy and also provides callbacks to the project type to handle special
28  * checkpoints during the copy process.
29  *
30  * An implementation of this interface may be registered in the project's lookup to support
31  * copy operation in the following cases:
32  * <ul>
33  * <li>The project type wants to use
34  * <a HREF="@org-netbeans-modules-projectuiapi@/org/netbeans/spi/project/ui/support/DefaultProjectOperations.html"><code>DefaultProjectOperations</code></a>
35  * to perform the copy operation.
36  * </li>
37  * <li>If this project may be part of of a compound project (like EJB project is a part of a J2EE project),
38  * and the compound project wants to copy all the sub-projects.
39  * </li>
40  * </ul>
41  *
42  * The project type is not required to put an implementation of this interface into the project's
43  * lookup if the above two cases should not be supported.
44  *
45  * @author Jan Lahoda
46  * @since 1.7
47  */

48 public interface CopyOperationImplementation extends DataFilesProviderImplementation {
49     
50     /**Pre-copy notification. The exact meaning is left on the project implementors, but
51      * typically this means to undeloy the application and remove all artifacts
52      * created by the build project.
53      *
54      * @throws IOException if an I/O operation fails.
55      */

56     public void notifyCopying() throws IOException JavaDoc;
57     
58     /**Notification that the copy operation has finished. Is supposed to fix the
59      * newly created (copied) project into the correct state (including changing its display name
60      * to nueName). Should be called on both original and newly created project (in this order).
61      *
62      * @param original <code>null</code> when called on the original project, the original project when called on the new project
63      * @param originalPath the project folder of the original project (for consistency
64      * with MoveOperationImplementation.notifyMoved)
65      * @param nueName new name for the newly created project.
66      *
67      * @throws IOException if an I/O operation fails.
68      */

69     public void notifyCopied(Project original, File JavaDoc originalPath, String JavaDoc nueName) throws IOException JavaDoc;
70     
71 }
72
Popular Tags