org.apache.myfaces.trinidadinternal.agent
Class TrinidadAgentImpl

java.lang.Object
  extended by org.apache.myfaces.trinidadinternal.agent.TrinidadAgentImpl
All Implemented Interfaces:
java.lang.Cloneable, org.apache.myfaces.trinidad.context.Agent, TrinidadAgent

public class TrinidadAgentImpl
extends java.lang.Object
implements TrinidadAgent, java.lang.Cloneable

implementation that supports the AdfFacesAgent


Field Summary
 
Fields inherited from interface org.apache.myfaces.trinidadinternal.agent.TrinidadAgent
AGENT_BLAZER, AGENT_ELAINE, AGENT_ICE_BROWSER, AGENT_NETFRONT, AGENT_NETSCAPE, AGENT_PIXO, AGENT_PTG, AGENT_WEBPRO, AGENT_XIINO, APPLICATION_BLACKBERRY, APPLICATION_GECKO, APPLICATION_ICE, APPLICATION_IEXPLORER, APPLICATION_MOZILLA, APPLICATION_NET_FRONT, APPLICATION_NETSCAPE, APPLICATION_PIXO, APPLICATION_PTG, APPLICATION_SAFARI, APPLICATION_SIMPLE_RESULT, APPLICATION_UNKNOWN, APPLICATION_WEB_CLIPPING, APPLICATION_WML, CAP_ACCESS_KEYS, CAP_ADVANCED_BUTTONS, CAP_ADVANCED_FORMS, CAP_ALT_RENDERS_TOOLTIP_ON_IMAGE, CAP_AUTO_COMPLETE_FORM_ELEMENTS, CAP_BMP_TYPE_IMAGE, CAP_CSS_SELECTORS, CAP_DISABLED_FORM_ELEMENTS, CAP_DOM, CAP_EDITING, CAP_FIELDSET, CAP_FRAMES, CAP_GIF_TYPE_IMAGE, CAP_HEIGHT, CAP_ID, CAP_IFRAMES, CAP_IMAGE_STRETCH, CAP_INTRINSIC_EVENTS, CAP_IS_JDEV_JAVASCRIPT_VE, CAP_IS_JDEV_VE, CAP_JPEG_TYPE_IMAGE, CAP_MULTIPLE_WINDOWS, CAP_NAME_IDENTIFICATION, CAP_NAVIGATION, CAP_NOWRAP, CAP_PARTIAL_RENDERING, CAP_PNG_TYPE_IMAGE, CAP_READONLY_FORM_ELEMENTS, CAP_SCRIPTING_SPEED, CAP_STYLE_ATTRIBUTES, CAP_SUPPORTS_DISABLED_OPTIONS, CAP_TABLES, CAP_TARGET, CAP_TEXT_PRESENTATION, CAP_TRANSPARENT_PNG_TYPE_IMAGE, CAP_VALIGN, CAP_WIDTH, CAP_XMLDOM, DOM_CAP_FORM, DOM_CAP_LEVEL_1, DOM_CAP_LEVEL_2, DOM_CAP_NONE, OS_BLACKBERRY, OS_LINUX, OS_MACOS, OS_PALM, OS_PPC, OS_SOLARIS, OS_UNKNOWN, OS_WINDOWS, SCRIPTING_SPEED_CAP_FAST, SCRIPTING_SPEED_CAP_NONE, SCRIPTING_SPEED_CAP_SLOW, SELECTORS_MULTIPLE, SELECTORS_NONE, SELECTORS_SINGLE, STYLES_EXTERNAL, STYLES_INTERNAL, STYLES_NONE, TABLES_CAP_ADVANCED, TABLES_CAP_ADVANCED_ATTRS, TABLES_CAP_BASIC, TYPE_DESKTOP, TYPE_PDA, TYPE_PHONE, TYPE_VOICE
 
Fields inherited from interface org.apache.myfaces.trinidad.context.Agent
AGENT_BLACKBERRY, AGENT_GECKO, AGENT_IE, AGENT_WEBKIT, PLATFORM_BLACKBERRY, PLATFORM_LINUX, PLATFORM_MAC, PLATFORM_MACOS, PLATFORM_PALM, PLATFORM_PPC, PLATFORM_SOLARIS, PLATFORM_WINDOWS, TYPE_TELNET, TYPE_UNKNOWN
 
