org.apache.myfaces.trinidadinternal.agent
Class AgentImpl

java.lang.Object
  extended by org.apache.myfaces.trinidadinternal.agent.DefaultAgent
      extended by org.apache.myfaces.trinidadinternal.agent.AgentImpl
All Implemented Interfaces:
org.apache.myfaces.trinidad.context.Agent

public class AgentImpl
extends DefaultAgent

The implementation of agent interface

This implementation supports agents recognized by all uix22 This class returns name strings (instead of int's) Certain agents/platforms have been renamed - using "webkit" (instead of safari), on recommendation from uix team - using "gecko" for all gecko based browsers - using "ppc" (instead of windows) for platform


Field Summary
 
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_DESKTOP, TYPE_PDA, TYPE_PHONE, TYPE_TELNET, TYPE_UNKNOWN
 
Constructor Summary
AgentImpl()
           
AgentImpl(boolean nullAgentEntry)
           
 
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()
           
 void setAgent(java.lang.String agent)
           
 void setAgentEntryToNULL()
           
 void setAgentVersion(java.lang.String version)
           
 void setMakeModel(java.lang.String makemodel)
           
 void setPlatform(java.lang.String platform)
           
 void setPlatformVersion(java.lang.String version)
           
 void setType(java.lang.Object type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgentImpl

public AgentImpl()

AgentImpl

public AgentImpl(boolean nullAgentEntry)
Method Detail

getType

public java.lang.Object getType()
Specified by:
getType in interface org.apache.myfaces.trinidad.context.Agent
Overrides:
getType in class DefaultAgent
Returns:
return the Type of Agent. Returns TYPE_UNKNOWN if not available.
E.g. desktop, pda, phone

getAgentName

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

getAgentVersion

public java.lang.String getAgentVersion()
Specified by:
getAgentVersion in interface org.apache.myfaces.trinidad.context.Agent
Overrides:
getAgentVersion in class DefaultAgent
Returns:
return the version number of the Agent. Return null if not available.

getPlatformName

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

getPlatformVersion

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

getHardwareMakeModel

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

getCapabilities

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

setType

public void setType(java.lang.Object type)

setAgent

public void setAgent(java.lang.String agent)

setAgentVersion

public void setAgentVersion(java.lang.String version)

setPlatform

public void setPlatform(java.lang.String platform)

setPlatformVersion

public void setPlatformVersion(java.lang.String version)

setMakeModel

public void setMakeModel(java.lang.String makemodel)

setAgentEntryToNULL

public void setAgentEntryToNULL()


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