|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.wurfl.core.WURFLUtils
public class WURFLUtils
This is a interface to WURFL introspection methods. It is mainly used from
developers. In general it is a facade class to WURFLModel.
| Constructor Summary | |
|---|---|
WURFLUtils(WURFLModel model)
Create a WURFLUtils instance from WURFLModel. |
|
WURFLUtils(WURFLModel model,
DeviceProvider deviceProvider)
Create a WURFLUtils instance from WURFLModel. |
|
| Method Summary | |
|---|---|
Set |
getAllCapabilities()
Facade method of WURFLModel#getAllCapabilities(). |
Set |
getAllDevices()
Return all the Devices managed by the backend WURFLModel. |
Set |
getAllDevicesId()
It is facade method for WURFLModel#getAllDevicesId(). |
Set |
getAllGroups()
It is a facade method of WURFLModel#getAllGroups(). |
Set |
getAllModelDevices()
It is facade method for WURFLModel#getAllDevices() . |
Set |
getCapabilitiesForGroup(String group)
It is a facade method of WURFLModel#getCapabilitiesForGroup(String). |
Device |
getDeviceById(String id)
Return a Device instance identified by the given identifier. |
String |
getGroupByCapability(String capability)
Facade method of WURFLModel#getGroupByCapability(String). |
ModelDevice |
getModelDeviceAncestor(ModelDevice target)
It is a facade method of WURFLModel#getDeviceAncestor(ModelDevice). |
ModelDevice |
getModelDeviceById(String id)
Facade method of WURFLModel#getDeviceById(String). |
ModelDevice |
getModelDeviceFallback(ModelDevice target)
It is a facade method of WURFLModel#getDeviceFallback(ModelDevice). |
List |
getModelDeviceHierarchy(ModelDevice root)
It is facade method of WURFLModel#getDeviceHierarchy(ModelDevice). |
Set |
getModelDevices(Set ids)
Facade method of WURFLModel#getDevices(Set). |
ModelDevice |
getModelDeviceWhereCapabilityIsDefined(ModelDevice target,
String capability)
It is facade method of WURFLModel#getDeviceWhereCapabilityIsDefined(ModelDevice, String). |
String |
getVersion()
Facade method of WURFLModel.getVersion(). |
boolean |
isCapabilityDefined(String capability)
Facade method of WURFLModel#isCapabilityDefined(String). |
boolean |
isDeviceDefined(String id)
Facade method of WURFLModel#isDeviceDefined(String). |
boolean |
isGroupDefined(String group)
It is a facade method of WURFLModel#isGroupDefined(String). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WURFLUtils(WURFLModel model)
model - The backed WURFLModel instance.
public WURFLUtils(WURFLModel model,
DeviceProvider deviceProvider)
model - The backend WURFLModel instance.| Method Detail |
|---|
public String getVersion()
WURFLModel.getVersion().
It returns the version of the WURFL repository (root resource + patches).
public boolean isDeviceDefined(String id)
id - The identifier of probing device.
public ModelDevice getModelDeviceById(String id)
throws DeviceNotDefinedException
id - The identifier of the ModelDevice to retrieve.
DeviceNotDefinedException - if the device with given identifier is not defined by backend
WURFLModel.
public Set getModelDevices(Set ids)
throws DeviceNotDefinedException
A - Set of String containing identifiers of ModelDevices to
retrieve.
ModelDevice.
DeviceNotDefinedExceptionpublic Set getAllDevicesId()
public Set getAllModelDevices()
public List getModelDeviceHierarchy(ModelDevice root)
throws DeviceNotInModelException
root - The ModelDevice root of hierarchy.
root ModelDevice hierarchy.
DeviceNotInModelException - If the root ModelDevice is not contained in
backend WURFLModel.
public ModelDevice getModelDeviceFallback(ModelDevice target)
throws DeviceNotInModelException
target - The ModelDevice device to get ModelDevice
fallback from.
root.
DeviceNotInModelException - If the root is not contained in backend
WURFLModel.
public ModelDevice getModelDeviceAncestor(ModelDevice target)
throws DeviceNotInModelException
target - The device to get ancestor from.
DeviceNotInModelException - If the target ModelDevice is not contained in
backend WURFLModel.public boolean isCapabilityDefined(String capability)
capability - The name of capability to check against.
IllegalArgumentException - if capabilityName is null.public Set getAllCapabilities()
public String getGroupByCapability(String capability)
throws CapabilityNotDefinedException
capability - The name of capability.
CapabilityNotDefinedException - If the backend WURFLModel do not define the capability
capability.
public ModelDevice getModelDeviceWhereCapabilityIsDefined(ModelDevice target,
String capability)
throws CapabilityNotDefinedException,
DeviceNotInModelException
target - The ModelDevice from which start the search of the definition
of capability.capability - The capability identifier to search.
CapabilityNotDefinedException - If the given capability is not defined upon the target
hierarchy.
DeviceNotInModelException - If the target ModelDevice is not contained in
backend WURFLModel.public boolean isGroupDefined(String group)
group - the group identifier to probe.
public Set getAllGroups()
public Set getCapabilitiesForGroup(String group)
throws GroupNotDefinedException
group - The identifier of defining group.
GroupNotDefinedException - If the given group is not defined by backend WURFLModel.
public Device getDeviceById(String id)
throws DeviceNotDefinedException
id - The identifier of Device to get.
DeviceNotDefinedExceptionpublic Set getAllDevices()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||