public class AjaxDevice extends GenericDevice
Constructor and Description |
---|
AjaxDevice() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getContentType()
Returns
text/html |
java.lang.String |
getDocType()
Returns
<! |
boolean |
isCacheable()
Return false to indicate it is not cacheable.
|
java.lang.Boolean |
isCompatible(java.lang.String userAgent)
Returns null to indicate unknown.
|
java.lang.String |
packageToPath(java.lang.String pkg)
Converts a package to a path that can be accessible by the class loader
(classpath).
|
void |
reloadMessages(java.util.Locale locale)
Reloads the client-side messages in the specified locale.
|
java.lang.String |
toAbsolutePath(java.lang.String path)
Converts a relative path to an absolute path that can be accessible by
the class loader (classpath).
|
addEmbedded, getEmbedded, getServerPushClass, getType, getUnavailableMessage, init, isSupported, matches, sessionDidActivate, sessionWillPassivate, setServerPushClass, setUnavailableMessage
public boolean isCacheable()
isCacheable
in interface Device
isCacheable
in class GenericDevice
public java.lang.Boolean isCompatible(java.lang.String userAgent)
GenericDevice
isCompatible
in interface Device
isCompatible
in class GenericDevice
userAgent
- represents a client.
For HTTP clients, It is the user-agent header.Execution.getUserAgent()
,
Devices.getDeviceByClient(java.lang.String)
public java.lang.String getContentType()
text/html
public java.lang.String getDocType()
<!DOCTYPE html>
. (since 7.0.0)getDocType
in interface Device
getDocType
in class GenericDevice
public java.lang.String packageToPath(java.lang.String pkg)
Default: "/js/" + pkg + ".wpd";
packageToPath
in interface Device
packageToPath
in class GenericDevice
public java.lang.String toAbsolutePath(java.lang.String path)
Default: "/js/" + path (if path doesn't start with '/' or '~').
toAbsolutePath
in interface Device
toAbsolutePath
in class GenericDevice
path
- the path (never null).
It is assumed to be a relative path if not starting with '/' or '~'.public void reloadMessages(java.util.Locale locale) throws java.io.IOException
GenericDevice
Default: throw UnsupportedOperationException.
reloadMessages
in interface Device
reloadMessages
in class GenericDevice
locale
- the locale. If null, Locales.getCurrent()
is assumed.java.io.IOException
Copyright © 2005-2011 Potix Corporation. All Rights Reserved.