org.java.plugin.registry.xml
Class ExtensionPointImpl

java.lang.Object
  extended by org.java.plugin.registry.xml.ExtensionPointImpl
All Implemented Interfaces:
Documentable<ExtensionPoint>, ExtensionPoint, Identity, PluginElement<ExtensionPoint>, UniqueIdentity

public class ExtensionPointImpl
extends java.lang.Object
implements ExtensionPoint

Made public to get access to the ParameterDefinition
Made parameterDefinitionImpl.getValueParser() public

Version:
$Id$

Nested Class Summary
 class ExtensionPointImpl.ParameterDefinitionImpl
           
 
Nested classes/interfaces inherited from interface org.java.plugin.registry.ExtensionPoint
ExtensionPoint.ParameterDefinition
 
Field Summary
protected  org.apache.commons.logging.Log log
          Makes logging service available for descending classes.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 Extension getAvailableExtension(java.lang.String uniqueId)
           
 java.util.Collection<Extension> getAvailableExtensions()
          Returns a collection of all extensions that available for this point.
 Extension getConnectedExtension(java.lang.String uniqueId)
           
 java.util.Collection<Extension> getConnectedExtensions()
          Returns a collection of all extensions that was successfully "connected" to this point.
 PluginDescriptor getDeclaringPluginDescriptor()
          Returns plug-in descriptor, this element belongs to.
 PluginFragment getDeclaringPluginFragment()
          Returns descriptor of plug-in fragment that contributes this element.
 java.util.Collection<ExtensionPoint> getDescendants()
          Looks for all available (valid) successors of this extension point.
 java.lang.String getDocsPath()
           
 Documentation<T> getDocumentation()
           
 java.lang.String getId()
           
 ExtensionMultiplicity getMultiplicity()
           
 ExtensionPoint.ParameterDefinition getParameterDefinition(java.lang.String id)
           
 java.util.Collection<ExtensionPoint.ParameterDefinition> getParameterDefinitions()
          Returns collection of all top level parameter definitions declared in this extension point and all it parents.
 java.lang.String getParentExtensionPointId()
           
 java.lang.String getParentPluginId()
           
 java.lang.String getUniqueId()
           
 int hashCode()
           
protected  boolean isEqualTo(Identity idt)
           
 boolean isExtensionAvailable(java.lang.String uniqueId)
          Checks if extension is available for this extension point.
 boolean isExtensionConnected(java.lang.String uniqueId)
          Checks if extension is in valid state and successfully "connected" to this extension point.
 boolean isSuccessorOf(ExtensionPoint extensionPoint)
           
 boolean isValid()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.java.plugin.registry.Identity
getId
 
Methods inherited from interface org.java.plugin.registry.PluginElement
getDeclaringPluginDescriptor, getDeclaringPluginFragment
 
Methods inherited from interface org.java.plugin.registry.Identity
getId
 
Methods inherited from interface org.java.plugin.registry.Documentable
getDocsPath, getDocumentation
 

Field Detail

log

protected final org.apache.commons.logging.Log log
Makes logging service available for descending classes.

Method Detail

getUniqueId

public java.lang.String getUniqueId()
Specified by:
getUniqueId in interface UniqueIdentity
Returns:
unique ID of plug-in element
See Also:
UniqueIdentity.getUniqueId()

getMultiplicity

public ExtensionMultiplicity getMultiplicity()
Specified by:
getMultiplicity in interface ExtensionPoint
Returns:
multiplicity of this extension point
See Also:
ExtensionPoint.getMultiplicity()

getAvailableExtensions

public java.util.Collection<Extension> getAvailableExtensions()
Description copied from interface: ExtensionPoint
Returns a collection of all extensions that available for this point.

Specified by:
getAvailableExtensions in interface ExtensionPoint
Returns:
collection of Extension objects
See Also:
ExtensionPoint.getAvailableExtensions()

getAvailableExtension

public Extension getAvailableExtension(java.lang.String uniqueId)
Specified by:
getAvailableExtension in interface ExtensionPoint
Parameters:
uniqueId - unique ID of extension
Returns:
extension that is available for this point
See Also:
ExtensionPoint.getAvailableExtension( java.lang.String)

isExtensionAvailable

public boolean isExtensionAvailable(java.lang.String uniqueId)
Description copied from interface: ExtensionPoint
Checks if extension is available for this extension point. If this method returns true, the method ExtensionPoint.getAvailableExtension(String) should return valid extension for the same UID.

Specified by:
isExtensionAvailable in interface ExtensionPoint
Parameters:
uniqueId - unique ID of extension
Returns:
true if extension is available for this extension point
See Also:
ExtensionPoint.isExtensionAvailable( java.lang.String)

getConnectedExtensions

public java.util.Collection<Extension> getConnectedExtensions()
Description copied from interface: ExtensionPoint
Returns a collection of all extensions that was successfully "connected" to this point.

