Handles chaining of layout parameter request processing for the DistributedLayoutManager object and provides assistance during generation of the SAX event stream during rendering by wrapping the ultimate ContentHandler to which all events will be pushed. Conceptually, the pipe performs as if sitting between UserInstance and the DistributedLayoutManager instance as shown below. The call to processLayoutParameters and the call to render the layout via the getUserLayout call pass through the pipe along with the resulting SAX event stream. This is conceptual only. The pipe is actually embedded within the DistributedLayoutManager.
time proceeds forward moving downward | | V process optionally +-------------+ +----------+ Layout +-----------+ specific layout | Distributed | | User | Parameters | Processor | action calls to | Layout | | Instance | (...) | Pipe | the manager | Manager | | |----------------->| |---------------->| | | | | | | | | | getUserLayout() | | getUserLayout() | | | |----------------->| |---------------->| | | | | | | | | | SAX Events flow | | SAX Events flow | | | | back to User | | back to Pipe's | | | | Instance's | | ContentHandler | | | | ContentHandler | | | | | |<-----------------| |<----------------| | | | | | | | +----------+ +-----------+ +-------------+
This pipe allows us to do specific URL parameter handling that may be unique to a structure and theme stylesheet set. A special parameter uP_dlmPrc is also looked for which causes an optional processor to be embedded within the pipe until a further occurrance of this parameter either replaces that processor with a new processor or removes it by specifying an empty value. This allows a specific dlm stylesheet set to use custom processing for things like adding channel targets, adding column or tab targets, adding targets for moving channels and a different policy for adding targets for moving columns or tabs, etc. There are two types of processors supported, a fixed set which does not change and an optional set from which a single processor can be added to the pipe via the uP_dlmPrc parameter. All are configured via the "properties/context/layoutContext.xml" file. The pipe provides a "front" ContentHandler to the DistributedLayoutManager representing the front of the pipe for SAX events generated in the getUserLayout() method. The ContentHandler passed in from UserInstance via the getUserLayout() method is set as the "back" ContentHandler to which all events exiting the pipe are pushed. As such this pipe can act on incoming layout parameters and then influence the perceived layout seen by UserInstance by altering the SAX stream accordingly as it flows back toward UserInstance's ContentHandler.
@author Mark Boyd