Class InstalledBundleObject

    • Constructor Detail

      • InstalledBundleObject

        protected InstalledBundleObject​(PluginBundle bundle)
                                 throws java.io.IOException
        Creates a new bundle object for the specified bundle. The bundle's root file will be loaded, so it will be available to the constructors of concrete subclasses via getPluginRoot().
        Parameters:
        bundle - the bundle file
        Throws:
        java.io.IOException - if an I/O error occurs while loading the plug-in root
    • Method Detail

      • getBundle

        public PluginBundle getBundle()
        Returns the bundle that this was loaded from, or null if this represents a built-in plug-in.
        Returns:
        the source bundle, or null
      • getPluginRoot

        public PluginRoot getPluginRoot()
        Returns the bundle's root file, or null if it does not have a root file.
        Returns:
        the root file of the source bundle, or null
      • getCatalogID

        public CatalogID getCatalogID()
        Returns the CatalogID for the source bundle, or null if the bundle's root file does not specify an id (or there is no bundle).
        Returns:
        the bundle's ID, or null
      • getPriority

        public int getPriority()
        Returns the startup priority in the bundle's root file, or PluginRoot.PRIORITY_DEFAULT if none is specified.
        Returns:
        the plug-in's start priority
      • getName

        public abstract java.lang.String getName()
        Returns the name of the plug-in (or other bundle object). If necessary, a new instance of the plug-in will be created temporarily in order to get this information.
        Returns:
        the name reported by the plug-in
      • getDescription

        public abstract java.lang.String getDescription()
        Returns a description of the plug-in (or other bundle object). If necessary, a new instance of the plug-in will be created temporarily in order to get this information.
        Returns:
        the description reported by the plug-in
      • getIcon

        public abstract ThemedIcon getIcon()
        Returns an icon for the plug-in (or other bundle object). If the plug-in has a representative image, an icon is returned based on that image. Otherwise, a generic icon is returned based on the type of plug-in bundle.
        Specified by:
        getIcon in interface IconProvider
        Returns:
        an icon for the plug-in
      • getRepresentativeImage

        @Deprecated
        public final java.awt.image.BufferedImage getRepresentativeImage()
        Deprecated.
        Returns the representative image of the plug-in. If necessary, a new instance of the plug-in will be created temporarily in order to get this information.
        Returns:
        the representative name reported by the plug-in (may be null)
      • isUpdatePending

        public boolean isUpdatePending()
        Returns true if there is an update pending for this plug-in. A pending update is an updated version of the plug-in that will be installed automatically the next time the application starts.
        Returns:
        true if an update is pending
      • isUninstallPending

        public boolean isUninstallPending()
        Returns true if this plug-in's bundle has been marked for uninstallation. (The plug-in's bundle will be deleted the next time the application starts.)
        Returns:
        true if the plug-in will be uninstalled
      • toString

        public java.lang.String toString()
        Returns the name of the object.
        Overrides:
        toString in class java.lang.Object
        Returns:
        the value of getName()
      • markFailed

        protected final void markFailed()
        Marks the bundle for this object as having failed. Subclasses call this when the specific bundle object fails to load or start correctly. If this object has a catalog ID, then the UUID associated with that ID is marked as having failed to start correctly. The BundleInstaller maintains a set of all of the failed bundles.
        See Also:
        BundleInstaller.getFailedUUIDs()