org.apache.myfaces.trinidad.context
Interface Agent


public interface Agent

The Agent interface describes the client that is making the request that will display the rendered output.

Implementations that provide the set of capabilities must clearly define the names of these capabilities and their values.

Capability names that are implementation private must be defined so using appropriate naming schemes. Trinidad private capability names are prefixed using "-adfinternal-xxx", and such capability names (and their values) may change at anytime (and not guaranteed to be supported in future releases).


Field Summary
static java.lang.String AGENT_BLACKBERRY
          Constant for BlackBerry Browser agent.
static java.lang.String AGENT_GECKO
          Constant for Gecko agent.
static java.lang.String AGENT_IE
          Constant for Internet Explorer agent
static java.lang.String AGENT_WEBKIT
          Constant for Apple Webkit agent.
static java.lang.String PLATFORM_BLACKBERRY
          Constant for blackberry platform
static java.lang.String PLATFORM_LINUX
          Constant for linux platform
static java.lang.String PLATFORM_MAC
          Deprecated.  
static java.lang.String PLATFORM_MACOS
          Constant for MacOS platform
static java.lang.String PLATFORM_PALM
          Constant for plam platform
static java.lang.String PLATFORM_PPC
          Constant for pocket pc platform
static java.lang.String PLATFORM_SOLARIS
          Constant for solaris platform
static java.lang.String PLATFORM_WINDOWS
          Constant for windows platform
static java.lang.Object TYPE_DESKTOP
          Constant for desktop devices
static java.lang.Object TYPE_PDA
          Constant for handheld sized devices (Pocket-PC, Palm)
static java.lang.Object TYPE_PHONE
          Constant for Phone sized devices
static java.lang.Object TYPE_TELNET
          Constant for telnet device type
static java.lang.Object TYPE_UNKNOWN
          Constant for Unknown device type
 
Method Summary
 java.lang.String getAgentName()
           
 java.lang.String getAgentVersion()
           
 java.util.Map<java.lang.Object,java.lang.Object> getCapabilities()
           
 java.lang.String getHardwareMakeModel()
           
 java.lang.String getPlatformName()
           
 java.lang.String getPlatformVersion()
           
 java.lang.Object getType()
           
 

Field Detail

TYPE_UNKNOWN

static final java.lang.Object TYPE_UNKNOWN
Constant for Unknown device type


TYPE_TELNET

static final java.lang.Object TYPE_TELNET
Constant for telnet device type


TYPE_DESKTOP

static final java.lang.Object TYPE_DESKTOP
Constant for desktop devices


TYPE_PDA

static final java.lang.Object TYPE_PDA
Constant for handheld sized devices (Pocket-PC, Palm)


TYPE_PHONE

static final java.lang.Object TYPE_PHONE
Constant for Phone sized devices


PLATFORM_WINDOWS

static final java.lang.String PLATFORM_WINDOWS
Constant for windows platform

See Also:
Constant Field Values

PLATFORM_LINUX

static final java.lang.String PLATFORM_LINUX
Constant for linux platform

See Also:
Constant Field Values

PLATFORM_MACOS

static final java.lang.String PLATFORM_MACOS
Constant for MacOS platform

See Also:
Constant Field Values

PLATFORM_MAC

@Deprecated
static final java.lang.String PLATFORM_MAC
Deprecated. 
Constant for Mac platform

See Also:
Constant Field Values

PLATFORM_PALM

static final java.lang.String PLATFORM_PALM
Constant for plam platform

See Also:
Constant Field Values

PLATFORM_SOLARIS

static final java.lang.String PLATFORM_SOLARIS
Constant for solaris platform

See Also:
Constant Field Values

PLATFORM_PPC

static final java.lang.String PLATFORM_PPC
Constant for pocket pc platform

See Also:
Constant Field Values

PLATFORM_BLACKBERRY

static final java.lang.String PLATFORM_BLACKBERRY
Constant for blackberry platform

See Also:
Constant Field Values

AGENT_IE

static final java.lang.String AGENT_IE
Constant for Internet Explorer agent

See Also:
Constant Field Values

AGENT_GECKO

static final java.lang.String AGENT_GECKO
Constant for Gecko agent. Used for all Gecko based agents like Mozilla, Netscape 6+

See Also:
Constant Field Values

AGENT_WEBKIT

static final java.lang.String AGENT_WEBKIT
Constant for Apple Webkit agent. Used for all Webkit based agent like Safari

See Also:
Constant Field Values

AGENT_BLACKBERRY

static final java.lang.String AGENT_BLACKBERRY
Constant for BlackBerry Browser agent. (Note the distinction from the BlackBerry platform. The BlackBerry Browser agent runs on the BlackBerry platform. It is possible for other agents to run on the BlackBerry platform.)

See Also:
Constant Field Values
Method Detail

getType

java.lang.Object getType()
Returns:
return the Type of Agent. Returns TYPE_UNKNOWN if not available.
E.g. desktop, pda, phone

getAgentName

java.lang.String getAgentName()
Returns:
return the canonical name of the agent (browser application). Returns null if not available.
E.g. gecko, ie, opera, pocketie

getAgentVersion

java.lang.String getAgentVersion()
Returns:
return the version number of the agent (browser application). Return null if not available.

getPlatformName

java.lang.String getPlatformName()
Returns:
return the canonical name for the platform. Returns null if not available.
E.g ppc, series60, windows, mac, linux, solaris

getPlatformVersion

java.lang.String getPlatformVersion()
Returns:
return the version number for the platform. Returns null if not available.

getHardwareMakeModel

java.lang.String getHardwareMakeModel()
Returns:
return a canonical name for the Hardware make and Model. Re turns null if not available.
E.g nokia6600, sonyericssonP900, nokai3650i

getCapabilities

java.util.Map<java.lang.Object,java.lang.Object> getCapabilities()
Returns:
Map of capability names and their values for the current client request.
Some of the available capability names are:
height- provides the screen height in pixels of the Agent as an Integer.
width- provides the screen width in pixels of the Agent as an Integer.
dom- provides the DOM API support of the agent as a String. Possible values are: level2, level1, form, and none.
frames- returns a Boolean value signifying whether or not the Agent supports frames.
accessKeys- returns a Boolean value signifying whether or not the Agent supports accessKeys.


Copyright © 2001-2008 The Apache Software Foundation. All Rights Reserved.