com.ibm.mashups.enabler
Interface DirtyFlagProvider


public DirtyFlagProvider

Base interface that allows to track whether a node or model has been modified (i.e. became dirty).

Since:
3.0.0.1

Method Summary
 Boolean isDirty()
           Tests whether the instance is dirty.
 unknown setDirty()
           Marks this instance as dirty.
 unknown setClean()
           Marks this instance as not dirty, i.e. clean.
 unknown addDirtyCallback(Object ctx, Object callback, Object[] parameters, Boolean alwaysFire)
           Adds a callback handler to be called when the instance changes its state.
 Object removeDirtyCallback(unknown fn)
           Removes a callback handler previously added
 

Method Detail

isDirty

Boolean isDirty()
Tests whether the instance is dirty. Instances that have been modified, or newly created return true.

Returns:
true if the instance is dirty, otherwise false.

setDirty

unknown setDirty()
Marks this instance as dirty.


setClean

unknown setClean()
Marks this instance as not dirty, i.e. clean.


addDirtyCallback

unknown addDirtyCallback(Object ctx,
                         Object callback,
                         Object[] parameters,
                         Boolean alwaysFire)
Adds a callback handler to be called when the instance changes its state.

Parameters:
ctx - The context in which to run the callback handler Must not be null
callback - the callback funtion in the format of Function(Object[] passed in with addDirtyCallback). Must not be null
parameters - optional array of parameters to be passed on to the callback function. May be null
alwaysFire - Specifies whether to only fire when clean->dirty (set flag to false) or also fire when dirty->dirty (set flag to true)

removeDirtyCallback

Object removeDirtyCallback(unknown fn)
Removes a callback handler previously added

Parameters:
callback - the callback funtion to be removed. Must not be null


Copyright IBM Corp. 2010 All Rights Reserved.