站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 5.0.0

ProjectOperations (NetBeans Project API) - NetBeans API Javadoc 5.0.0

 

org.netbeans.spi.project.support
Class ProjectOperations

java.lang.Object
  extended byorg.netbeans.spi.project.support.ProjectOperations

public final class ProjectOperations
extends Object

Allows gathering information for various project operations.

Since:
1.7

Method Summary
static List getDataFiles(Project prj)
          Return list of files that are considered source files and folders for the given project.
static List getMetadataFiles(Project prj)
          Return list of files that are considered metadata files and folders for the given project.
static boolean isCopyOperationSupported(Project prj)
          Test whether the copy operation is supported on the given project.
static boolean isDeleteOperationSupported(Project prj)
          Test whether the delete operation is supported on the given project.
static boolean isMoveOperationSupported(Project prj)
          Test whether the move operation is supported on the given project.
static void notifyCopied(Project original, Project nue, File originalPath, String name)
          Notification that the project has been copied.
static void notifyCopying(Project prj)
          Notification that the project is about to be copyied.
static void notifyDeleted(Project prj)
          Notification that the project has been deleted.
static void notifyDeleting(Project prj)
          Notification that the project is about to be deleted.
static void notifyMoved(Project original, Project nue, File originalPath, String name)
          Notification that the project has been moved.
static void notifyMoving(Project prj)
          Notification that the project is about to be moved.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getMetadataFiles

public static List getMetadataFiles(Project prj)
Return list of files that are considered metadata files and folders for the given project. Returns meaningfull values only if some of the is*Supported methods return true.

Parameters:
prj - project to test
Returns:
list of metadata files/folders

getDataFiles

public static List getDataFiles(Project prj)
Return list of files that are considered source files and folders for the given project. Returns meaningfull values only if some of the is*Supported methods return true.

Parameters:
prj - project to test
Returns:
list of data files/folders

isDeleteOperationSupported

public static boolean isDeleteOperationSupported(Project prj)
Test whether the delete operation is supported on the given project.

Parameters:
prj - project to test
Returns:
true if the project supports delete operation, false otherwise

notifyDeleting

public static void notifyDeleting(Project prj)
                           throws IOException
Notification that the project is about to be deleted. Should be called immediatelly before the project is deleted. The project is supposed to do all required cleanup to allow the project to be deleted.

Parameters:
prj - project to notify
Throws:
IOException - is some error occurs

notifyDeleted

public static void notifyDeleted(Project prj)
                          throws IOException
Notification that the project has been deleted. Should be called immediatelly after the project is deleted.

Parameters:
prj - project to notify
Throws:
IOException - is some error occurs

isCopyOperationSupported

public static boolean isCopyOperationSupported(Project prj)
Test whether the copy operation is supported on the given project.

Parameters:
prj - project to test
Returns:
true if the project supports the copy operation, false otherwise

notifyCopying

public static void notifyCopying(Project prj)
                          throws IOException
Notification that the project is about to be copyied. Should be called immediatelly before the project is copied. The project is supposed to do all required cleanup to allow the project to be copied.

Parameters:
prj - project to notify
Throws:
IOException - is some error occurs

notifyCopied

public static void notifyCopied(Project original,
                                Project nue,
                                File originalPath,
                                String name)
                         throws IOException
Notification that the project has been copied. Should be called immediatelly after the project is copied. The project is supposed to do all necessary fixes to the project's structure to form a valid project. Both original and newly created project (copy) are notified, in this order.

Parameters:
original - original project
nue - new project (copy)
originalPath - the project folder of the original project (for consistency with notifyMoved)
name - new name of the project
Throws:
IOException - is some error occurs

notifyMoving

public static void notifyMoving(Project prj)
                         throws IOException
Notification that the project is about to be moved. Should be called immediatelly before the project is moved. The project is supposed to do all required cleanup to allow the project to be moved.

Parameters:
prj - project to notify
Throws:
IOException - is some error occurs

notifyMoved

public static void notifyMoved(Project original,
                               Project nue,
                               File originalPath,
                               String name)
                        throws IOException
Notification that the project has been moved. Should be called immediatelly after the project is moved. The project is supposed to do all necessary fixes to the project's structure to form a valid project. Both original and moved project are notified, in this order.

Parameters:
original - original project
nue - moved project
originalPath - the project folder of the original project
name - new name of the project
Throws:
IOException - is some error occurs

isMoveOperationSupported

public static boolean isMoveOperationSupported(Project prj)
Test whether the move operation is supported on the given project.

Parameters:
prj - project to test
Returns:
true if the project supports the move operation, false otherwise

 

Built on May 3 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.