com.wewebu.ow.server.ui.ua
Enum OwOSFamily

java.lang.Object
  extended by java.lang.Enum<OwOSFamily>
      extended by com.wewebu.ow.server.ui.ua.OwOSFamily
All Implemented Interfaces:
Serializable, Comparable<OwOSFamily>

public enum OwOSFamily
extends Enum<OwOSFamily>

HTTP user agent pattern based operating system family model. Enumeration elements are capable of decoding themselves from user agent strings, operating system user agent tokens or enumeratrion elemenrt string name.

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com

Since:
4.1.1.0

Enum Constant Summary
OS_X
           
UNKNOWN
           
WINDOWS
           
 
Method Summary
static OwOSFamily findFirst(String userAgent)
          User agent string OS family parse-search
static OwOSFamily from(String family)
           
static OwOSFamily fromFamilyName(String familyName)
           
 String getFamilyName()
           
 Pattern getPattern()
           
static OwOSFamily matchPattern(String family)
           
static OwOSFamily valueOf(String name)
          Returns the enum constant of this type with the specified name.
static OwOSFamily[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

WINDOWS

public static final OwOSFamily WINDOWS

OS_X

public static final OwOSFamily OS_X

UNKNOWN

public static final OwOSFamily UNKNOWN
Method Detail

values

public static OwOSFamily[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (OwOSFamily c : OwOSFamily.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static OwOSFamily valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

fromFamilyName

public static OwOSFamily fromFamilyName(String familyName)
Parameters:
familyName -
Returns:
the operation system family enumeration element that has the given name or UNKNOWN if there is no family defined with the give name

findFirst

public static OwOSFamily findFirst(String userAgent)
User agent string OS family parse-search

Parameters:
userAgent -
Returns:
the operating system family of the first operating system token found in the given user agent string or UNKNOWN if no known operating system token is found

matchPattern

public static OwOSFamily matchPattern(String family)
Parameters:
family -
Returns:
the first enumeration element that has a matching pattern for the given family string or UNKNOWN if no element has a matching pattern

from

public static OwOSFamily from(String family)
Parameters:
family -
Returns:
the operating system family that matches the given string by name , pattern ,by user agent parse-search or by enumeration element definition name in this exact order

getFamilyName

public String getFamilyName()

getPattern

public Pattern getPattern()


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.