public abstract class AbstractActionLocator extends Object implements ActionLocator
Injector
and a fall back
ActionLocator
in case this ActionLocator is not designed or
configured to create an action for that name.
Objects are created via a Factory
, that can be obtained via the
FactoryFactory.Modifier and Type | Field and Description |
---|---|
protected static org.apache.commons.logging.Log |
LOG |
Constructor and Description |
---|
AbstractActionLocator() |
AbstractActionLocator(ActionLocator fallbackActionLocator,
Injector injector) |
AbstractActionLocator(Injector injector) |
Modifier and Type | Method and Description |
---|---|
protected abstract Action |
doFindAction(COM.FutureTense.Interfaces.ICS ics,
String name)
Template Method for finding the Action for the custom ActionLocator.
|
Action |
getAction(COM.FutureTense.Interfaces.ICS ics,
String name)
This method selects the Action by calling the
doFindAction(ICS, String) method. |
ActionLocator |
getFallbackActionLocator() |
Injector |
getInjector() |
protected void |
injectDependencies(COM.FutureTense.Interfaces.ICS ics,
Action action) |
void |
setFallbackActionLocator(ActionLocator fallbackActionLocator) |
void |
setInjector(Injector injector) |
public AbstractActionLocator()
public AbstractActionLocator(Injector injector)
public AbstractActionLocator(ActionLocator fallbackActionLocator, Injector injector)
public final Action getAction(COM.FutureTense.Interfaces.ICS ics, String name)
doFindAction(ICS, String)
method. If that method returns an
Action, that Action will be dependency injected with the
getInjector()
, otherwise the getFallbackActionLocator()
is called.
It is the fall back ActionLocator that should inject its Action with
services.
Contract is that either the doFindAction(ICS, String)
method or
the getFallbackActionLocator()
returns an Action, so that this
method never returns null.getAction
in interface ActionLocator
ics
- Content Server context objectname
- the name of the actionActionLocator.getAction(COM.FutureTense.Interfaces.ICS,
java.lang.String)
protected abstract Action doFindAction(COM.FutureTense.Interfaces.ICS ics, String name)
ics
- the Content Server contextname
- the name of the actionprotected final void injectDependencies(COM.FutureTense.Interfaces.ICS ics, Action action)
ics
- action
- public Injector getInjector()
public ActionLocator getFallbackActionLocator()
public void setFallbackActionLocator(ActionLocator fallbackActionLocator)
fallbackActionLocator
- the fallbackActionLocator to setpublic void setInjector(Injector injector)
Copyright © 2010-2016 Oracle Corporation. All Rights Reserved.