com.softwareag.cis.plugin.registry
Class Extension

java.lang.Object
  extended by com.softwareag.cis.plugin.registry.Extension

public class Extension
extends java.lang.Object


Constructor Summary
Extension(PlugIn plugIn, java.lang.String localId)
          Create new instance.
 
Method Summary
 void clear()
          This method clears obsolete references once the PlugInRegistry is no more needed.
 java.lang.String getExtensionClass()
          Obtains the class name which should be loaded
 int getExtensionDependencyOrder()
          Order of the extension in respect to respective plug-in dependency position.
 java.lang.String getExtensionId()
          Get the extension id
 int getExtensionOrder()
          Obtains the order in which the extension should be loaded (as specified in the plug-in descriptor)
 java.lang.String getExtensionPoint()
          Get extension point to which this extension provides implementation
 java.lang.Object getInstance()
          Get instance of this extension.
 PlugIn getPlugIn()
          Get plug-in this extension implementation belongs to
 java.util.Map<java.lang.String,java.lang.String> getProperties()
           
 java.lang.String getProperty(java.lang.String name)
          Obtains some information by given name
 void setExtensionClass(java.lang.String extensionClass)
          Set the class which should be loaded
 void setExtensionId(java.lang.String extensionId)
          Set an unique extension identifier (name)
 void setExtensionOrder(int extensionOrder)
          Set the order in which the extension should be loaded
 void setExtensionPoint(java.lang.String extensionPoint)
          Set the extension point to which this extension provides implementation
 void setProperty(java.lang.String name, java.lang.String value)
          Add new resource of some information which should be used by the plug-in This allows to store and use some additional information at runtime
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Extension

public Extension(PlugIn plugIn,
                 java.lang.String localId)
Create new instance.

Parameters:
plugIn - for the given plug-in
localId - extension point id
Method Detail

getExtensionClass

public java.lang.String getExtensionClass()
Obtains the class name which should be loaded

Returns:
the String extension class name

setExtensionClass

public void setExtensionClass(java.lang.String extensionClass)
Set the class which should be loaded

Parameters:
extensionClass - FQN of the extension class

getExtensionOrder

public int getExtensionOrder()
Obtains the order in which the extension should be loaded (as specified in the plug-in descriptor)


setExtensionOrder

public void setExtensionOrder(int extensionOrder)
Set the order in which the extension should be loaded


getExtensionDependencyOrder

public int getExtensionDependencyOrder()
Order of the extension in respect to respective plug-in dependency position.


getExtensionId

public java.lang.String getExtensionId()
Get the extension id


setExtensionId

public void setExtensionId(java.lang.String extensionId)
Set an unique extension identifier (name)

Parameters:
extensionId - the Id of the Plug-In

getExtensionPoint

public java.lang.String getExtensionPoint()
Get extension point to which this extension provides implementation


setExtensionPoint

public void setExtensionPoint(java.lang.String extensionPoint)
Set the extension point to which this extension provides implementation


getPlugIn

public PlugIn getPlugIn()
Get plug-in this extension implementation belongs to


getProperties

public java.util.Map<java.lang.String,java.lang.String> getProperties()

setProperty

public void setProperty(java.lang.String name,
                        java.lang.String value)
Add new resource of some information which should be used by the plug-in This allows to store and use some additional information at runtime

Parameters:
name - the name of the property
value - the current value of the resource

getProperty

public java.lang.String getProperty(java.lang.String name)
Obtains some information by given name


getInstance

public java.lang.Object getInstance()
                             throws java.lang.Exception
Get instance of this extension.

Returns:
instance of implementation class
Throws:
java.lang.Exception

clear

public void clear()
This method clears obsolete references once the PlugInRegistry is no more needed. Especially, it clears the reference to the plugIn. Most important use case: assert that references to I18N extensions held by I18NManager do not keep references to application objects via PlugIn / PlugInRegistry / ...


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object