org.benow.web.security
Class UserModuleStreamer

java.lang.Object
  extended by org.benow.web.security.UserModuleStreamer
All Implemented Interfaces:
ResultWriter

public class UserModuleStreamer
extends java.lang.Object
implements ResultWriter

Streams html associated with dynamic user modules. User modules are added as plugins to store app specific user info. This user info needs to be set and edited at runtime, and, as the assignment is dynamic, static code (xsl) would have to be changed for each new user module that is added. With this solution, the usermodule presentation interaction code is auto determined and streamed. It makes for a wacky pipeline, but very modular presentation and processing. Time will tell if this is not too obscure. XSL for modules is expected to be found as resource, as some/custom/UserModule.xsl for some.custom.UserModule

Author:
andy

Constructor Summary
UserModuleStreamer()
           
 
Method Summary
 java.lang.String getContentType()
           
 java.lang.String getFilename()
           
 void write(java.io.PrintWriter out, org.w3c.dom.Element streamElem, QueryParams params)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserModuleStreamer

public UserModuleStreamer()
Method Detail

write

public void write(java.io.PrintWriter out,
                  org.w3c.dom.Element streamElem,
                  QueryParams params)
           throws WebException,
                  java.io.IOException
Specified by:
write in interface ResultWriter
Parameters:
out - where to stream to
streamElem - input stream element that may hold param for stream procedure
params - params at time of stream
Throws:
WebException - if something goes wrong
java.io.IOException

getContentType

public java.lang.String getContentType()
Specified by:
getContentType in interface ResultWriter
Returns:
the content type of the content to be streamed

getFilename

public java.lang.String getFilename()
Specified by:
getFilename in interface ResultWriter
Returns:
the suggested filename for the stream when saved, if exists.