Package org.java.plugin.tools.mocks
Class MockExtensionPoint
java.lang.Object
org.java.plugin.tools.mocks.MockIdentity
org.java.plugin.tools.mocks.MockPluginElement<ExtensionPoint>
org.java.plugin.tools.mocks.MockExtensionPoint
- All Implemented Interfaces:
Documentable<ExtensionPoint>,ExtensionPoint,Identity,PluginElement<ExtensionPoint>,UniqueIdentity
- Version:
- $Id$
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.java.plugin.registry.ExtensionPoint
ExtensionPoint.ParameterDefinition -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddExtension(Extension extension, boolean isConnected) addParameter(ExtensionPoint extensionPoint) addParameterDefinition(ExtensionPoint.ParameterDefinition parameterDefinition) addPredecessors(String pluginId, String extensionPointId) getAvailableExtension(String uniqueId) Returns a collection of all extensions that available for this point.getConnectedExtension(String uniqueId) Returns a collection of all extensions that was successfully "connected" to this point.Looks for all available (valid) successors of this extension point.Returns collection of all top level parameter definitions declared in this extension point and all it parents.booleanisExtensionAvailable(String uniqueId) Checks if extension is available for this extension point.booleanisExtensionConnected(String uniqueId) Checks if extension is in valid state and successfully "connected" to this extension point.booleanisSuccessorOf(ExtensionPoint extensionPoint) booleanisValid()setParentExtensionPoint(String pluginId, String extensionPointId) setValid(boolean value) Methods inherited from class org.java.plugin.tools.mocks.MockPluginElement
getDeclaringPluginDescriptor, getDeclaringPluginFragment, getDocsPath, getDocumentation, setDeclaringPluginDescriptor, setDeclaringPluginFragment, setDocsPath, setDocumentationMethods inherited from class org.java.plugin.tools.mocks.MockIdentity
getId, setIdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.java.plugin.registry.Documentable
getDocsPath, getDocumentationMethods inherited from interface org.java.plugin.registry.PluginElement
getDeclaringPluginDescriptor, getDeclaringPluginFragment
-
Constructor Details
-
MockExtensionPoint
public MockExtensionPoint()
-
-
Method Details
-
getAvailableExtension
- Specified by:
getAvailableExtensionin interfaceExtensionPoint- Parameters:
uniqueId- unique ID of extension- Returns:
- extension that is available for this point
- See Also:
-
getAvailableExtensions
Description copied from interface:ExtensionPointReturns a collection of all extensions that available for this point.- Specified by:
getAvailableExtensionsin interfaceExtensionPoint- Returns:
- collection of
Extensionobjects - See Also:
-
getConnectedExtension
- Specified by:
getConnectedExtensionin interfaceExtensionPoint- Parameters:
uniqueId- unique ID of extension- Returns:
- extension that was successfully "connected" to this point
- See Also:
-
getConnectedExtensions
Description copied from interface:ExtensionPointReturns a collection of all extensions that was successfully "connected" to this point.- Specified by:
getConnectedExtensionsin interfaceExtensionPoint- Returns:
- collection of
Extensionobjects - See Also:
-
addExtension
- Parameters:
extension- extension to addisConnected- iftrueextension will be marked as "connected" also- Returns:
- this instance
-
getDescendants
Description copied from interface:ExtensionPointLooks for all available (valid) successors of this extension point. The search should be done recursively including all descendants of this extension point.- Specified by:
getDescendantsin interfaceExtensionPoint- Returns:
- collection of
ExtensionPointobjects - See Also:
-
addParameter
- Parameters:
extensionPoint- descendant extension to add- Returns:
- this instance
-
getMultiplicity
- Specified by:
getMultiplicityin interfaceExtensionPoint- Returns:
- multiplicity of this extension point
- See Also:
-
setMultiplicity
- Parameters:
value- the multiplicity to set- Returns:
- this instance
-
getParameterDefinition
- Specified by:
getParameterDefinitionin interfaceExtensionPoint- Parameters:
id- ID of parameter definition to look for- Returns:
- parameter definition with given ID
- See Also:
-
getParameterDefinitions
Description copied from interface:ExtensionPointReturns collection of all top level parameter definitions declared in this extension point and all it parents.- Specified by:
getParameterDefinitionsin interfaceExtensionPoint- Returns:
- collection of
ExtensionPoint.ParameterDefinitionobjects - See Also:
-
addParameterDefinition
public MockExtensionPoint addParameterDefinition(ExtensionPoint.ParameterDefinition parameterDefinition) - Parameters:
parameterDefinition- parameter definition to add- Returns:
- this instance
-
getParentExtensionPointId
- Specified by:
getParentExtensionPointIdin interfaceExtensionPoint- Returns:
- parent extension point ID or
null - See Also:
-
setParentExtensionPoint
- Parameters:
pluginId- the parent plug-in id to setextensionPointId- the parent extension point id to set- Returns:
- this instance
-
getParentPluginId
- Specified by:
getParentPluginIdin interfaceExtensionPoint- Returns:
- parent extension point plug-in ID or
null - See Also:
-
isExtensionAvailable
Description copied from interface:ExtensionPointChecks if extension is available for this extension point. If this method returnstrue, the methodExtensionPoint.getAvailableExtension(String)should return valid extension for the same UID.- Specified by:
isExtensionAvailablein interfaceExtensionPoint- Parameters:
uniqueId- unique ID of extension- Returns:
trueif extension is available for this extension point- See Also:
-
isExtensionConnected
Description copied from interface:ExtensionPointChecks if extension is in valid state and successfully "connected" to this extension point. If this method returnstrue, the methodExtensionPoint.getConnectedExtension(String)should return valid extension for the same UID.- Specified by:
isExtensionConnectedin interfaceExtensionPoint- Parameters:
uniqueId- unique ID of extension- Returns:
trueif extension was successfully "connected" to this extension point- See Also:
-
isSuccessorOf
- Specified by:
isSuccessorOfin interfaceExtensionPoint- Parameters:
extensionPoint- extension point- Returns:
trueif this point is successor of given extension point- See Also:
-
addPredecessors
- Parameters:
pluginId- predecessor plug-in ID to addextensionPointId- predecessor extension point ID to add- Returns:
- this instance
-
isValid
public boolean isValid()- Specified by:
isValidin interfaceExtensionPoint- Returns:
trueif extension point is considered to be valid- See Also:
-
setValid
- Parameters:
value- the valid flag to set- Returns:
- this instance
-
getUniqueId
- Specified by:
getUniqueIdin interfaceUniqueIdentity- Returns:
- unique ID of plug-in element
- See Also:
-