JPF 1.5.1

org.java.plugin.tools.mocks
Class MockExtension

java.lang.Object
  extended by org.java.plugin.tools.mocks.MockIdentity
      extended by org.java.plugin.tools.mocks.MockPluginElement<Extension>
          extended by org.java.plugin.tools.mocks.MockExtension
All Implemented Interfaces:
Documentable<Extension>, Extension, Identity, PluginElement<Extension>, UniqueIdentity

public class MockExtension
extends MockPluginElement<Extension>
implements Extension

Version:
$Id$

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.java.plugin.registry.Extension
Extension.Parameter
 
Constructor Summary
MockExtension()
          No-arguments constructor.
MockExtension(java.lang.String id)
           
MockExtension(java.lang.String id, PluginDescriptor declaringPluginDescriptor)
           
 
Method Summary
 MockExtension addParameter(Extension.Parameter parameter)
           
 java.lang.String getExtendedPluginId()
           
 java.lang.String getExtendedPointId()
           
 Extension.Parameter getParameter(java.lang.String id)
          Returns top level parameter with given ID or null if no top level parameters exist.
 java.util.Collection<Extension.Parameter> getParameters()
          Returns collection of all top level parameters defined in this extension.
 java.util.Collection<Extension.Parameter> getParameters(java.lang.String id)
           
 java.lang.String getUniqueId()
           
 boolean isValid()
           
 MockExtension setExtendedPluginId(java.lang.String value)
           
 MockExtension setExtendedPointId(java.lang.String value)
           
 MockExtension setValid(boolean value)
           
 
Methods inherited from class org.java.plugin.tools.mocks.MockPluginElement
getDeclaringPluginDescriptor, getDeclaringPluginFragment, getDocsPath, getDocumentation, setDeclaringPluginDescriptor, setDeclaringPluginFragment, setDocsPath, setDocumentation
 
Methods inherited from class org.java.plugin.tools.mocks.MockIdentity
getId, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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
 

Constructor Detail

MockExtension

public MockExtension()
No-arguments constructor.


MockExtension

public MockExtension(java.lang.String id)
Parameters:
id - extension ID

MockExtension

public MockExtension(java.lang.String id,
                     PluginDescriptor declaringPluginDescriptor)
Parameters:
id - extension ID
declaringPluginDescriptor - declaring plug-in descriptor
Method Detail

getExtendedPluginId

public java.lang.String getExtendedPluginId()
Specified by:
getExtendedPluginId in interface Extension
Returns:
ID of plug-in, extended point belongs to
See Also:
Extension.getExtendedPluginId()

setExtendedPluginId

public MockExtension setExtendedPluginId(java.lang.String value)
Parameters:
value - the extended plug-in id to set
Returns:
this instance

getExtendedPointId

public java.lang.String getExtendedPointId()
Specified by:
getExtendedPointId in interface Extension
Returns:
ID of extended point
See Also:
Extension.getExtendedPointId()

setExtendedPointId

public MockExtension setExtendedPointId(java.lang.String value)
Parameters:
value - the extended point id to set
Returns:
this instance

getParameter

public Extension.Parameter getParameter(java.lang.String id)
Description copied from interface: Extension
Returns top level parameter with given ID or null if no top level parameters exist. If more than one top level parameters with given ID found, the method should throw an IllegalArgumentException.

Specified by:
getParameter in interface Extension
Parameters:
id - ID of parameter to look for
Returns:
top level parameter with given ID
See Also:
Extension.getParameter(java.lang.String)

getParameters

public java.util.Collection<Extension.Parameter> getParameters()
Description copied from interface: Extension
Returns collection of all top level parameters defined in this extension.

Specified by:
getParameters in interface Extension
Returns:
collection of Extension.Parameter objects
See Also:
Extension.getParameters()

getParameters

public java.util.Collection<Extension.Parameter> getParameters(java.lang.String id)
Specified by:
getParameters in interface Extension
Parameters:
id - ID of parameter to look for
Returns:
collection of all top level parameters with given ID
See Also:
Extension.getParameters(java.lang.String)

addParameter

public MockExtension addParameter(Extension.Parameter parameter)
Parameters:
parameter - parameter to add
Returns:
this instance

isValid

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

setValid

public MockExtension setValid(boolean value)
Parameters:
value - the valid flag to set
Returns:
this instance

getUniqueId

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

JPF 1.5.1

Copyright © 2004-2007 Dmitry Olshansky. All Rights Reserved.