myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mstar...@apache.org
Subject svn commit: r1068467 - /myfaces/trinidad/branches/1.2.12.3.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/AgentNameUtil.java
Date Tue, 08 Feb 2011 16:24:56 GMT
Author: mstarets
Date: Tue Feb  8 16:24:56 2011
New Revision: 1068467

URL: http://svn.apache.org/viewvc?rev=1068467&view=rev
Log:
TRINIDAD-1948 - Trinidad's Agent API Should Support Detection of Web Crawlers

Modified:
    myfaces/trinidad/branches/1.2.12.3.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/AgentNameUtil.java

Modified: myfaces/trinidad/branches/1.2.12.3.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/AgentNameUtil.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/AgentNameUtil.java?rev=1068467&r1=1068466&r2=1068467&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/AgentNameUtil.java
(original)
+++ myfaces/trinidad/branches/1.2.12.3.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/AgentNameUtil.java
Tue Feb  8 16:24:56 2011
@@ -101,6 +101,21 @@ public class AgentNameUtil
     {
       return TrinidadAgent.APPLICATION_KONQUEROR;
     }
+    
+    if(TrinidadAgent.AGENT_GOOGLEBOT.equals(agentName))
+    {
+      return TrinidadAgent.APPLICATION_GOOGLEBOT;
+    }
+    
+    if(TrinidadAgent.AGENT_MSNBOT.equals(agentName))
+    {
+      return TrinidadAgent.APPLICATION_MSNBOT;
+    }
+    
+    if(TrinidadAgent.AGENT_ORACLE_SES.equals(agentName))
+    {
+      return TrinidadAgent.APPLICATION_ORACLE_SES;
+    }
 
     return TrinidadAgent.APPLICATION_UNKNOWN;
   }
@@ -183,6 +198,11 @@ public class AgentNameUtil
     {
       return TrinidadAgent.TYPE_PHONE;
     }
+    
+    if (otype == Agent.TYPE_WEBCRAWLER)
+    {
+      return TrinidadAgent.TYPE_WEBCRAWLER;
+    }
 
     //Default to desktop (This is UIX 2.2 logic)
     return TrinidadAgent.TYPE_DESKTOP;
@@ -223,6 +243,12 @@ public class AgentNameUtil
         return TrinidadAgent.AGENT_KONQUEROR;
       case TrinidadAgent.APPLICATION_EMAIL:
         return TrinidadAgent.AGENT_EMAIL;
+      case TrinidadAgent.APPLICATION_GOOGLEBOT:
+        return TrinidadAgent.AGENT_GOOGLEBOT;
+      case TrinidadAgent.APPLICATION_MSNBOT:
+        return TrinidadAgent.AGENT_MSNBOT;
+      case TrinidadAgent.APPLICATION_ORACLE_SES:
+        return TrinidadAgent.AGENT_ORACLE_SES;
       default:
         return TrinidadAgent.AGENT_UNKNOWN;
     }



Mime
View raw message