Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.2)

E13403-10


oracle.ide
Class AddinManager

java.lang.Object
  extended by oracle.ide.AddinManager

All Implemented Interfaces:
Addin

public abstract class AddinManager
extends java.lang.Object
implements Addin

The AddinManager class is responsible for loading addins to the IDE. The most common use of the AddinManager for Addin developers is to obtain an instance of an Addin.

Example:

 AddinManager am = AddinManager.getAddinManager();
 Addin myAddin = am.getAddin("oracle.jdeveloper.cm.dt.ConnectionAddin");
 try
 {
   ConnectionAddin ca = (ConnectionAddin) myAddin;
   ca.someMethodOnMyAddin();
 }
 catch (ClassCastException ex)
 {
   handleError(ex);
 }
 
See Also:
Addin

Constructor Summary
AddinManager()
           

 

Method Summary
abstract
<T extends Addin>
T
getAddin(java.lang.Class<T> clazz)
          Returns the Addin instance for the given class name.
abstract  Addin getAddin(java.lang.String className)
          Returns the first addin whose class is assignable from the given class name.
static AddinManager getAddinManager()
          Returns the AddinManager.
abstract  java.lang.String getCommand(int commandID, java.lang.String defaultCommand)
          Deprecated. since 11.1.1 with no replacement. This API provides access to commands registered through addins.properties, a mechanism that has been obsolete since 9.0.5.
abstract  java.lang.String getCommand(java.lang.String commandName, java.lang.String defaultCommand)
          Deprecated. since 11.1.1 with no replacement. This API provides access to commands registered through addins.properties, a mechanism that has been obsolete since 9.0.5.
abstract  Extension getExtensionForAddin(Addin addin)
          Returns the Extension containing the specified Addin.
 java.lang.String getExtensionIDForAddin(java.lang.Class addinClass)
          Returns the id of the extension which registered the specified addin class.
 java.net.URL getExtensionUserHomeURL(java.lang.String extensionID)
          Deprecated. use ExtensionRegistry.getSystemDirectory( String ).
abstract  java.util.Properties getProductProperties()
          Deprecated. addins.properties no longer exists, so this method always returns an empty Properties object. A custom hook handler should be used in the extension manifest to extend the product.
abstract  void initAddinLoadset(java.lang.String loadsetName)
          Initializes addins in a load set.
protected abstract  void initProductAndUserAddins()
          Creates and initializes the addins recorded in the file addins.xml and addins-user.xml.
abstract  boolean isRegisteredAddin(java.lang.String addinClass)
          Determine whether the specified addin class is registered.
abstract  boolean registerAddin(java.lang.String clazz)
          Deprecated. addins should not be registered programmatically. They should be declared in an extension manifest.
static void setAddinManager(AddinManager addinManager)
          Publishes the specified AddinManager as the active instance in the IDE.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Methods inherited from interface oracle.ide.Addin
initialize

 

Constructor Detail

AddinManager

public AddinManager()

Method Detail

getAddinManager

public static AddinManager getAddinManager()
Returns the AddinManager.
Returns:
the addin manager instance.

setAddinManager

public static void setAddinManager(AddinManager addinManager)
Publishes the specified AddinManager as the active instance in the IDE. This method is intended for developers building custom products based on the IDE.

Extension developers should not call this method.

Parameters:
addinManager - the addin manager implementation.

getAddin

public abstract <T extends Addin> T getAddin(java.lang.Class<T> clazz)
Returns the Addin instance for the given class name. The class must be an addin implementation class.

If an exact match on clazz is not found then it will try subclasses if and only if clazz is an interface.

Parameters:
clazz - The class name of the Addin to return.
Returns:
The instance of the requested Addin if it exists, otherwise null
Throws:
java.lang.NullPointerException - if clazz is null

registerAddin

public abstract boolean registerAddin(java.lang.String clazz)
Deprecated. addins should not be registered programmatically. They should be declared in an extension manifest.
Registers an Addin with the AddinManager. The addin class clazz will be loaded, and then the Addin method initialize will be invoked on the newly created addin. An Addin or other class can use this method to register addins after the IDE has already started up. The AddinManager will be responsible for the shutdown notification to the newly registered Addin when the IDE is exiting.
Parameters:
clazz - The class name of the Addin to register
See Also:
Addin

getAddin

public abstract Addin getAddin(java.lang.String className)
Returns the first addin whose class is assignable from the given class name.
Returns:
an Addin whose class matches exactly the provided classname, wil return null if a match is not found.
Throws:
java.lang.NullPointerException - if classname is null

getExtensionUserHomeURL

public final java.net.URL getExtensionUserHomeURL(java.lang.String extensionID)
Deprecated. use ExtensionRegistry.getSystemDirectory( String ).
Gets the extension user home url for the specified extension ID. The extension user home is a directory located in the system directory and named using the extension ID with the extension version appended.
Parameters:
extensionID - the id of an installed extension.
Returns:
the url of the extension user home, or null if the extension is not recognized.

initProductAndUserAddins

protected abstract void initProductAndUserAddins()
Creates and initializes the addins recorded in the file addins.xml and addins-user.xml. Extension developers should not call this method. It is part of the internal implementation of the IDE.

initAddinLoadset

public abstract void initAddinLoadset(java.lang.String loadsetName)
Initializes addins in a load set. Load sets are defined as named groups of addins in the extension manifest. Addins in a loadset are not initialized with normal addins - usually they are lazily initialized by some feature in the IDE calling the initAddinLoadset( ) method.
Parameters:
loadsetName - the name of the loadset used in the extension manifest. Must not be null.

getProductProperties

public abstract java.util.Properties getProductProperties()
Deprecated. addins.properties no longer exists, so this method always returns an empty Properties object. A custom hook handler should be used in the extension manifest to extend the product.
Load the addins.properties file. To obtain addin property information
Returns:
the properties file. null empty if file has not been loaded and parsed.

getCommand

public abstract java.lang.String getCommand(java.lang.String commandName,
                                            java.lang.String defaultCommand)
Deprecated. since 11.1.1 with no replacement. This API provides access to commands registered through addins.properties, a mechanism that has been obsolete since 9.0.5.

getCommand

public abstract java.lang.String getCommand(int commandID,
                                            java.lang.String defaultCommand)
Deprecated. since 11.1.1 with no replacement. This API provides access to commands registered through addins.properties, a mechanism that has been obsolete since 9.0.5.

getExtensionForAddin

public abstract Extension getExtensionForAddin(Addin addin)
Returns the Extension containing the specified Addin.
Parameters:
addin -
Returns:
the Extension containing the specified Addin.

getExtensionIDForAddin

public final java.lang.String getExtensionIDForAddin(java.lang.Class addinClass)
Returns the id of the extension which registered the specified addin class.
Parameters:
addinClass - an addin class.
Returns:
the id of the extension which registered it, or null if not found.
Since:
11.1.1.0.0

isRegisteredAddin

public abstract boolean isRegisteredAddin(java.lang.String addinClass)
Determine whether the specified addin class is registered.
Parameters:
addinClass - the fully qualified class name of an addin. Must not be null.
Returns:
true if the specified addin class has been registered.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.2)

E13403-10


Copyright © 1997, 2013, Oracle. All rights reserved.