public class LimitedElementsResponseWriter extends ResponseWriterWrapper
Modifier and Type | Field and Description |
---|---|
protected Set<String> |
m_blacklistAttributes |
protected Set<String> |
m_blacklistElements |
protected int |
m_depth |
protected Set<String> |
m_whitelistAttributes |
protected Set<String> |
m_whitelistElements |
protected ResponseWriter |
m_wrapped |
Constructor and Description |
---|
LimitedElementsResponseWriter() |
LimitedElementsResponseWriter(ResponseWriter wrapped) |
LimitedElementsResponseWriter(ResponseWriter wrapped,
Set<String> whitelistElements) |
LimitedElementsResponseWriter(ResponseWriter wrapped,
Set<String> whitelistElements,
Set<String> whitelistAttributes) |
Modifier and Type | Method and Description |
---|---|
Writer |
append(char c) |
Writer |
append(CharSequence csq) |
Writer |
append(CharSequence csq,
int start,
int end) |
ResponseWriter |
cloneWithWriter(Writer writer) |
void |
endElement(String name) |
Set<String> |
getBlacklistAttributes() |
Set<String> |
getBlacklistElements() |
Set<String> |
getWhitelistAttributes() |
Set<String> |
getWhitelistElements() |
ResponseWriter |
getWrapped() |
protected boolean |
isAttributeAllowed(String name)
Return true if whitelist and blacklist allows specified attribute.
|
protected boolean |
isElementAllowed(String name)
Return true if whitelist and blacklist allows specified element.
|
void |
setBlacklistAttributes(Set<String> blacklistAttributes) |
void |
setBlacklistElements(Set<String> blacklistElements) |
void |
setWhitelistAttributes(Set<String> whitelistAttributes) |
void |
setWhitelistElements(Set<String> whitelistElements) |
void |
setWrapped(ResponseWriter wrapped) |
void |
startDocument() |
void |
startElement(String name,
UIComponent component) |
void |
write(char[] cbuf) |
void |
write(char[] cbuf,
int off,
int len) |
void |
write(int c) |
void |
write(String str) |
void |
write(String str,
int off,
int len) |
void |
writeAttribute(String name,
Object value,
String property) |
void |
writeComment(Object comment) |
void |
writeText(char[] text,
int off,
int len) |
void |
writeText(Object text,
String property) |
void |
writeURIAttribute(String name,
Object value,
String property) |
close, endCDATA, endDocument, flush, getCharacterEncoding, getContentType, startCDATA, writeDoctype, writePreamble, writeText
protected ResponseWriter m_wrapped
protected int m_depth
public LimitedElementsResponseWriter()
public LimitedElementsResponseWriter(ResponseWriter wrapped)
public LimitedElementsResponseWriter(ResponseWriter wrapped, Set<String> whitelistElements)
public LimitedElementsResponseWriter(ResponseWriter wrapped, Set<String> whitelistElements, Set<String> whitelistAttributes)
public Writer append(char c) throws IOException
append
in interface Appendable
append
in class Writer
IOException
public Writer append(CharSequence csq, int start, int end) throws IOException
append
in interface Appendable
append
in class Writer
IOException
public Writer append(CharSequence csq) throws IOException
append
in interface Appendable
append
in class Writer
IOException
public void write(char[] cbuf, int off, int len) throws IOException
write
in class ResponseWriterWrapper
IOException
public void write(char[] cbuf) throws IOException
write
in class Writer
IOException
public void write(int c) throws IOException
write
in class Writer
IOException
public void write(String str, int off, int len) throws IOException
write
in class Writer
IOException
public void write(String str) throws IOException
write
in class Writer
IOException
public ResponseWriter cloneWithWriter(Writer writer)
cloneWithWriter
in class ResponseWriterWrapper
public void endElement(String name) throws IOException
endElement
in class ResponseWriterWrapper
IOException
public void startDocument() throws IOException
startDocument
in class ResponseWriterWrapper
IOException
public void startElement(String name, UIComponent component) throws IOException
startElement
in class ResponseWriterWrapper
IOException
public void writeAttribute(String name, Object value, String property) throws IOException
writeAttribute
in class ResponseWriterWrapper
IOException
public void writeComment(Object comment) throws IOException
writeComment
in class ResponseWriterWrapper
IOException
public void writeText(char[] text, int off, int len) throws IOException
writeText
in class ResponseWriterWrapper
IOException
public void writeText(Object text, String property) throws IOException
writeText
in class ResponseWriterWrapper
IOException
public void writeURIAttribute(String name, Object value, String property) throws IOException
writeURIAttribute
in class ResponseWriterWrapper
IOException
public ResponseWriter getWrapped()
getWrapped
in interface FacesWrapper<ResponseWriter>
getWrapped
in class ResponseWriterWrapper
protected boolean isElementAllowed(String name)
protected boolean isAttributeAllowed(String name)
public void setWrapped(ResponseWriter wrapped)