Class AbstractVMInstallType

  • All Implemented Interfaces:
    IExecutableExtension, IVMInstallType

    public abstract class AbstractVMInstallType
    extends Object
    implements IVMInstallType, IExecutableExtension
    Abstract implementation of a VM install type. Subclasses should implement
    • IVMInstall doCreateVMInstall(String id)
    • String getName()
    • IStatus validateInstallLocation(File installLocation)

    Clients implementing VM install types should subclass this class.

    • Constructor Detail

      • AbstractVMInstallType

        protected AbstractVMInstallType()
        Constructs a new VM install type.
    • Method Detail

      • getVMInstalls

        public IVMInstall[] getVMInstalls()
        Description copied from interface: IVMInstallType
        Returns all VM instances managed by this VM type.
        Specified by:
        getVMInstalls in interface IVMInstallType
        Returns:
        the list of VM instances managed by this VM type
      • disposeVMInstall

        public void disposeVMInstall​(String id)
        Description copied from interface: IVMInstallType
        Remove the VM associated with the given id from the set of VMs managed by this VM type. Has no effect if a VM with the given id is not currently managed by this type. A VM install that is disposed may not be used anymore.
        Specified by:
        disposeVMInstall in interface IVMInstallType
        Parameters:
        id - the id of the VM to be disposed.
      • doCreateVMInstall

        protected abstract IVMInstall doCreateVMInstall​(String id)
        Subclasses should return a new instance of the appropriate IVMInstall subclass from this method.
        Parameters:
        id - The vm's id. The IVMInstall instance that is created must return id from its getId() method. Must not be null.
        Returns:
        the newly created IVMInstall instance. Must not return null.
      • getId

        public String getId()
        Description copied from interface: IVMInstallType
        Returns the globally unique id of this VM type. Clients are responsible for providing a unique id.
        Specified by:
        getId in interface IVMInstallType
        Returns:
        the id of this IVMInstallType
      • getDefaultJavadocLocation

        public URL getDefaultJavadocLocation​(File installLocation)
        Returns a URL for the default javadoc location of a VM installed at the given home location, or null if none. The default implementation returns null, subclasses must override as appropriate.

        Note, this method would ideally be added to IVMInstallType, but it would have been a breaking API change between 2.0 and 2.1. Thus, it has been added to the abstract base class that VM install types should subclass.

        Parameters:
        installLocation - home location
        Returns:
        default javadoc location or null
        Since:
        2.1
      • getDefaultVMArguments

        public String getDefaultVMArguments​(File installLocation)
        Returns a string of default VM arguments for a VM installed at the given home location, or null if none. The default implementation returns null, subclasses must override as appropriate.

        Note, this method would ideally be added to IVMInstallType, but it would have been a breaking API change between 2.0 and 3.4. Thus, it has been added to the abstract base class that VM install types should subclass.

        Parameters:
        installLocation - home location
        Returns:
        default VM arguments or null if none
        Since:
        3.4