net.sourceforge.wurfl.core
Interface Device

All Known Implementing Classes:
DefaultDevice

public interface Device

This is interface represent a device connected to the WURFL application.

It enable the user to obtain the capability of the actual device and other useful info. It hides the WURFL repository structure to the other API parts.

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

Method Summary
 Map<String,String> getCapabilities()
          Returns a device's capabilities values by name Map.
 String getCapability(String name)
          Return a device's capability value.
 String getDeviceRootId()
           
 String getId()
          Return the WURFL id of this device
 MarkUp getMarkUp()
          Get the markUp handled by this device.
 MatchType getMatchType()
           
 String getUserAgent()
          Return the user-agent string for this device as defined in WURFL.
 boolean isActualDeviceRoot()
           
 boolean isGeneric()
           
 

Method Detail

getId

String getId()
Return the WURFL id of this device

Returns:
A string representing this device identifier.

getUserAgent

String getUserAgent()
Return the user-agent string for this device as defined in WURFL.

Returns:
A String containing the defined user-agent.

getCapability

String getCapability(String name)
                     throws CapabilityNotDefinedException
Return a device's capability value.

Parameters:
name - The identifier of capability to get.
Returns:
The value of capability.
Throws:
CapabilityNotDefinedException - If this device do not define the given capability.

getCapabilities

Map<String,String> getCapabilities()
Returns a device's capabilities values by name Map.

Returns:
Map containing couples name-value of device's capabilities.

getMarkUp

MarkUp getMarkUp()
Get the markUp handled by this device.

Returns:
A MarkUp instance this device can handle.

isActualDeviceRoot

boolean isActualDeviceRoot()
Returns:
if it is a real device.

getDeviceRootId

String getDeviceRootId()
Returns:
id of root device, (or itself id if it's root)

isGeneric

boolean isGeneric()
Returns:
true if this is a generic device, not totally identified.

getMatchType

MatchType getMatchType()
Returns:
info about the match type that found the device.


Copyright © 2012 ScientiaMobile Inc.. All Rights Reserved.