org.netbeans.modules.java.platform/1 1.21.1

org.netbeans.spi.java.platform
Class GeneralPlatformInstall

java.lang.Object
  extended by org.netbeans.spi.java.platform.GeneralPlatformInstall
Direct Known Subclasses:
CustomPlatformInstall, PlatformInstall

public abstract class GeneralPlatformInstall
extends Object

An super class of all the platform installers. You never subclass directly this class but either the CustomPlatformInstall or PlatformInstall

The PlatformInstall or CustomPlatformInstall instances should be registered in the org-netbeans-api-java/platform/installers folder on the system filesystem.

Registration example:

 @ServiceProvider(
    service=GeneralPlatformInstall.class,
    path="org-netbeans-api-java/platform/installers"
 )
 public final class MyPlatformInstall extends PlatformInstall {
 ...
 }
 

After the createIterator is finished, a platform definition file shall be created at "Services/Platforms/org-netbeans-api-java-Platform" folder:

 public java.util.Set instantiate() throws IOException {
     MyPlatform p = new MyPlatform();
     p.setDisplayName(theName);
     p.setVendor(theVendor);
     InstanceDataObject.create(
         DataFolder.findFolder(FileUtil.getConfigFile("Services/Platforms/org-netbeans-api-java-Platform")),
         theName,
         p,
         null,
         true);
     return Collections.singleton(p);
 }
 

The platform definition file has to represent the JavaPlatform instance. This can be done in many ways. For example using the ConvertAsJavaBean annotation:

 @ConvertAsJavaBean
 public static class MyPlatform extends JavaPlatform {
     ...
 }
 

Since:
1.5

Method Summary
abstract  String getDisplayName()
          Gets the display name of the platform installer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDisplayName

public abstract String getDisplayName()
Gets the display name of the platform installer. If the platform type has a single installer the display name should correspond to the platform name. If there are more installers for a single platform type the display name should also describe the installation process.

Returns:
the display name

org.netbeans.modules.java.platform/1 1.21.1

Built on December 5 2011.  |  Portions Copyright 1997-2011 Sun Microsystems, Inc. All rights reserved.