org.oddjob.arooa.parsing
Class ContextConfigurationSession

java.lang.Object
  extended by org.oddjob.arooa.parsing.ContextConfigurationSession
All Implemented Interfaces:
ConfigurationSession

public class ContextConfigurationSession
extends Object
implements ConfigurationSession

A ConfigurationSession based on the parsing ArooaContext of an element.

It is assumed that the component is within the hierarchy of another ConfigurationOwner that will be the root of the hierarchy and this will provide details of when the hierarchy is modified and saved.

Author:
rob

Constructor Summary
ContextConfigurationSession(ArooaContext context)
          Construct the session.
 
Method Summary
 void addSessionStateListener(SessionStateListener listener)
          Add a SessionStateListener listener.
 DragPoint dragPointFor(Object component)
          Provide a DragPoint for the given component.
 ArooaDescriptor getArooaDescriptor()
          Get the ArooaDescriptor for editing the configuration.
 boolean isModified()
          Has the configuration been modified.
 void removeSessionStateListener(SessionStateListener listener)
          Remove a SessionStateListener listener.
 void save()
          Save the configuration.
protected  void setModified(boolean modified)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextConfigurationSession

public ContextConfigurationSession(ArooaContext context)
Construct the session.

Parameters:
context -
Method Detail

dragPointFor

public DragPoint dragPointFor(Object component)
Description copied from interface: ConfigurationSession
Provide a DragPoint for the given component.

Specified by:
dragPointFor in interface ConfigurationSession
Parameters:
component - The component.
Returns:
A DragPoint, or null if the component is not a member of the session.

setModified

protected void setModified(boolean modified)

isModified

public boolean isModified()
Description copied from interface: ConfigurationSession
Has the configuration been modified.

Specified by:
isModified in interface ConfigurationSession
Returns:
true/false. True if modified.

addSessionStateListener

public void addSessionStateListener(SessionStateListener listener)
Description copied from interface: ConfigurationSession
Add a SessionStateListener listener.

Specified by:
addSessionStateListener in interface ConfigurationSession
Parameters:
listener - The listener.

removeSessionStateListener

public void removeSessionStateListener(SessionStateListener listener)
Description copied from interface: ConfigurationSession
Remove a SessionStateListener listener.

Specified by:
removeSessionStateListener in interface ConfigurationSession
Parameters:
listener - The listener.

save

public void save()
          throws ArooaParseException
Description copied from interface: ConfigurationSession
Save the configuration.

Specified by:
save in interface ConfigurationSession
Throws:
ArooaParseException

getArooaDescriptor

public ArooaDescriptor getArooaDescriptor()
Description copied from interface: ConfigurationSession
Get the ArooaDescriptor for editing the configuration.

Specified by:
getArooaDescriptor in interface ConfigurationSession
Returns:
An ArooaDescriptor. Never Null.