KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jahia > services > htmleditors > MozillaGeckoTester


1 package org.jahia.services.htmleditors;
2
3 /**
4  * <p>Title: Tester for Mozilla & Gecko compatibility </p>
5  * <p>Description: </p>
6  * <p>Copyright: Copyright (c) 2002</p>
7  * <p>Company: Jahia Ltd</p>
8  * @author Serge Huber
9  * @version 1.0
10  */

11
12 public class MozillaGeckoTester implements EditorCompatibilityTesteable {
13     public MozillaGeckoTester() {
14     }
15
16     public boolean isCompatible(ClientCapabilities clientCapabilities) {
17         String JavaDoc clientAgent = clientCapabilities.getClientAgent();
18         if (!(clientAgent.indexOf("Mozilla") != -1)) {
19             return false;
20         }
21         if (!(clientAgent.indexOf("Gecko") != -1)) {
22             return false;
23         }
24         return true;
25     }
26
27 }
Popular Tags