Index: CustomPlatformInstall.java =================================================================== RCS file: CustomPlatformInstall.java diff -N CustomPlatformInstall.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ CustomPlatformInstall.java 16 Aug 2005 15:38:59 -0000 @@ -0,0 +1,40 @@ +/* + * Sun Public License Notice + * + * The contents of this file are subject to the Sun Public License + * Version 1.0 (the "License"). You may not use this file except in + * compliance with the License. A copy of the License is available at + * http://www.sun.com/ + * + * The Original Code is NetBeans. The Initial Developer of the Original + * Code is Sun Microsystems, Inc. Portions Copyright 1997-2005 Sun + * Microsystems, Inc. All Rights Reserved. + */ + +package org.netbeans.spi.java.platform; + +import org.openide.WizardDescriptor; + + +/** + * Defines an API for registering custom Java platform installer. The installer + * is responsible for instantiation of {@link JavaPlatform} through the provided + * TemplateWizard.Iterator. If your installer selects the platform on the local disk you + * probably don't want to use this class, the {@link PlatformInstall} class + * creates an platform chooser for you. You want to use this class if the + * platform is not on the local disk, eg. you want to download it from the web. + * @author Tomas Zezula + * @since 1.5 + */ +public abstract class CustomPlatformInstall extends GeneralPlatformInstall { + + /** + * Returns the {@link WizardDescriptor#InstantiatingIterator} used to install + * the platform. + * @return TemplateWizard.Iterator instance responsible for instantiating + * the platform. The instantiate method of the returned iterator should + * return the Set containing the created JavaPlatform. + */ + public abstract WizardDescriptor.InstantiatingIterator createIterator(); + +} Index: GeneralPlatformInstall.java =================================================================== RCS file: GeneralPlatformInstall.java diff -N GeneralPlatformInstall.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ GeneralPlatformInstall.java 16 Aug 2005 15:38:59 -0000 @@ -0,0 +1,35 @@ +/* + * Sun Public License Notice + * + * The contents of this file are subject to the Sun Public License + * Version 1.0 (the "License"). You may not use this file except in + * compliance with the License. A copy of the License is available at + * http://www.sun.com/ + * + * The Original Code is NetBeans. The Initial Developer of the Original + * Code is Sun Microsystems, Inc. Portions Copyright 1997-2005 Sun + * Microsystems, Inc. All Rights Reserved. + */ + +package org.netbeans.spi.java.platform; + +/** + * An super class of all the platform installers. You never subclass directly + * this class but either the {@link CustomPlatformInstall} or {@link PlatformInstall} + * @author Tomas Zezula + * @since 1.5 + */ +public abstract class GeneralPlatformInstall { + + + + GeneralPlatformInstall() { + } + + /** + * Returns the diaply name of the platform installer + * @return String, the diaplay name + */ + public abstract String getDisplayName (); + +} Index: PlatformInstall.java =================================================================== RCS file: /cvs/java/platform/src/org/netbeans/spi/java/platform/PlatformInstall.java,v retrieving revision 1.5 diff -u -r1.5 PlatformInstall.java --- PlatformInstall.java 16 Jun 2004 15:07:23 -0000 1.5 +++ PlatformInstall.java 16 Aug 2005 15:38:59 -0000 @@ -23,7 +23,7 @@ * * @author Svata Dedic, Tomas Zezula */ -public abstract class PlatformInstall { +public abstract class PlatformInstall extends GeneralPlatformInstall { /** * Determines whether the Recognizer recognizes a Java Platform in * the passed folder. The check done by this method should be quick @@ -41,12 +41,6 @@ * @param baseFolder folder where the SDK is installed * @return true if the PlatformInstall recognizes the folder */ - public abstract boolean accept(FileObject baseFolder); - - /** - * Returns the diaply name of the platform. - * @return String, the diaplay name - */ - public abstract String getDisplayName (); + public abstract boolean accept(FileObject baseFolder); }