Package org.apache.commons.betwixt.expression

Examples of org.apache.commons.betwixt.expression.Updater


        }

        /** Call delegate then pop <code>Updater</code> */
        public void end(ReadContext context) throws Exception {
            delegate.end(context);
            Updater updater = context.popUpdater();
        }
View Full Code Here


                            log.trace("Attr URL:" + attributeDescriptor.getURI());
                            log.trace("Attr LocalName:" + attributeDescriptor.getLocalName() );
                            log.trace(value);
                        }
                       
                        Updater updater = attributeDescriptor.getUpdater();
                        log.trace(updater);
                        if ( updater != null && value != null ) {
                            updater.update( context, value );
                        }
                    }
                }
               
                addChildRules();
View Full Code Here

     */
    public void end() {
        if ( createdBean ) {
           
            // force any setters of the parent bean to be called for this new bean instance
            Updater updater = descriptor.getUpdater();
            Object instance = context.getBean();

            Object top = digester.pop();
            if (digester.getCount() == 0) {
                context.setBean(null);
            }else{
                context.setBean( digester.peek() );
            }

            if ( updater != null ) {
                if ( log.isDebugEnabled() ) {
                    log.debug( "Calling updater for: " + descriptor + " with: "
                        + instance + " on bean: " + context.getBean() );
                }
                updater.update( context, instance );
            } else {
                if ( log.isDebugEnabled() ) {
                    log.debug( "No updater for: " + descriptor + " with: "
                        + instance + " on bean: " + context.getBean() );
                }
View Full Code Here

            if (bodyTextdescriptor != null) {
                if (log.isTraceEnabled()) {
                    log.trace("Setting mixed content for:");
                    log.trace(bodyTextdescriptor);
                }
                Updater updater = bodyTextdescriptor.getUpdater();
                if (log.isTraceEnabled())
                {   
                    log.trace("Updating mixed content with:");
                    log.trace(updater);
                }
                if (updater != null && text != null) {
                    updater.update(context, text);
                }
            }
        }
    }
View Full Code Here

    }

    private void update(ReadContext context, Object value) throws Exception {
        Log log = context.getLog();

        Updater updater = context.getCurrentUpdater();
       
        if ( updater == null ) {
            if ( context.getLog().isTraceEnabled() ) {
                context.getLog().trace("No updater for " + context.getCurrentElement());
            }
        } else {
            updater.update(context, value);
        }

        String poppedElement = context.popElement();
    }
View Full Code Here

            ElementDescriptor currentDescriptor = getCurrentDescriptor();
            if (currentDescriptor != null) {
                nextDescriptor = currentDescriptor.getElementDescriptor(elementName);
            }
        }
        Updater updater = null;
        Options options = null;
        if (nextDescriptor != null) {
            updater = nextDescriptor.getUpdater();
            options = nextDescriptor.getOptions();
        }
View Full Code Here

       
        XMLBeanInfo mappedClassInfo = getXMLIntrospector().introspect(mappedClazz);
        ElementDescriptor mappedElementDescriptor = mappedClassInfo.getElementDescriptor();
        descriptorStack.push(mappedElementDescriptor);
       
        Updater updater = mappedElementDescriptor.getUpdater();
        updaterStack.push(updater);
  }
View Full Code Here

          log.trace(
            "Attr LocalName:" + attributeDescriptor.getLocalName());
          log.trace(value);
        }

        Updater updater = attributeDescriptor.getUpdater();
        log.trace(updater);
        if (updater != null && value != null) {
          updater.update(this, value);
        }
      }
    }
  }
View Full Code Here

        // TODO: think about whether this is right
        //       it makes some sense to look back up the
        //       stack until a non-empty updater is found.
        //       actions who need to put a stock to this
        //       behaviour can always use an ignoring implementation.
        Updater result = null;
        if (!updaterStack.empty()) {
            result = (Updater) updaterStack.peek();
            if ( result == null && updaterStack.size() >1 ) {
                result = (Updater) updaterStack.peek(1);
            }
View Full Code Here

                                        resolved = true;
                                        descriptorStack.pop();
                                        popOptions();
                                        descriptorStack.push(descriptor);
                                        pushOptions(descriptor.getOptions());
                                        Updater originalUpdater = originalDescriptor.getUpdater();
                                        Updater newUpdater = descriptor.getUpdater();
                                        substituteUpdater(originalUpdater, newUpdater);
                                        break;
                                    }
                                }
                            }
View Full Code Here

TOP

Related Classes of org.apache.commons.betwixt.expression.Updater

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.