org.apache.cocoon.forms.binding
Class AbstractCustomBinding

java.lang.Object
  extended byorg.apache.cocoon.forms.binding.AbstractCustomBinding
All Implemented Interfaces:
Binding
Direct Known Subclasses:
CustomValueWrapBinding

public abstract class AbstractCustomBinding
extends Object
implements Binding

AbstractCustomBinding


Constructor Summary
AbstractCustomBinding()
           
 
Method Summary
protected abstract  void doLoad(Widget frmModel, org.apache.commons.jxpath.JXPathContext context)
           
protected abstract  void doSave(Widget frmModel, org.apache.commons.jxpath.JXPathContext context)
           
 Binding getClass(String id)
          Gets a binding class.
 String getId()
          Returns binding definition id.
 Library getLocalLibrary()
          returns the local library for this tree of bindings
 boolean isValid()
          checks for deep validity of this binding tree (taking into accound included libraries)
 void loadFormFromModel(Widget frmModel, Object objModel)
          Binding service method called upon loading.
 void saveFormToModel(Widget frmModel, Object objModel)
          Binding service method called upon saving.
 void setParent(Binding binding)
          Sets parent binding.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCustomBinding

public AbstractCustomBinding()
Method Detail

setParent

public void setParent(Binding binding)
Sets parent binding.

Specified by:
setParent in interface Binding
Parameters:
binding - Parent of this binding.

getId

public String getId()
Returns binding definition id.

Specified by:
getId in interface Binding

getClass

public Binding getClass(String id)
Description copied from interface: Binding
Gets a binding class.

Specified by:
getClass in interface Binding
Parameters:
id - Id of binding class to get.

isValid

public boolean isValid()
Description copied from interface: Binding
checks for deep validity of this binding tree (taking into accound included libraries)

Specified by:
isValid in interface Binding

getLocalLibrary

public Library getLocalLibrary()
Description copied from interface: Binding
returns the local library for this tree of bindings

Specified by:
getLocalLibrary in interface Binding

loadFormFromModel

public final void loadFormFromModel(Widget frmModel,
                                    Object objModel)
                             throws BindingException
Binding service method called upon loading. This will delegate to the overloaded version specific for this base-class. doLoad(Widget, JXPathContext)

Specified by:
loadFormFromModel in interface Binding
Parameters:
frmModel -
objModel -
Throws:
BindingException

saveFormToModel

public final void saveFormToModel(Widget frmModel,
                                  Object objModel)
                           throws BindingException
Binding service method called upon saving. This will delegate to the overloaded version specific for this base-class. doSave(Widget, JXPathContext)

Specified by:
saveFormToModel in interface Binding
Parameters:
frmModel -
objModel -
Throws:
BindingException

doLoad

protected abstract void doLoad(Widget frmModel,
                               org.apache.commons.jxpath.JXPathContext context)
                        throws Exception
Parameters:
frmModel -
context -
Throws:
Exception

doSave

protected abstract void doSave(Widget frmModel,
                               org.apache.commons.jxpath.JXPathContext context)
                        throws Exception
Throws:
Exception


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.