org.oddjob.arooa.parsing
Class ConfigConfigurationSession

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

public class ConfigConfigurationSession
extends Object
implements ConfigurationSession

A ConfigurationSession for an ArooaConfiguration.

This ConfigurationSession doesn't support component by component DragPoints. Only the DragPoint for the root node is returned.

To support saving the configuration to the underlying configuration structure - not directly to source of the configuration (to the file) an intermediate the configuration is parsed and an intermediate HandleConfigurationSession is used.

See Also:
HandleConfigurationSession
Author:
rob

Constructor Summary
ConfigConfigurationSession(ArooaSession session, ArooaConfiguration configuration)
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigConfigurationSession

public ConfigConfigurationSession(ArooaSession session,
                                  ArooaConfiguration configuration)
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.

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.