Package io.guise.framework.platform.web
Class HTTPServletWebDepictContext
- java.lang.Object
-
- com.globalmentor.beans.BoundPropertyObject
-
- io.guise.framework.platform.AbstractDepictContext
-
- io.guise.framework.platform.AbstractTextDepictContext
-
- io.guise.framework.platform.AbstractXMLDepictContext
-
- io.guise.framework.platform.AbstractXHTMLDepictContext
-
- io.guise.framework.platform.web.AbstractWebDepictContext
-
- io.guise.framework.platform.web.HTTPServletWebDepictContext
-
- All Implemented Interfaces:
com.globalmentor.beans.PropertyBindable
,com.globalmentor.beans.PropertyConstrainable
,DepictContext
,TextDepictContext
,WebDepictContext
,XHTMLDepictContext
,XMLDepictContext
public class HTTPServletWebDepictContext extends AbstractWebDepictContext
A web depict context of an HTTP servlet.The output stream defaults to
text/plain
encoded inUTF-8
.- Author:
- Garret Wilson
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.guise.framework.platform.XMLDepictContext
XMLDepictContext.ElementState
-
-
Field Summary
-
Fields inherited from class com.globalmentor.beans.BoundPropertyObject
NO_PROPERTY_CHANGE_LISTENERS, NO_VETOABLE_CHANGE_LISTENERS
-
Fields inherited from interface io.guise.framework.platform.XHTMLDepictContext
CSS_PROPERTY_BORDER_X_COLOR_TEMPLATE, CSS_PROPERTY_BORDER_X_STYLE_TEMPLATE, CSS_PROPERTY_BORDER_X_WIDTH_TEMPLATE, CSS_PROPERTY_BORDER_X_Y_RADIUS_TEMPLATE, CSS_PROPERTY_MARGIN_X_TEMPLATE, CSS_PROPERTY_PADDING_X_TEMPLATE, CSS_SIDES
-
-
Constructor Summary
Constructors Constructor Description HTTPServletWebDepictContext(HTTPServletGuiseRequest guiseRequest, javax.servlet.http.HttpServletResponse response, GuiseSession session, Destination destination)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.globalmentor.xml.QualifiedName
getAttributeHashAttributeQualifiedName()
protected com.globalmentor.xml.QualifiedName
getContentHashAttributeQualifiedName()
java.net.URI
getDepictionURI()
protected HTTPServletGuiseRequest
getGuiseRequest()
java.nio.charset.Charset
getOutputCharset()
com.globalmentor.net.ContentType
getOutputContentType()
protected javax.servlet.http.HttpServletResponse
getResponse()
void
setOutputContentType(com.globalmentor.net.ContentType contentType)
Sets the content type of the text output.-
Methods inherited from class io.guise.framework.platform.web.AbstractWebDepictContext
appendCSSValue, appendCSSValue, appendCSSValue, appendCSSValue, appendCSSValue, appendCSSValue, appendCSSValue, appendCSSValue, getCSSStyleString, getPlatform, isQuirksMode
-
Methods inherited from class io.guise.framework.platform.AbstractXHTMLDepictContext
appendAttributeName, isAllDataAttributes, isDataAttributeNamespaceURI, registerDataAttributeNamespaceURI, setAllDataAttributes, writeJavaScriptElement, writeMetaElement, writeMetaElement
-
Methods inherited from class io.guise.framework.platform.AbstractXMLDepictContext
appendAttribute, appendAttributeValue, clearDepictText, encode, getAttributeValue, getDepictStringBuilder, getMessageDigest, getQualifiedName, getXMLNamespacePrefixManager, isHashAttributesGenerated, setHashAttributesGenerated, writeAttribute, writeComment, writeCommentClose, writeCommentOpen, writeDocType, writeDocType, writeDocType, writeDocType, writeElementBegin, writeElementBegin, writeElementEnd
-
Methods inherited from class io.guise.framework.platform.AbstractTextDepictContext
getDepictText, getIndentLevel, indent, indent, isFormatted, setIndentLevel, unindent, write, write, writeIndent, writeLiteral
-
Methods inherited from class io.guise.framework.platform.AbstractDepictContext
getDepictionURI, getDepictionURI, getDestination, getSession, getStyles
-
Methods inherited from class com.globalmentor.beans.BoundPropertyObject
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, createPostponedPropertyChangeEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getForwardPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeSupport, getRepeatPropertyChangeListener, getRepeatVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, getVetoableChangeSupport, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.guise.framework.platform.DepictContext
getDepictionURI, getDepictionURI, getDestination, getSession, getStyles
-
Methods inherited from interface com.globalmentor.beans.PropertyBindable
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, hasPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Methods inherited from interface io.guise.framework.platform.TextDepictContext
clearDepictText, getDepictStringBuilder, getDepictText, getIndentLevel, indent, indent, isFormatted, setIndentLevel, unindent, write, write, writeIndent, writeLiteral
-
Methods inherited from interface io.guise.framework.platform.XHTMLDepictContext
isAllDataAttributes, isDataAttributeNamespaceURI, registerDataAttributeNamespaceURI, setAllDataAttributes, writeJavaScriptElement, writeMetaElement, writeMetaElement
-
Methods inherited from interface io.guise.framework.platform.XMLDepictContext
getQualifiedName, writeAttribute, writeComment, writeCommentClose, writeCommentOpen, writeDocType, writeDocType, writeDocType, writeDocType, writeElementBegin, writeElementBegin, writeElementEnd
-
-
-
-
Constructor Detail
-
HTTPServletWebDepictContext
public HTTPServletWebDepictContext(HTTPServletGuiseRequest guiseRequest, javax.servlet.http.HttpServletResponse response, GuiseSession session, Destination destination) throws java.io.IOException
Constructor.- Parameters:
guiseRequest
- Guise request information.response
- The HTTP servlet response.session
- The Guise user session of which this context is a part.destination
- The destination with which this context is associated.- Throws:
java.lang.NullPointerException
- if the given Guise request, session, and/or destination isnull
.java.io.IOException
- If there was an I/O error loading a needed resource.
-
-
Method Detail
-
getGuiseRequest
protected HTTPServletGuiseRequest getGuiseRequest()
- Returns:
- The Guise HTTP request.
-
getResponse
protected javax.servlet.http.HttpServletResponse getResponse()
- Returns:
- The HTTP servlet response.
-
getDepictionURI
public java.net.URI getDepictionURI()
- Returns:
- The current full absolute URI for this depiction, including any query.
-
getAttributeHashAttributeQualifiedName
protected com.globalmentor.xml.QualifiedName getAttributeHashAttributeQualifiedName()
- Specified by:
getAttributeHashAttributeQualifiedName
in classAbstractXMLDepictContext
- Returns:
- The qualified name to use for the attribute hash attribute.
-
getContentHashAttributeQualifiedName
protected com.globalmentor.xml.QualifiedName getContentHashAttributeQualifiedName()
- Specified by:
getContentHashAttributeQualifiedName
in classAbstractXMLDepictContext
- Returns:
- The qualified name to use for the content hash attribute.
-
getOutputCharset
public java.nio.charset.Charset getOutputCharset()
- Returns:
- The charset currently used for the text output.
-
getOutputContentType
public com.globalmentor.net.ContentType getOutputContentType()
- Returns:
- The current content type of the text output.
-
setOutputContentType
public void setOutputContentType(com.globalmentor.net.ContentType contentType)
Sets the content type of the text output.This implementation removes all parameters and adds a character set parameter of the current encoding.
- Parameters:
contentType
- The content type of the text output.
-
-