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 StringDEFAULTstatic StringDEFAULT_DEVICEstatic StringFORCE_DEVICE_PARAMETER_NAMEstatic StringSWITCH_DEFAULT_DEVICE_PARAM_NAME
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcorrectWithTemplate(Template template)voidforceDefault()force device to be default deviceStringgetCode()static DevicegetDevice(ContentContext ctx)static DevicegetFakeDevice(String userAgent)StringgetLabel()StringgetRealCode()StringgetUserAgent()booleanisDefault()booleanisForced()booleanisHuman()booleanisJavascript()booleanisMobileDevice()booleanisOld()booleanisPdf()booleanisPointerDevice()static voidmain(String[] args)voidsetForcedCode(String forcedCode)protected voidsetLabel(String label)protected voidsetUserAgent(String userAgent)StringtoString()voidunforceDefault()
-
-
-
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)
-
-