com.guiseframework.platform.web
Class HTTPServletWebDepictContext
java.lang.Object
com.globalmentor.beans.BoundPropertyObject
com.guiseframework.platform.AbstractDepictContext
com.guiseframework.platform.AbstractTextDepictContext
com.guiseframework.platform.AbstractXMLDepictContext
com.guiseframework.platform.AbstractXHTMLDepictContext
com.guiseframework.platform.web.AbstractWebDepictContext
com.guiseframework.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 in UTF-8.
Quirks mode is only used with IE6 in some configurations.
- Author:
- Garret Wilson
| Fields inherited from class com.globalmentor.beans.BoundPropertyObject |
NO_PROPERTY_CHANGE_LISTENERS, NO_VETOABLE_CHANGE_LISTENERS |
| Methods inherited from class com.guiseframework.platform.AbstractXMLDepictContext |
clearDepictText, encode, getDepictStringBuilder, getMessageDigest, getQualifiedName, getXMLNamespacePrefixManager, isHashAttributesGenerated, setHashAttributesGenerated, writeAttribute, writeComment, writeCommentClose, writeCommentOpen, writeDocType, writeDocType, writeElementBegin, writeElementBegin, writeElementEnd |
| Methods inherited from class com.guiseframework.platform.AbstractTextDepictContext |
getDepictText, getIndentLevel, indent, indent, isFormatted, setIndentLevel, unindent, write, write, writeIndent, writeLiteral |
| 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 com.guiseframework.platform.TextDepictContext |
clearDepictText, getDepictStringBuilder, getDepictText, getIndentLevel, indent, indent, isFormatted, setIndentLevel, unindent, write, write, writeIndent, writeLiteral |
| Methods inherited from interface com.globalmentor.beans.PropertyBindable |
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, hasPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener |
HTTPServletWebDepictContext
public HTTPServletWebDepictContext(HTTPServletGuiseRequest guiseRequest,
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 is null.
java.io.IOException - If there was an I/O error loading a needed resource.
getGuiseRequest
protected HTTPServletGuiseRequest getGuiseRequest()
- Returns:
- The Guise HTTP request.
getResponse
protected 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.
isQuirksMode
public boolean isQuirksMode()
- Returns:
- Whether quirks mode is being used.
getAttributeHashAttributeQualifiedName
protected java.lang.String getAttributeHashAttributeQualifiedName()
- Specified by:
getAttributeHashAttributeQualifiedName in class AbstractXMLDepictContext
- Returns:
- The qualified name to use for the attribute hash attribute.
getContentHashAttributeQualifiedName
protected java.lang.String getContentHashAttributeQualifiedName()
- Specified by:
getContentHashAttributeQualifiedName in class AbstractXMLDepictContext
- Returns:
- The qualified name to use for the content hash attribute.
getOutputCharacterEncoding
public com.globalmentor.text.CharacterEncoding getOutputCharacterEncoding()
- Returns:
- The character encoding 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.
getIE6FixClasses
protected java.util.List<GuiseCSSProcessor.IE6FixClass> getIE6FixClasses(java.net.URI styleURI)
- Returns a list of IE6 fix classes for the given stylesheet URI.
If the IE6 classes have not yet been determined for this stylesheet URI, the stylesheet will be loaded and parsed, and the IE6 fix classes cached.
- Parameters:
styleURI - The URI of the stylesheet for which IE6 fix classes should be returned.
- Returns:
- The list of IE6 fix classes for the given stylesheet, which may be empty if the stylesheet could not be loaded.
getAttributeValue
protected java.lang.String getAttributeValue(com.globalmentor.text.xml.QualifiedName elementQualifiedName,
com.globalmentor.text.xml.QualifiedName attributeQualifiedName,
java.lang.String attributeValue)
- Retrieves the value of a given attribute.
This version modifed any class attributes if there are IE6 fix classes and this is not an AJAX call.
- Overrides:
getAttributeValue in class AbstractXMLDepictContext
- Parameters:
elementQualifedName - The qualified name of the element.attributeQualifiedName - The qualified name of the attribute.attributeValue - The default value of the attribute.
- Returns:
- The value of the attribute.
- See Also:
#getIE6FixClasses(),
#isAJAX()
Copyright © 2005-2010 GlobalMentor, Inc. All Rights Reserved.