|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface WURFLModel
This interface is used to access to the ModelDevices. The class need
access to the ModelDevices, must to use this interface.
The main aim of this interface is to hold the object model of WURFL
repository, the implementing classes can held the ModelDevices
instance in several different manner.
| Method Summary | |
|---|---|
Set |
getAllCapabilities()
Return all capabilities name defined by held ModelDevices. |
Set |
getAllDevices()
Return all defined devices. |
Set |
getAllDevicesId()
Return all defined devices identifiers. |
Set |
getAllGroups()
Return all defined group's identifiers. |
Set |
getCapabilitiesForGroup(String group)
Return the capabilities defined in the given group. |
ModelDevice |
getDeviceAncestor(ModelDevice target)
Return a ModelDevice ancestor. |
ModelDevice |
getDeviceById(String id)
Returns ModelDevice by his id. |
ModelDevice |
getDeviceFallback(ModelDevice target)
Return the device's fallback. |
List |
getDeviceHierarchy(ModelDevice root)
Returns device hierarchy. |
Set |
getDevices(Set ids)
Return the devices with given identifiers. |
ModelDevice |
getDeviceWhereCapabilityIsDefined(ModelDevice root,
String capability)
Return a ModelDevice, found iterating a ModelDevice
hierarchy, defining the given capability. |
String |
getGroupByCapability(String capability)
Return the group in which a capability is defined. |
String |
getVersion()
Returns the version info of wurfl repository. |
boolean |
isCapabilityDefined(String capability)
Return if a capability is defined by the held ModelDevices. |
boolean |
isDeviceDefined(String id)
Return if this model define ModelDevice with given id. |
boolean |
isGroupDefined(String groupId)
Return if a group is defined by this model. |
int |
size()
Return the size (number of held devices) of this model. |
| Method Detail |
|---|
String getVersion()
The returning string may vary by the kind of resources used to build model.
ModelDevice getDeviceById(String id)
throws DeviceNotDefinedException
ModelDevice by his id.
id - The identifier of requested device
DeviceNotDefinedException - If this model do not manage the device with given id.boolean isDeviceDefined(String id)
id - The identifier to probe.
Set getAllDevices()
ModelDeviceSet getAllDevicesId()
Set getDevices(Set ids)
throws DeviceNotDefinedException
ids - The identifiers of the devices to retrieve.
ModelDevice
DeviceNotDefinedException - If a device with the passed identifier is not defined in this
model.
List getDeviceHierarchy(ModelDevice root)
throws DeviceNotInModelException
A hierarchy is a ordered list of ModelDevice instances, starting
form generic to device.
Generic -> ... -> device
root - The device to get hierarchy.
List of ModelDevice representing the device's
hierarchy.
DeviceNotInModelException
ModelDevice getDeviceFallback(ModelDevice target)
throws DeviceNotInModelException
target - The device to get fallback.
device.
DeviceNotInModelException - If the given device is not held by this model.
ModelDevice getDeviceAncestor(ModelDevice target)
throws DeviceNotInModelException
ModelDevice ancestor.
The ancestor is the first root device found iterating over the
device hierarchy, from root to generic.
target - The device from get the ancestor.
DeviceNotInModelExceptionint size()
Set getAllCapabilities()
ModelDevices.
boolean isCapabilityDefined(String capability)
ModelDevices.
capability - The capability to probe.
String getGroupByCapability(String capability)
throws CapabilityNotDefinedException
capability - The capability to find group for.
CapabilityNotDefinedException - If the given capability is not defined by this model.
ModelDevice getDeviceWhereCapabilityIsDefined(ModelDevice root,
String capability)
throws DeviceNotInModelException,
CapabilityNotDefinedException
ModelDevice, found iterating a ModelDevice
hierarchy, defining the given capability.
root - The devices to iterate from.capability - The capability to probe.
ModelDevice defining given capability.
DeviceNotInModelException - If the device is not held by this model.
CapabilityNotDefinedException - If the capability to probe is not defined by this model.Set getAllGroups()
boolean isGroupDefined(String groupId)
groupId - The group to probe.
ModelDevices definig the given group.
Set getCapabilitiesForGroup(String group)
throws GroupNotDefinedException
group - The identifier of group to get capabilities from.
GroupNotDefinedException - If the given group is not defined by the held
ModelDevices.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||