org.apache.stanbol.enhancer.servicesapi.helper
Class AbstractChain
java.lang.Object
org.apache.stanbol.enhancer.servicesapi.helper.AbstractChain
- All Implemented Interfaces:
- Chain
@Properties(value={@Property(name="stanbol.enhancer.chain.name"),@Property(name="service.ranking")})
@Service
public abstract class AbstractChain- extends java.lang.Object
- implements Chain
Abstract base implementation that reads the of the
Chain.PROPERTY_NAME from configuration parsed in
the activate methods and implements the getName() method. If the
name is missing or empty a ConfigurationException is thrown.
In addition this Class defines a Service, Component and
Property annotations for
- EnhancementEngine#PROPERTY_NAME
-
Constants.SERVICE_RANKING
This annotations can be Component.inherit() to sub classes and would
allow users to specify the name and the ranking of an engine by using e.g. the
Apache Felix Webconsole.
- Author:
- Rupert Westenthaler
| Fields inherited from interface org.apache.stanbol.enhancer.servicesapi.Chain |
PROPERTY_NAME |
|
Method Summary |
protected void |
activate(org.osgi.service.component.ComponentContext ctx)
|
protected void |
deactivate(org.osgi.service.component.ComponentContext ctx)
|
java.lang.String |
getName()
The name of this chain as configured by Chain.PROPERTY_NAME |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
context
protected org.osgi.service.component.ComponentContext context
- The
ComponentContext set in the activate(ComponentContext)
and reset in the deactivate(ComponentContext) method.
AbstractChain
public AbstractChain()
activate
protected void activate(org.osgi.service.component.ComponentContext ctx)
throws org.osgi.service.cm.ConfigurationException
- Throws:
org.osgi.service.cm.ConfigurationException
deactivate
protected void deactivate(org.osgi.service.component.ComponentContext ctx)
getName
public final java.lang.String getName()
- Description copied from interface:
Chain
- The name of this chain as configured by
Chain.PROPERTY_NAME
- Specified by:
getName in interface Chain
- Returns:
- the name
Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.