Constructor Summary
TrinidadAgentImpl(org.apache.myfaces.trinidad.context.Agent agent)
           
TrinidadAgentImpl(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.Agent agent)
           
 
Method Summary
 java.lang.Object clone()
           
 int getAgentApplication()
          Returns the specific application to which we're rendering.
 int getAgentMajorVersion()
          Returns the major version number of the application, or 0 if a version number couldn't be identified.
 java.lang.String getAgentName()
           
 int getAgentOS()
          Returns the client operating system.
 int getAgentType()
          Returns the type of agent to which we're rendering.
 java.lang.String getAgentVersion()
          Returns the full, unparsed version string.
 java.util.Map<java.lang.Object,java.lang.Object> getCapabilities()
           
 java.lang.Object getCapability(CapabilityKey key)
          Returns a capability of a TrinidadAgent
 java.lang.String getHardwareMakeModel()
           
 java.lang.String getPlatformName()
           
 java.lang.String getPlatformVersion()
           
 java.lang.Object getType()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TrinidadAgentImpl

public TrinidadAgentImpl(javax.faces.context.FacesContext context,
                         org.apache.myfaces.trinidad.context.Agent agent)

TrinidadAgentImpl

public TrinidadAgentImpl(org.apache.myfaces.trinidad.context.Agent agent)
Method Detail

getType

public java.lang.Object getType()
Specified by:
getType in interface org.apache.myfaces.trinidad.context.Agent
Returns:
return the Type of Agent.
E.g. desktop, pda, phone, voice

getAgentType

public int getAgentType()
Returns the type of agent to which we're rendering. Currently, only web browsers are understood.

Specified by:
getAgentType in interface TrinidadAgent

getAgentName

public java.lang.String getAgentName()
Specified by:
getAgentName in interface org.apache.myfaces.trinidad.context.Agent
Returns:
return the canonical name of the Agent. Return null if not available.
E.g. gecko, ie, opera

getAgentApplication

public int getAgentApplication()
Returns the specific application to which we're rendering. Returns APPLICATION_UNKNOWN is the application couldn't be identified.

Specified by:
getAgentApplication in interface TrinidadAgent

getAgentVersion

public java.lang.String getAgentVersion()
Description copied from interface: TrinidadAgent
Returns the full, unparsed version string. Returns null if no version string could be identified.

Specified by:
getAgentVersion in interface org.apache.myfaces.trinidad.context.Agent
Specified by:
getAgentVersion in interface TrinidadAgent
Returns:
return the version number of the Agent. Return null if not available.

getAgentMajorVersion

public int getAgentMajorVersion()
Returns the major version number of the application, or 0 if a version number couldn't be identified.

Specified by:
getAgentMajorVersion in interface TrinidadAgent

getPlatformName

public java.lang.String getPlatformName()
Specified by:
getPlatformName in interface org.apache.myfaces.trinidad.context.Agent
Returns:
return the canonical name for the platform. Return null if not available.
E.g ppc, series60

getPlatformVersion

public java.lang.String getPlatformVersion()
Specified by:
getPlatformVersion in interface org.apache.myfaces.trinidad.context.Agent
Returns:
return the version number for the platform. Return null if not available.

getCapabilities

public java.util.Map<java.lang.Object,java.lang.Object> getCapabilities()
Specified by:
getCapabilities in interface org.apache.myfaces.trinidad.context.Agent
Returns:
Map of capability name and value for the current Agent.

getAgentOS

public int getAgentOS()
Returns the client operating system. Returns OS_UNKNOWN if the operating system can't be identified.

Specified by:
getAgentOS in interface TrinidadAgent

getHardwareMakeModel

public java.lang.String getHardwareMakeModel()
Specified by:
getHardwareMakeModel in interface org.apache.myfaces.trinidad.context.Agent
Returns:
return a canonical name for the Hardware make. Return null if not available.
E.g nokia6600, nokia3650, sonyericssonP900 etc

getCapability

public java.lang.Object getCapability(CapabilityKey key)
Description copied from interface: TrinidadAgent
Returns a capability of a TrinidadAgent

Specified by:
getCapability in interface TrinidadAgent
Parameters:
key -
Returns:
Agent's capability value for the key

clone

public java.lang.Object clone()
Specified by:
clone in interface TrinidadAgent
Overrides:
clone in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.