Package org.javlo.rendering
Class Device
- java.lang.Object
-
- org.javlo.rendering.Device
-
- All Implemented Interfaces:
Serializable
public class Device extends Object implements Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT
static String
DEFAULT_DEVICE
static String
FORCE_DEVICE_PARAMETER_NAME
static String
SWITCH_DEFAULT_DEVICE_PARAM_NAME
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
correctWithTemplate(Template template)
void
forceDefault()
force device to be default deviceString
getCode()
static Device
getDevice(ContentContext ctx)
static Device
getFakeDevice(String userAgent)
String
getLabel()
String
getRealCode()
String
getUserAgent()
boolean
isDefault()
boolean
isForced()
boolean
isHuman()
boolean
isJavascript()
boolean
isMobileDevice()
boolean
isOld()
boolean
isPdf()
boolean
isPointerDevice()
static void
main(String[] args)
void
setForcedCode(String forcedCode)
protected void
setLabel(String label)
protected void
setUserAgent(String userAgent)
String
toString()
void
unforceDefault()
-
-
-
Field Detail
-
FORCE_DEVICE_PARAMETER_NAME
public static final String FORCE_DEVICE_PARAMETER_NAME
- See Also:
- Constant Field Values
-
DEFAULT
public static final String DEFAULT
- See Also:
- Constant Field Values
-
DEFAULT_DEVICE
public static final String DEFAULT_DEVICE
- See Also:
- Constant Field Values
-
SWITCH_DEFAULT_DEVICE_PARAM_NAME
public static final String SWITCH_DEFAULT_DEVICE_PARAM_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getDevice
public static final Device getDevice(ContentContext ctx)
-
correctWithTemplate
public void correctWithTemplate(Template template)
-
forceDefault
public void forceDefault()
force device to be default device
-
setForcedCode
public void setForcedCode(String forcedCode)
-
getCode
public String getCode()
-
getLabel
public String getLabel()
-
getRealCode
public String getRealCode()
-
getUserAgent
public String getUserAgent()
-
isDefault
public boolean isDefault()
-
isPdf
public boolean isPdf()
-
isPointerDevice
public boolean isPointerDevice()
-
isMobileDevice
public boolean isMobileDevice()
-
setLabel
protected void setLabel(String label)
-
setUserAgent
protected void setUserAgent(String userAgent)
-
isHuman
public boolean isHuman()
-
isOld
public boolean isOld()
-
isJavascript
public boolean isJavascript()
-
isForced
public boolean isForced()
-
unforceDefault
public void unforceDefault()
-
main
public static void main(String[] args)
-
-