Class BrowserDetector

java.lang.Object
sk.iway.iwcm.stat.BrowserDetector
All Implemented Interfaces:
Serializable

public class BrowserDetector extends Object implements Serializable
Parse User-Agent string to detect browser name, version and platform.
See Also:
  • Field Details

  • Constructor Details

    • BrowserDetector

      public BrowserDetector(String userAgentString)
    • BrowserDetector

      public BrowserDetector(javax.servlet.http.HttpServletRequest request)
      Konstruktor objektu, nemal by sa pouzivat, treba pouzivat getInstance(request)
      Parameters:
      request -
  • Method Details

    • getInstance

      public static BrowserDetector getInstance(javax.servlet.http.HttpServletRequest request)
      Ziska instanciu detektora prehliadaca a ulozi do session na neskorsie pouzitie
      Parameters:
      request -
      Returns:
    • isStatIpAllowedFast

      public static boolean isStatIpAllowedFast(javax.servlet.http.HttpServletRequest request)
    • parse

      public void parse(javax.servlet.http.HttpServletRequest request)
      Helper method to initialize this class.
    • isStatIpAllowed

      public boolean isStatIpAllowed()
    • isStatUserAgentAllowed

      public boolean isStatUserAgentAllowed()
    • getBrowserName

      public String getBrowserName()
    • getBrowserPlatform

      public String getBrowserPlatform()
    • getBrowserVersion

      public String getBrowserVersion()
    • getBrowserVersionShort

      public String getBrowserVersionShort()
    • getUserAgentString

      public String getUserAgentString()
    • getBrowserSubplatform

      public String getBrowserSubplatform()
    • isAmp

      public boolean isAmp()
    • isTablet

      public boolean isTablet()
    • isPhone

      public boolean isPhone()
    • isDesktop

      public boolean isDesktop()
    • isSmartphoneOrTablet

      public boolean isSmartphoneOrTablet()
      Vrati true ak sa jedna o iPhone, iPad alebo Android zariadenie
      Returns:
    • isSmartphoneOrTablet

      public static boolean isSmartphoneOrTablet(javax.servlet.http.HttpServletRequest request)
      Vrati true ak sa jedna o iPhone, iPad alebo Android zariadenie
      Parameters:
      request -
      Returns:
    • getBrowserDeviceType

      public String getBrowserDeviceType()
    • getBrowserUaId

      public int getBrowserUaId()
    • getPlatformId

      public int getPlatformId()
    • getSubplatformId

      public int getSubplatformId()
    • getCountry

      public String getCountry()
      Max 4 pismenkovy kod krajiny
      Returns: