org.apache.cocoon.forms.binding
Class CustomJXPathBinding

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.forms.binding.JXPathBindingBase
          extended by org.apache.cocoon.forms.binding.CustomJXPathBinding
All Implemented Interfaces:
LogEnabled, Serviceable, Binding

public class CustomJXPathBinding
extends JXPathBindingBase
implements Serviceable

CustomJXPathBinding


Field Summary
 
Fields inherited from class org.apache.cocoon.forms.binding.JXPathBindingBase
classes, parent
 
Constructor Summary
CustomJXPathBinding(JXPathBindingBuilderBase.CommonAttributes commonAtts, String widgetId, String xpath, AbstractCustomBinding wrappedBinding)
          Constructs CustomJXPathBinding
 
Method Summary
 void doLoad(Widget frmModel, org.apache.commons.jxpath.JXPathContext jxpc)
          Delegates the actual loading operation to the provided Custom Binding Class after narrowing down on the selected widget (@id) and context (@path)
 void doSave(Widget frmModel, org.apache.commons.jxpath.JXPathContext jxpc)
          Delegates the actual saving operation to the provided Custom Binding Class after narrowing down on the selected widget (@id) and context (@path)
 String getId()
          Returns binding definition id.
 AbstractCustomBinding getWrappedBinding()
           
 String getXPath()
           
 void service(ServiceManager manager)
           
 
Methods inherited from class org.apache.cocoon.forms.binding.JXPathBindingBase
getClass, getCommonAtts, getEnclosingLibrary, getLocation, isValid, loadFormFromModel, loadFormFromModel, saveFormToModel, saveFormToModel, selectWidget, setEnclosingLibrary, setParent
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomJXPathBinding

public CustomJXPathBinding(JXPathBindingBuilderBase.CommonAttributes commonAtts,
                           String widgetId,
                           String xpath,
                           AbstractCustomBinding wrappedBinding)
Constructs CustomJXPathBinding

Parameters:
commonAtts - common configuration attributes JXPathBindingBuilderBase.CommonAttributes
widgetId - id of the widget to bind to
xpath - jxpath expression to narrow down the context to before calling the wrapped Binding
wrappedBinding - the actual custom written Binding implementation of Binding
Method Detail

getXPath

public String getXPath()

getId

public String getId()
Description copied from class: JXPathBindingBase
Returns binding definition id.

Specified by:
getId in interface Binding
Overrides:
getId in class JXPathBindingBase

getWrappedBinding

public AbstractCustomBinding getWrappedBinding()

doLoad

public void doLoad(Widget frmModel,
                   org.apache.commons.jxpath.JXPathContext jxpc)
            throws BindingException
Delegates the actual loading operation to the provided Custom Binding Class after narrowing down on the selected widget (@id) and context (@path)

Specified by:
doLoad in class JXPathBindingBase
Parameters:
frmModel - the narrowed widget-scope from the parent binding
jxpc - the narrowed jxpath context from the parent binding
Throws:
BindingException - when the wrapped CustomBinding fails

doSave

public void doSave(Widget frmModel,
                   org.apache.commons.jxpath.JXPathContext jxpc)
            throws BindingException
Delegates the actual saving operation to the provided Custom Binding Class after narrowing down on the selected widget (@id) and context (@path)

Specified by:
doSave in class JXPathBindingBase
Parameters:
frmModel - the narrowed widget-scope from the parent binding
jxpc - the narrowed jxpath context from the parent binding
Throws:
BindingException - when the wrapped CustomBinding fails

service

public void service(ServiceManager manager)
             throws ServiceException
Specified by:
service in interface Serviceable
Throws:
ServiceException
See Also:
Serviceable.service(org.apache.avalon.framework.service.ServiceManager)


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.