EN · DE · RU · FR · ES

#811: UserAgentDevice.java

projectforge-business/src/main/java/org/projectforge/web/session/UserAgentDevice.java Enum, projectforge-business/src/main/java/org/projectforge/web/session/UserAgentDevice.java 82 lines · 47 code · 30 comments · 5 blank
Enumeration of client device types detected from the HTTP User-Agent header. Stored in MySession for mobile-aware UI rendering.

Architecture

Ten device values are recognized: ANDROID, BLACKBERRY, IPHONE, IPAD, IPOD, SMARTPHONE, SYMBIAN, WAP, WINDOWS_MOBILE, and UNKNOWN. Note the historical quirk: iPad detection contains a bug — the check for "ipad" incorrectly maps to IPOD instead of a separate IPAD constant.

Key methods:

This enum feeds into the session layer to adjust page rendering for mobile clients — e.g., simplified layouts, touch-optimized controls. Unlike UserAgentBrowser which identifies the software, UserAgentDevice identifies the hardware platform.

Git History

868d6abb7 2025 -> 2026
63081666f Source file headers: 2024-> 2025.
b6092df09 Copyright 2023 -> 2024
ab45d51fa Copyright 2001-2022 -> 2001-2023.
5f7ef41b8 Copyright 2021 -> 2022
ceb63e8a1 Source code header: (C) 2001-2021.
7c79f1922 Copyright of source header -> 2020.
000ca723d Remove pointless boolean expressions (business)
dd5ca38ac CopyRight of all java file-header updated or created.
9ebb88522 Initial commit