Specified by:
getConnectedExtensions in interface ExtensionPoint
Returns:
collection of Extension objects
See Also:
ExtensionPoint.getConnectedExtensions()

getConnectedExtension

public Extension getConnectedExtension(java.lang.String uniqueId)
Specified by:
getConnectedExtension in interface ExtensionPoint
Parameters:
uniqueId - unique ID of extension
Returns:
extension that was successfully "connected" to this point
See Also:
ExtensionPoint.getConnectedExtension( java.lang.String)

isExtensionConnected

public boolean isExtensionConnected(java.lang.String uniqueId)
Description copied from interface: ExtensionPoint
Checks if extension is in valid state and successfully "connected" to this extension point. If this method returns true, the method ExtensionPoint.getConnectedExtension(String) should return valid extension for the same UID.

Specified by:
isExtensionConnected in interface ExtensionPoint
Parameters:
uniqueId - unique ID of extension
Returns:
true if extension was successfully "connected" to this extension point
See Also:
ExtensionPoint.isExtensionConnected( java.lang.String)

isValid

public boolean isValid()
Specified by:
isValid in interface ExtensionPoint
Returns:
true if extension point is considered to be valid
See Also:
ExtensionPoint.isValid()

getParameterDefinitions

public java.util.Collection<ExtensionPoint.ParameterDefinition> getParameterDefinitions()
Description copied from interface: ExtensionPoint
Returns collection of all top level parameter definitions declared in this extension point and all it parents.

Specified by:
getParameterDefinitions in interface ExtensionPoint
Returns:
collection of ExtensionPoint.ParameterDefinition objects
See Also:
ExtensionPoint.getParameterDefinitions()

getParameterDefinition

public ExtensionPoint.ParameterDefinition getParameterDefinition(java.lang.String id)
Specified by:
getParameterDefinition in interface ExtensionPoint
Parameters:
id - ID of parameter definition to look for
Returns:
parameter definition with given ID
See Also:
ExtensionPoint.getParameterDefinition( java.lang.String)

getParentPluginId

public java.lang.String getParentPluginId()
Specified by:
getParentPluginId in interface ExtensionPoint
Returns:
parent extension point plug-in ID or null
See Also:
ExtensionPoint.getParentPluginId()

getParentExtensionPointId

public java.lang.String getParentExtensionPointId()
Specified by:
getParentExtensionPointId in interface ExtensionPoint
Returns:
parent extension point ID or null
See Also:
ExtensionPoint.getParentExtensionPointId()

isSuccessorOf

public boolean isSuccessorOf(ExtensionPoint extensionPoint)
Specified by:
isSuccessorOf in interface ExtensionPoint
Parameters:
extensionPoint - extension point
Returns:
true if this point is successor of given extension point
See Also:
ExtensionPoint.isSuccessorOf( org.java.plugin.registry.ExtensionPoint)

getDescendants

public java.util.Collection<ExtensionPoint> getDescendants()
Description copied from interface: ExtensionPoint
Looks for all available (valid) successors of this extension point. The search should be done recursively including all descendants of this extension point.

Specified by:
getDescendants in interface ExtensionPoint
Returns:
collection of ExtensionPoint objects
See Also:
ExtensionPoint.getDescendants()

toString

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

isEqualTo

protected boolean isEqualTo(Identity idt)
See Also:
IdentityImpl.isEqualTo( org.java.plugin.registry.Identity)

getDeclaringPluginDescriptor

public PluginDescriptor getDeclaringPluginDescriptor()
Description copied from interface: PluginElement
Returns plug-in descriptor, this element belongs to. This method should never return null.

Specified by:
getDeclaringPluginDescriptor in interface PluginElement<T extends PluginElement<T>>
Returns:
plug-in descriptor, this element belongs to
See Also:
PluginElement.getDeclaringPluginDescriptor()

getDeclaringPluginFragment

public PluginFragment getDeclaringPluginFragment()
Description copied from interface: PluginElement
Returns descriptor of plug-in fragment that contributes this element. This method may return null, if element is contributed by plug-in directly.

Specified by:
getDeclaringPluginFragment in interface PluginElement<T extends PluginElement<T>>
Returns:
descriptor of plug-in fragment that contributes this element
See Also:
PluginElement.getDeclaringPluginFragment()

getDocumentation

public Documentation<T> getDocumentation()
Specified by:
getDocumentation in interface Documentable<T extends PluginElement<T>>
Returns:
plug-in element documentation object or null if there is no documentation provided
See Also:
Documentable.getDocumentation()

getDocsPath

public java.lang.String getDocsPath()
Specified by:
getDocsPath in interface Documentable<T extends PluginElement<T>>
Returns:
path to documentation "home", it is used for resolving documentation references
See Also:
Documentable.getDocsPath()

getId

public java.lang.String getId()
Specified by:
getId in interface Identity
Returns:
ID of plug-in manifest element
See Also:
Identity.getId()

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()


Copyright © 2010. All Rights Reserved.