Package io.guise.framework.platform.web
Class HTTPServletWebPlatform
java.lang.Object
io.guise.framework.platform.AbstractPlatform
io.guise.framework.platform.web.AbstractWebPlatform
io.guise.framework.platform.web.HTTPServletWebPlatform
- All Implemented Interfaces:
Platform
,WebPlatform
A web platform based upon an HTTP servlet.
- Author:
- Garret Wilson
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.guise.framework.platform.web.WebPlatform
WebPlatform.HTMLEditor, WebPlatform.PollCommand
-
Field Summary
Fields inherited from class io.guise.framework.platform.web.AbstractWebPlatform
DEFAULT_POLL_INTERVAL, DEPICT_ID_STRING_PREFIX
Fields inherited from interface io.guise.framework.platform.web.WebPlatform
AJAX_JAVASCRIPT_PATH, AJAX_MIN_JAVASCRIPT_PATH, ATTRIBUTE_ATTRIBUTE_HASH, ATTRIBUTE_CLASS_CONTENT, ATTRIBUTE_CONTENT_HASH, ATTRIBUTE_CONTENT_TYPE, ATTRIBUTE_PATCH_TYPE, ATTRIBUTE_PATCH_TYPE_NO_VALUE, ATTRIBUTE_PATCH_TYPE_NONE, ATTRIBUTE_PATCH_TYPE_TEMP, BLANK_MP3_PATH, CKEDITOR_JAVASCRIPT_PATH, CKEDITOR_MIN_JAVASCRIPT_PATH, CKEDITOR_VERSION, DOM_JAVASCRIPT_PATH, DOM_MIN_JAVASCRIPT_PATH, DOMREADY_JAVASCRIPT_PATH, DOMREADY_MIN_JAVASCRIPT_PATH, ELEMENT_IMG_ATTRIBUTE_ORIGINAL_SRC, ELEMENT_IMG_ATTRIBUTE_ROLLOVER_SRC, ELEMENT_TEXTAREA_ATTRIBUTE_MULTILINE, GOOGLE_GEARS_JAVASCRIPT_PATH, GOOGLE_GEARS_MIN_JAVASCRIPT_PATH, GUISE_AJAX_REQUEST_MEDIA_TYPE, GUISE_AJAX_RESPONSE_MEDIA_TYPE, GUISE_EMPTY_HTML_DOCUMENT_PATH, GUISE_FLASH_PATH, GUISE_JAVASCRIPT_PATH, GUISE_MIN_JAVASCRIPT_PATH, GUISE_ML_NAMESPACE_PREFIX, GUISE_ML_NAMESPACE_URI, GUISE_SESSION_UUID_URI_QUERY_PARAMETER, GUISE_VERSION_URI_QUERY_PARAMETER, GUISE_XHTML_DTD_PUBLIC_ID, HTML_EDITOR, JAVASCRIPT_JAVASCRIPT_PATH, JAVASCRIPT_MIN_JAVASCRIPT_PATH, TINYMCE_JAVASCRIPT_PATH, TINYMCE_MIN_JAVASCRIPT_PATH
-
Constructor Summary
ConstructorDescriptionHTTPServletWebPlatform
(GuiseApplication application, javax.servlet.http.HttpSession httpSession, javax.servlet.http.HttpServletRequest httpRequest) Application and request constructor. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves information and functionality related to the current depiction.javax.servlet.http.HttpSession
void
selectPlatformFiles
(boolean multiple, ValueSelectListener<Collection<PlatformFile>> platformFileSelectListener) Selects one or more files on the platform, using the appropriate selection functionality for the platform.void
sendResource
(com.globalmentor.net.URIPath resourcePath) Sends a resource to the platform.void
sendResource
(com.globalmentor.net.URIPath resourcePath, Bookmark bookmark) Sends a resource to the platform with the specified bookmark.void
sendResource
(URI resourceURI) Sends a resource to the platform.void
sendResource
(URI resourceURI, Bookmark bookmark) Sends a resource to the platform.void
uploadPlatformFiles
(String destinationPath, Bookmark destinationBookmark, com.globalmentor.event.ProgressListener progressListener, PlatformFile... platformFiles) Uploads files from the platform.Methods inherited from class io.guise.framework.platform.web.AbstractWebPlatform
discontinuePollInterval, getDepictID, getDepictIDString, getEnvironment, getPollInterval, getSendMessageQueue, requestPollInterval, setPollInterval
Methods inherited from class io.guise.framework.platform.AbstractPlatform
generateDepictID, getApplication, getDepictedObject, getDepictLock, getDepictor, getDepictorClass, getRegisteredDepictorClass, registerDepictedObject, registerDepictorClass, unregisterDepictedObject
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.Platform
generateDepictID, getApplication, getDepictedObject, getDepictLock, getDepictor, getEnvironment, registerDepictedObject, unregisterDepictedObject
Methods inherited from interface io.guise.framework.platform.web.WebPlatform
discontinuePollInterval, getDepictID, getDepictIDString, getPollInterval, getSendMessageQueue, requestPollInterval, setPollInterval
-
Constructor Details
-
HTTPServletWebPlatform
public HTTPServletWebPlatform(GuiseApplication application, javax.servlet.http.HttpSession httpSession, javax.servlet.http.HttpServletRequest httpRequest) Application and request constructor. This implementation updates the environment from the initial request cookies- Parameters:
application
- The Guise application running on this platform.httpSession
- The HTTP servlet session with which this platform is associated.httpRequest
- The HTTP servlet request.- Throws:
NullPointerException
- if the given application, HTTP session, and/or HTTP request isnull
.
-
-
Method Details
-
getHTTPSession
public javax.servlet.http.HttpSession getHTTPSession()- Returns:
- The HTTP servlet session with which this platform is associated.
-
getClientProduct
- Specified by:
getClientProduct
in interfacePlatform
- Specified by:
getClientProduct
in interfaceWebPlatform
- Returns:
- The user agent client, such as a browser, used to access Guise on this platform.
-
getJavaScriptProduct
- Returns:
- The JavaScript supported on this platform, or
null
if JavaScript is not supported or the JavaScript support is not yet known.
-
getDepictContext
Description copied from interface:WebPlatform
Retrieves information and functionality related to the current depiction.- Specified by:
getDepictContext
in interfacePlatform
- Specified by:
getDepictContext
in interfaceWebPlatform
- Returns:
- A context for the current depiction.
-
selectPlatformFiles
public void selectPlatformFiles(boolean multiple, ValueSelectListener<Collection<PlatformFile>> platformFileSelectListener) Description copied from interface:Platform
Selects one or more files on the platform, using the appropriate selection functionality for the platform.- Specified by:
selectPlatformFiles
in interfacePlatform
- Parameters:
multiple
- Whether multiple files should be allowed to be selected.platformFileSelectListener
- The listener that will be notified when platform files are selected.
-
uploadPlatformFiles
public void uploadPlatformFiles(String destinationPath, Bookmark destinationBookmark, com.globalmentor.event.ProgressListener progressListener, PlatformFile... platformFiles) Uploads files from the platform.- Parameters:
destinationPath
- The path representing the destination of the platform files, relative to the application.destinationBookmark
- The bookmark to be used in uploading the platform files to the destination path, ornull
if no bookmark should be used.progressListener
- The listener that will be notified when progress is made for a particular platform file upload.platformFiles
- That platform files to upload.- Throws:
NullPointerException
- if the given destination path and/or listener isnull
.IllegalArgumentException
- if the provided path specifies a URI scheme (i.e. the URI is absolute) and/or authority.IllegalArgumentException
- if the provided path is absolute.IllegalStateException
- if one or more of the specified platform files can no longer be uploaded because, for example, other platform files have since been selected.
-
sendResource
public void sendResource(com.globalmentor.net.URIPath resourcePath) Description copied from interface:Platform
Sends a resource to the platform.- Specified by:
sendResource
in interfacePlatform
- Parameters:
resourcePath
- The path of the resource to send, relative to the application.
-
sendResource
Description copied from interface:Platform
Sends a resource to the platform.- Specified by:
sendResource
in interfacePlatform
- Parameters:
resourceURI
- The URI of the resource to send, relative to the application.
-
sendResource
Description copied from interface:Platform
Sends a resource to the platform with the specified bookmark.- Specified by:
sendResource
in interfacePlatform
- Parameters:
resourcePath
- The path of the resource to send, relative to the application.bookmark
- The bookmark at the given path, ornull
if there is no bookmark.
-
sendResource
Sends a resource to the platform.- Specified by:
sendResource
in interfacePlatform
- Parameters:
resourceURI
- The URI of the resource to send, relative to the application.bookmark
- The bookmark at the given path, ornull
if there is no bookmark.- Throws:
NullPointerException
- if the given URI isnull
.
-