KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > web > project > spi > WebProjectImplementationFactory


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.web.project.spi;
21
22 import java.io.IOException JavaDoc;
23 import org.netbeans.api.project.Project;
24 import org.netbeans.spi.project.support.ant.AntProjectHelper;
25
26 /** The purpose of this interface is to allow a module to provide an alternative
27  * implementation of web project support on top of the standard NetBeans web
28  * project metadata format. Web project implementation of AntBasedProjectType
29  * will look for instances of this interface in lookup and delegate project
30  * creation to them. If no instance accepts a project the default web project
31  * implementation will be used.
32  *
33  * @author Pavel Buzek
34  */

35 public interface WebProjectImplementationFactory {
36     /** Recognize if the project should be owned by your module
37      * or if the default implementation should be used.
38      *
39      * @return true if you want your {@link createProject} to be used for
40      * this project
41      */

42     boolean acceptProject(AntProjectHelper helper) throws IOException JavaDoc;
43     
44     /** Create your implementation of Project to completely bypass
45      * the web/project functionality.
46      */

47     Project createProject(AntProjectHelper helper) throws IOException JavaDoc;
48 }
49
Popular Tags