org.oddjob.arooa.parsing
Class HandleConfigurationSession

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

public class HandleConfigurationSession
extends Object
implements ConfigurationSession

A ConfigurationSession that works with an ArooaSession and a ConfigurationHandle that was the result of a parse that acted on the session.

Author:
rob

Constructor Summary
HandleConfigurationSession(ArooaSession session, ConfigurationHandle handle)
          Create a new Instance.
HandleConfigurationSession(ConfigurationHandle handle)
          Create a new instance.
 
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

HandleConfigurationSession

public HandleConfigurationSession(ConfigurationHandle handle)
Create a new instance. The underlying session is taken from the document context of the handle.

Parameters:
handle -

HandleConfigurationSession

public HandleConfigurationSession(ArooaSession session,
                                  ConfigurationHandle handle)
Create a new Instance. This constructor allows a different session to be specified - not sure now why this was required.

Parameters:
session - The underlying session to use.
handle - The configuration handle.
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.