org.noos.xing.mydoggy
Interface PersistenceDelegateCallback


public interface PersistenceDelegateCallback

A callback interface used to listen to events fired by the PersistenceDelegate during the merge.

Since:
1.5.0
Author:
Angelo De Caro (angelo.decaro@gmail.com)
See Also:
PersistenceDelegate, PersistenceDelegate.merge(java.io.InputStream, org.noos.xing.mydoggy.PersistenceDelegate.MergePolicy, PersistenceDelegateCallback)

Nested Class Summary
static interface PersistenceDelegateCallback.PersistenceNode
          The interface is used to analyze the properties of a source of persistence data.
 
Method Summary
 Content contentNotFound(ToolWindowManager toolWindowManager, String contentId, PersistenceDelegateCallback.PersistenceNode node)
          This method is invoked when the PersistenceDelegate try to access a Content that is not currently registered in the ContentManager.
 ToolWindow toolwindowNotFound(ToolWindowManager toolWindowManager, String toolWindowId, PersistenceDelegateCallback.PersistenceNode node)
          This method is invoked when the PersistenceDelegate try to access a ToolWindow that is not currently registered in the ToolWindowManager.
 String validate(PersistenceDelegateCallback.PersistenceNode node, String attribute, String attributeValue, Object attributeDefaultValue)
          This method is invoked each time a property is loaded by the persistence delegate.
 

Method Detail

toolwindowNotFound

ToolWindow toolwindowNotFound(ToolWindowManager toolWindowManager,
                              String toolWindowId,
                              PersistenceDelegateCallback.PersistenceNode node)
This method is invoked when the PersistenceDelegate try to access a ToolWindow that is not currently registered in the ToolWindowManager.

Parameters:
toolWindowManager - a reference to.
toolWindowId - the requested toolwindow id.
node - a node instance to retrieve all the properties related to the requested toolwindow.
Returns:
a instance of ToolWindow eventually registered.
Since:
1.5.0

contentNotFound

Content contentNotFound(ToolWindowManager toolWindowManager,
                        String contentId,
                        PersistenceDelegateCallback.PersistenceNode node)
This method is invoked when the PersistenceDelegate try to access a Content that is not currently registered in the ContentManager.

Parameters:
toolWindowManager - a reference to.
contentId - the requested content id.
node - a node instance to retrieve all the properties related to the requested content.
Returns:
a instance of Content eventually registered.
Since:
1.5.0

validate

String validate(PersistenceDelegateCallback.PersistenceNode node,
                String attribute,
                String attributeValue,
                Object attributeDefaultValue)
This method is invoked each time a property is loaded by the persistence delegate. So the user can decide to accept or refuse the attributeValue loaded from the persistence storage.

Parameters:
node - the current source of persistence data.
attribute - the attribute whose value is to be validated.
attributeValue - the attribute value loaded from the persistence storage.
attributeDefaultValue - the default value assigned by the system to that attribute.
Returns:
the attribute value to be used.
Since:
1.5.0


Copyright © 2012. All Rights Reserved.