This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 61476
Collapse All | Expand All

(-)CustomPlatformInstall.java (+40 lines)
Added Link Here
1
/*
2
 *                 Sun Public License Notice
3
 * 
4
 * The contents of this file are subject to the Sun Public License
5
 * Version 1.0 (the "License"). You may not use this file except in
6
 * compliance with the License. A copy of the License is available at
7
 * http://www.sun.com/
8
 * 
9
 * The Original Code is NetBeans. The Initial Developer of the Original
10
 * Code is Sun Microsystems, Inc. Portions Copyright 1997-2005 Sun
11
 * Microsystems, Inc. All Rights Reserved.
12
 */
13
14
package org.netbeans.spi.java.platform;
15
16
import org.openide.WizardDescriptor;
17
18
19
/**
20
 * Defines an API for registering custom Java platform installer. The installer
21
 * is responsible for instantiation of {@link JavaPlatform} through the provided
22
 * TemplateWizard.Iterator. If your installer selects the platform on the local disk you 
23
 * probably don't want to use this class, the {@link PlatformInstall} class
24
 * creates an platform chooser for you. You want to use this class if the 
25
 * platform is not on the local disk, eg. you want to download it from the web.
26
 * @author Tomas Zezula
27
 * @since 1.5
28
 */
29
public abstract class CustomPlatformInstall extends GeneralPlatformInstall {
30
    
31
    /**
32
     * Returns the {@link WizardDescriptor#InstantiatingIterator} used to install
33
     * the platform.
34
     * @return TemplateWizard.Iterator instance responsible for instantiating
35
     * the platform. The instantiate method of the returned iterator should
36
     * return the Set containing the created JavaPlatform.
37
     */
38
    public abstract WizardDescriptor.InstantiatingIterator createIterator();            
39
    
40
}
(-)GeneralPlatformInstall.java (+35 lines)
Added Link Here
1
/*
2
 *                 Sun Public License Notice
3
 * 
4
 * The contents of this file are subject to the Sun Public License
5
 * Version 1.0 (the "License"). You may not use this file except in
6
 * compliance with the License. A copy of the License is available at
7
 * http://www.sun.com/
8
 * 
9
 * The Original Code is NetBeans. The Initial Developer of the Original
10
 * Code is Sun Microsystems, Inc. Portions Copyright 1997-2005 Sun
11
 * Microsystems, Inc. All Rights Reserved.
12
 */
13
14
package org.netbeans.spi.java.platform;
15
16
/**
17
 * An super class of all the platform installers. You never subclass directly
18
 * this class but either the {@link CustomPlatformInstall} or {@link PlatformInstall}
19
 * @author Tomas Zezula
20
 * @since 1.5
21
 */
22
public abstract class GeneralPlatformInstall {
23
    
24
    
25
        
26
    GeneralPlatformInstall() {
27
    }
28
    
29
    /**
30
     * Returns the diaply name of the platform installer
31
     * @return String, the diaplay name
32
     */
33
    public abstract String getDisplayName ();
34
    
35
}
(-)PlatformInstall.java (-8 / +2 lines)
Lines 23-29 Link Here
23
 *
23
 *
24
 * @author Svata Dedic, Tomas Zezula
24
 * @author Svata Dedic, Tomas Zezula
25
 */
25
 */
26
public abstract class PlatformInstall {
26
public abstract class PlatformInstall extends GeneralPlatformInstall {
27
    /**
27
    /**
28
     * Determines whether the Recognizer recognizes a Java Platform in 
28
     * Determines whether the Recognizer recognizes a Java Platform in 
29
     * the passed folder. The check done by this method should be quick
29
     * the passed folder. The check done by this method should be quick
Lines 41-52 Link Here
41
     * @param baseFolder folder where the SDK is installed
41
     * @param baseFolder folder where the SDK is installed
42
     * @return true if the PlatformInstall recognizes the folder
42
     * @return true if the PlatformInstall recognizes the folder
43
     */
43
     */
44
    public abstract boolean accept(FileObject baseFolder);
44
    public abstract boolean accept(FileObject baseFolder);    
45
46
    /**
47
     * Returns the diaply name of the platform.
48
     * @return String, the diaplay name
49
     */
50
    public abstract String getDisplayName ();
51
45
52
}
46
}

Return to bug 61476