|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IDiscoveryManager
Field Summary | |
---|---|
static IDiscoveryManager |
INSTANCE
|
Method Summary | |
---|---|
boolean |
canRetrieveValue(DiscovererParameter parameter)
This method indicates if a parameter value can be retrieved from one discoverer (thanks to one public field or public getter method). |
IDiscoverer<?> |
createDiscovererImpl(DiscovererDescription description)
This method creates a new IDiscoverer from the given
DiscovererDescription . |
IDiscoverer<?> |
createDiscovererImpl(java.lang.String id)
This method creates a new IDiscoverer from the
DiscovererDescription with the given id . |
void |
discoverElement(IDiscoverer<?> discoverer,
java.lang.Object source,
java.util.Map<java.lang.String,java.lang.Object> parametersValues,
IProgressMonitor monitor)
Launch a discovery for a discoverer using the Java
reflective API. |
java.util.Collection<DiscovererDescription> |
getApplicableDiscoverers(java.lang.Object source)
This method returns a collection of IDiscoverer instances which
accept the "source" parameter value as a discovery source. |
DiscovererDescription |
getDiscovererDescription(IDiscoverer<?> discoverer)
This method returns the DiscovererDescription instance for the
given Discoverer> instance. |
DiscovererDescription |
getDiscovererDescription(java.lang.String id)
This method returns the DiscovererDescription instance for the
given discoverer id. |
java.util.Collection<DiscovererDescription> |
getDiscoverers()
This method returns all existing instances of registered DiscovererDescription s. |
java.lang.Object |
getInitialValue(DiscovererParameter parameter,
DiscovererDescription discoverer,
java.lang.Object source)
Returns the initial value for the given parameter, or null
if none. |
java.lang.Object |
getValue(DiscovererParameter parameter,
IDiscoverer<?> discoverer)
Retrieve a parameter value for a Discoverer> using the Java
reflective API. |
boolean |
hasInitialValue(DiscovererParameter parameter,
DiscovererDescription discoverer)
Whether an initial value is specified for the given parameter |
boolean |
isApplicable(DiscovererDescription discovererDefinition,
java.lang.Object source)
This method indicates if the discoverer associated to the given DiscovererDescription instance accepts the "source" parameter
value as a discovery source. |
void |
setValue(DiscovererParameter parameter,
IDiscoverer<?> discoverer,
java.lang.Object parameterValue)
Set a parameter value for a Discoverer> using the Java
reflective API. |
Field Detail |
---|
static final IDiscoveryManager INSTANCE
Method Detail |
---|
IDiscoverer<?> createDiscovererImpl(java.lang.String id)
IDiscoverer
from the
DiscovererDescription
with the given id
.
IDiscoverer
or null
if no
DiscovererDescription
was registered with the given
id
.IDiscoverer<?> createDiscovererImpl(DiscovererDescription description)
IDiscoverer
from the given
DiscovererDescription
.
IDiscoverer
or null
if it
couldn't be created..java.util.Collection<DiscovererDescription> getApplicableDiscoverers(java.lang.Object source)
IDiscoverer
instances which
accept the "source" parameter value as a discovery source. This method
basically relies on the
isApplicable(DiscovererDescription, Object)
service.
The resulting collection is unmodifiable.
boolean isApplicable(DiscovererDescription discovererDefinition, java.lang.Object source)
DiscovererDescription
instance accepts the "source" parameter
value as a discovery source.
java.util.Collection<DiscovererDescription> getDiscoverers()
DiscovererDescription
s.
The returned collection is unmodifiable.
DiscovererDescription getDiscovererDescription(java.lang.String id)
DiscovererDescription
instance for the
given discoverer id.
DiscovererDescription getDiscovererDescription(IDiscoverer<?> discoverer)
DiscovererDescription
instance for the
given Discoverer>
instance.
boolean canRetrieveValue(DiscovererParameter parameter)
java.lang.Object getValue(DiscovererParameter parameter, IDiscoverer<?> discoverer) throws DiscoveryException
Discoverer>
using the Java
reflective API.
parameter
- the parameter whose value to getdiscoverer
- the discoverer on which to parameter is set
DiscoveryException
void setValue(DiscovererParameter parameter, IDiscoverer<?> discoverer, java.lang.Object parameterValue) throws DiscoveryException
Discoverer>
using the Java
reflective API.
parameter
- the parameter to setdiscoverer
- the discoverer on which to set the parameterparameterValue
- the value to set the parameter to
DiscoveryException
void discoverElement(IDiscoverer<?> discoverer, java.lang.Object source, java.util.Map<java.lang.String,java.lang.Object> parametersValues, IProgressMonitor monitor) throws DiscoveryException
discoverer
using the Java
reflective API.
This method should be called from a Job
, in order to avoid
freezing the UI and provide progress and cancellation.
discoverer
- the discoverer to launchsource
- the input of the discovery (file, project, etc.)parametersValues
- values for the discoverer's parametersmonitor
- a progress monitor used to report progress and respond to
cancellation. May be a NullProgressMonitor
if no
monitor is to be used.
DiscoveryException
boolean hasInitialValue(DiscovererParameter parameter, DiscovererDescription discoverer)
parameter
- the parameterdiscoverer
- the discoverer in which the parameter is defined
java.lang.Object getInitialValue(DiscovererParameter parameter, DiscovererDescription discoverer, java.lang.Object source) throws DiscoveryException
null
if none.
parameter
- the parameterdiscoverer
- the discoverer in which the parameter is definedsource
- the element the discovery is applied on
null
if none
DiscoveryException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |