Examples of Updater


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

          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

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

        // 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

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

                                        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

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

     */
    private void substituteUpdater(Updater originalUpdater, Updater newUpdater) {
        // recursively pop elements off the stack until the first match is found
        // TODO: may need to consider using custom NILL object and match descriptors
        if (!updaterStack.isEmpty()) {
            Updater updater = (Updater) updaterStack.pop();
            if (originalUpdater == null && updater == null) {
                updaterStack.push(newUpdater);
            } else if (originalUpdater.equals(updater)) {
                updaterStack.push(newUpdater);
            } else {
View Full Code Here

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

   

    public void body(String text, ReadContext context) throws Exception {
        // add dyna-bean support!
        // probably refactoring needed
        Updater updater = context.getCurrentUpdater();
        if (updater != null)
        {
            updater.update(context, text);
        } else {
            if (context.getLog().isDebugEnabled())
            {
                context.getLog().debug("No updater for simple type '" + context.getCurrentElement() + "'");
            }
View Full Code Here

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

                            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

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

     */
    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

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

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

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

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

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

            */
            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 (log.isTraceEnabled()) {
                        log.trace("Popped " + top);
                    }
                    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
TOP
Copyright © 2018 www.massapi.com. 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.