|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.oddjob.framework.BaseComponent
public abstract class BaseComponent
An abstract implementation of a component which provides common functionality to concrete sub classes.
Field Summary | |
---|---|
protected IconHelper |
iconHelper
Used to notify clients of an icon change. |
Constructor Summary | |
---|---|
BaseComponent()
|
Method Summary | |
---|---|
void |
addIconListener(IconListener listener)
Add an icon listener. |
void |
addPropertyChangeListener(PropertyChangeListener l)
Add a property change listener. |
void |
addStateListener(StateListener listener)
Add a job state listener. |
protected void |
configure(Object component)
Configure the runtime. |
void |
destroy()
When running a job embedded in code, this method should always be called to clear up resources. |
protected abstract void |
fireDestroyedState()
Subclasses must override this to fire the destroyed state. |
protected void |
firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
Fire a property change event. |
protected ArooaSession |
getArooaSession()
|
ImageIcon |
iconForId(String iconId)
Return an icon tip for a given id. |
void |
initialise()
When running a job embedded in code, it may be necessary to call this method to initialise the job. |
StateEvent |
lastStateEvent()
Returns the last JobState event. |
protected abstract org.apache.log4j.Logger |
logger()
|
protected void |
onConfigured()
Subclasses override this method to perform post configuration initialisation. |
protected void |
onDestroy()
Subclasses override this method to clear up resources. |
protected void |
onInitialised()
Subclasses override this method to perform post creation initialisation. |
void |
removeIconListener(IconListener listener)
Remove an icon listener. |
void |
removePropertyChangeListener(PropertyChangeListener l)
Remove a property change listener. |
void |
removeStateListener(StateListener listener)
Remove a job state listener. |
protected void |
save()
Implementations override this to save their state on state change. |
protected void |
save(Object o)
Save this job. |
void |
setArooaContext(ArooaContext context)
|
void |
setArooaSession(ArooaSession session)
Here for the tests... |
protected abstract StateHandler<?> |
stateHandler()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final IconHelper iconHelper
Constructor Detail |
---|
public BaseComponent()
Method Detail |
---|
protected abstract StateHandler<?> stateHandler()
public void setArooaSession(ArooaSession session)
setArooaSession
in interface ArooaSessionAware
session
- protected ArooaSession getArooaSession()
public void setArooaContext(ArooaContext context)
setArooaContext
in interface ArooaContextAware
protected abstract org.apache.log4j.Logger logger()
protected void save() throws ComponentPersistException
ComponentPersistException
protected void configure(Object component) throws ArooaConfigurationException
ArooaConfigurationException
protected void save(Object o) throws ComponentPersistException
ComponentPersistException
public StateEvent lastStateEvent()
This is not a property so that it can't be accessed directly in scripts.
lastStateEvent
in interface Stateful
public void addStateListener(StateListener listener)
addStateListener
in interface Stateful
listener
- The listener.public void removeStateListener(StateListener listener)
removeStateListener
in interface Stateful
listener
- The listener.public void addPropertyChangeListener(PropertyChangeListener l)
addPropertyChangeListener
in interface PropertyChangeNotifier
l
- The property change listener.public void removePropertyChangeListener(PropertyChangeListener l)
removePropertyChangeListener
in interface PropertyChangeNotifier
l
- The property change listener.protected void firePropertyChange(String propertyName, Object oldValue, Object newValue)
propertyName
- oldValue
- newValue
- public ImageIcon iconForId(String iconId)
iconForId
in interface Iconic
iconId
- The icon id.
public void addIconListener(IconListener listener)
addIconListener
in interface Iconic
listener
- The listener.public void removeIconListener(IconListener listener)
removeIconListener
in interface Iconic
listener
- The listener.public void initialise() throws JobDestroyedException
JobDestroyedException
public void destroy() throws JobDestroyedException
JobDestroyedException
protected void onInitialised()
protected void onConfigured()
protected void onDestroy()
protected abstract void fireDestroyedState()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |