Package org.java.plugin.tools.mocks
Class MockPluginFragment
- java.lang.Object
-
- org.java.plugin.tools.mocks.MockIdentity
-
- org.java.plugin.tools.mocks.MockPluginFragment
-
- All Implemented Interfaces:
Documentable<PluginFragment>
,Identity
,PluginFragment
,UniqueIdentity
public class MockPluginFragment extends MockIdentity implements PluginFragment
- Version:
- $Id$
-
-
Constructor Summary
Constructors Constructor Description MockPluginFragment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDocsPath()
Documentation<PluginFragment>
getDocumentation()
java.net.URL
getLocation()
MatchingRule
getMatchingRule()
java.lang.String
getPluginId()
Version
getPluginVersion()
PluginRegistry
getRegistry()
java.lang.String
getUniqueId()
java.lang.String
getVendor()
Version
getVersion()
boolean
matches(PluginDescriptor descr)
Checks is this fragment may contribute to given plug-in.MockPluginFragment
setDocsPath(java.lang.String value)
MockPluginFragment
setDocumentation(Documentation<PluginFragment> value)
MockPluginFragment
setLocation(java.net.URL value)
MockPluginFragment
setMatchingRule(MatchingRule value)
MockPluginFragment
setPluginId(java.lang.String value)
MockPluginFragment
setPluginVersion(Version value)
MockPluginFragment
setRegistry(PluginRegistry value)
MockPluginFragment
setVendor(java.lang.String value)
MockPluginFragment
setVersion(Version value)
-
Methods inherited from class org.java.plugin.tools.mocks.MockIdentity
getId, setId
-
-
-
-
Method Detail
-
getLocation
public java.net.URL getLocation()
- Specified by:
getLocation
in interfacePluginFragment
- Returns:
- location from which this fragment was registered
- See Also:
PluginFragment.getLocation()
-
setLocation
public MockPluginFragment setLocation(java.net.URL value)
- Parameters:
value
- the location to set- Returns:
- this instance
-
getPluginId
public java.lang.String getPluginId()
- Specified by:
getPluginId
in interfacePluginFragment
- Returns:
- ID of plug-in to which this fragment may contribute
- See Also:
PluginFragment.getPluginId()
-
setPluginId
public MockPluginFragment setPluginId(java.lang.String value)
- Parameters:
value
- the plug-in ID to set- Returns:
- this instance
-
getPluginVersion
public Version getPluginVersion()
- Specified by:
getPluginVersion
in interfacePluginFragment
- Returns:
- version identifier of plug-in to which this fragment may
contribute or
null
if no version specified in manifest - See Also:
PluginFragment.getPluginVersion()
-
setPluginVersion
public MockPluginFragment setPluginVersion(Version value)
- Parameters:
value
- the plug-in version to set- Returns:
- this instance
-
getRegistry
public PluginRegistry getRegistry()
- Specified by:
getRegistry
in interfacePluginFragment
- Returns:
- plug-ins registry
- See Also:
PluginFragment.getRegistry()
-
setRegistry
public MockPluginFragment setRegistry(PluginRegistry value)
- Parameters:
value
- the registry to set- Returns:
- this instance
-
getVendor
public java.lang.String getVendor()
- Specified by:
getVendor
in interfacePluginFragment
- Returns:
- vendor as specified in manifest file or empty string
- See Also:
PluginFragment.getVendor()
-
setVendor
public MockPluginFragment setVendor(java.lang.String value)
- Parameters:
value
- the vendor to set- Returns:
- this instance
-
getVersion
public Version getVersion()
- Specified by:
getVersion
in interfacePluginFragment
- Returns:
- plug-in fragment version identifier as specified in manifest file
- See Also:
PluginFragment.getVersion()
-
setVersion
public MockPluginFragment setVersion(Version value)
- Parameters:
value
- the version to set- Returns:
- this instance
-
matches
public boolean matches(PluginDescriptor descr)
Description copied from interface:PluginFragment
Checks is this fragment may contribute to given plug-in.- Specified by:
matches
in interfacePluginFragment
- Parameters:
descr
- plug-in descriptor- Returns:
true
if this fragment may contribute to given plug-in- See Also:
PluginFragment.matches( org.java.plugin.registry.PluginDescriptor)
-
getMatchingRule
public MatchingRule getMatchingRule()
- Specified by:
getMatchingRule
in interfacePluginFragment
- Returns:
- the match rule as it specified in manifest
- See Also:
PluginFragment.getMatchingRule()
-
setMatchingRule
public MockPluginFragment setMatchingRule(MatchingRule value)
- Parameters:
value
- the matching rule to set- Returns:
- this instance
-
getUniqueId
public java.lang.String getUniqueId()
- Specified by:
getUniqueId
in interfaceUniqueIdentity
- Returns:
- unique ID of plug-in element
- See Also:
UniqueIdentity.getUniqueId()
-
getDocsPath
public java.lang.String getDocsPath()
- Specified by:
getDocsPath
in interfaceDocumentable<PluginFragment>
- Returns:
- path to documentation "home", it is used for resolving documentation references
- See Also:
Documentable.getDocsPath()
-
setDocsPath
public MockPluginFragment setDocsPath(java.lang.String value)
- Parameters:
value
- the docs path to set- Returns:
- this instance
-
getDocumentation
public Documentation<PluginFragment> getDocumentation()
- Specified by:
getDocumentation
in interfaceDocumentable<PluginFragment>
- Returns:
- plug-in element documentation object or
null
if there is no documentation provided - See Also:
Documentable.getDocumentation()
-
setDocumentation
public MockPluginFragment setDocumentation(Documentation<PluginFragment> value)
- Parameters:
value
- the documentation to set- Returns:
- this instance
-
-