org.apache.shindig.gadgets.rewrite
Interface DomWalker.Visitor

All Known Implementing Classes:
AbsolutePathReferenceVisitor, ConcatVisitor, ConcatVisitor.Css, ConcatVisitor.Js, ContentTypeCharsetRemoverVisitor, OsTemplateXmlLoaderRewriter.GadgetHtmlVisitor, ProxyingVisitor, ResourceMutateVisitor, StyleAdjacencyVisitor, StyleTagExtractorVisitor, StyleTagProxyEmbeddedUrlsVisitor
Enclosing class:
DomWalker

public static interface DomWalker.Visitor

Implemented by classes that do actual manipulation of the DOM while DomWalker.ContentVisitor walks it. Visitor instances are called for each Node in the DOM in the order they are registered with the DomVisitor.ContentVisitor


Nested Class Summary
static class DomWalker.Visitor.VisitStatus
          Returned by the visit(Gadget, Node) method, signaling: BYPASS = Visitor doesn't care about the node.
 
Method Summary
 boolean revisit(Gadget gadget, List<Node> nodes)
          Revisit a node in the DOM that was marked by the visit(Gadget, Node) as reserved during DOM traversal.
 DomWalker.Visitor.VisitStatus visit(Gadget gadget, Node node)
          Visit a particular Node in the DOM.
 

Method Detail

visit

DomWalker.Visitor.VisitStatus visit(Gadget gadget,
                                    Node node)
                                    throws RewritingException
Visit a particular Node in the DOM.

Parameters:
gadget - Context for the request.
node - Node being visited.
Returns:
Status, see VisitStatus
Throws:
RewritingException

revisit

boolean revisit(Gadget gadget,
                List<Node> nodes)
                throws RewritingException
Revisit a node in the DOM that was marked by the visit(Gadget, Node) as reserved during DOM traversal.

Parameters:
gadget - Context for the request.
nodes - Nodes being revisited, previously marked as reserved.
Returns:
True if any node modified, false otherwise.
Throws:
RewritingException


Copyright © 2007-2012. All Rights Reserved.