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.StringgetDocsPath()Documentation<PluginFragment>getDocumentation()java.net.URLgetLocation()MatchingRulegetMatchingRule()java.lang.StringgetPluginId()VersiongetPluginVersion()PluginRegistrygetRegistry()java.lang.StringgetUniqueId()java.lang.StringgetVendor()VersiongetVersion()booleanmatches(PluginDescriptor descr)Checks is this fragment may contribute to given plug-in.MockPluginFragmentsetDocsPath(java.lang.String value)MockPluginFragmentsetDocumentation(Documentation<PluginFragment> value)MockPluginFragmentsetLocation(java.net.URL value)MockPluginFragmentsetMatchingRule(MatchingRule value)MockPluginFragmentsetPluginId(java.lang.String value)MockPluginFragmentsetPluginVersion(Version value)MockPluginFragmentsetRegistry(PluginRegistry value)MockPluginFragmentsetVendor(java.lang.String value)MockPluginFragmentsetVersion(Version value)-
Methods inherited from class org.java.plugin.tools.mocks.MockIdentity
getId, setId
-
-
-
-
Method Detail
-
getLocation
public java.net.URL getLocation()
- Specified by:
getLocationin 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:
getPluginIdin 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:
getPluginVersionin interfacePluginFragment- Returns:
- version identifier of plug-in to which this fragment may
contribute or
nullif 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:
getRegistryin 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:
getVendorin 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:
getVersionin 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:PluginFragmentChecks is this fragment may contribute to given plug-in.- Specified by:
matchesin interfacePluginFragment- Parameters:
descr- plug-in descriptor- Returns:
trueif this fragment may contribute to given plug-in- See Also:
PluginFragment.matches( org.java.plugin.registry.PluginDescriptor)
-
getMatchingRule
public MatchingRule getMatchingRule()
- Specified by:
getMatchingRulein 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:
getUniqueIdin interfaceUniqueIdentity- Returns:
- unique ID of plug-in element
- See Also:
UniqueIdentity.getUniqueId()
-
getDocsPath
public java.lang.String getDocsPath()
- Specified by:
getDocsPathin 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:
getDocumentationin interfaceDocumentable<PluginFragment>- Returns:
- plug-in element documentation object or
nullif 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
-
-