net.sourceforge.wurfl.core.matchers
Class MotorolaMatcher

java.lang.Object
  extended by net.sourceforge.wurfl.core.matchers.AbstractMatcher
      extended by net.sourceforge.wurfl.core.matchers.MotorolaMatcher
All Implemented Interfaces:
Matcher, ResourcePaths

public final class MotorolaMatcher
extends AbstractMatcher

Version:
$Id: MotorolaMatcher.java 934 2012-03-27 13:34:26Z fulvio.crivellaro $

Field Summary
 
Fields inherited from class net.sourceforge.wurfl.core.matchers.AbstractMatcher
DEBUG, detected, inspectionManager, isDebugEnabled, logger, undetected
 
Fields inherited from interface net.sourceforge.wurfl.core.resource.ResourcePaths
CATCH_ALL_RECOVERY_FILE, WURFL_CONFIG_FILE
 
Constructor Summary
MotorolaMatcher(UserAgentNormalizer normalizer)
          Build AbstractMatcher by handler and collected devices by user-agent.
 
Method Summary
protected  String applyRecoveryMatch(WURFLRequest request)
          if UA contains "MIB/2.2" or "MIB/BER2.2", return "mot_mib22_generic" otherwise return "generic_mobile".
 boolean canHandle(WURFLRequest request)
          Intercept all UAs starting with "Mot-", or containing "MOT-" or "Motorola".
protected  String lookForMatchingUserAgent(String userAgent)
          If UA don't starts with "Mot-","MOT-" or "Motorola" then apply LD(5) otherwise apply default.
 
Methods inherited from class net.sourceforge.wurfl.core.matchers.AbstractMatcher
applyCatchAllRecoveryMatch, applyConclusiveMatch, getFilter, getName, match, normalize, setFilter, setInspectionManager, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MotorolaMatcher

public MotorolaMatcher(UserAgentNormalizer normalizer)
Build AbstractMatcher by handler and collected devices by user-agent.

Parameters:
normalizer -
Method Detail

canHandle

public boolean canHandle(WURFLRequest request)
Intercept all UAs starting with "Mot-", or containing "MOT-" or "Motorola".


lookForMatchingUserAgent

protected String lookForMatchingUserAgent(String userAgent)
If UA don't starts with "Mot-","MOT-" or "Motorola" then apply LD(5) otherwise apply default.

Overrides:
lookForMatchingUserAgent in class AbstractMatcher
Parameters:
userAgent - The user-agent to match against.
Returns:
The collected user-agent matching with given user-agent.

applyRecoveryMatch

protected String applyRecoveryMatch(WURFLRequest request)
if UA contains "MIB/2.2" or "MIB/BER2.2", return "mot_mib22_generic" otherwise return "generic_mobile".

Overrides:
applyRecoveryMatch in class AbstractMatcher
Parameters:
request - The request to match.
Returns:
The device identifier matched from request, at least returns generic.


Copyright © 2012 ScientiaMobile Inc.. All Rights Reserved.