dana-i2cat/opennaas — pull request #127 by isartcanyameres (2012-04-27 11:49:15+00:00)
Title: Feature/capabilities interface

This patch redesign and refactors capabilities and updates ChassisCapability as an example of how other capabilities should look like.

Redesign only affects exported interfaces, as they are needed for creating the WS. (e.g: ActionSet has not been redesigned yet).

Changes made in other capabilities rather than chassis, are the strictly necessary to maintain desired functionality with the new design, but are not yet finished. (e.g: karaf commands in ChassisCapability use methods defined in IChassisCapabilitiy, but karaf commands in other capabilities may be using legacy sendMessage method to call capabilities functionality).

This patch:
- Makes ICapability a top interface, separating it from ILifecycle
- Creates ICapabilityLifecycle to define ILifecycle methods for capabilities
- Creates IQueueingCapability to define methods for capabilities using actions and a queue
- Removes sendMessageMethod from ICapability (can be replaced by methods in IQueueingCapability)
- Makes AbstractCapability implement ICapabilityLifecycle and IQueueingCapability
- Creates I"Funcionality"Capability interface for each capability not having one. This interface has a temporary sendMessage method. (Those capabilities should be refactored taking ChassisCapability as a model)
- Define IChassisCapability and makes ChassisCapability implement it.
- Updates chassisCapability karaf commands so they use IChassisCapability methods.
- Marks with TODO further refactoring required.

Although capabilities interface is not yet finished (other methods should be removed from ICapability interface, marked with a TODO), this patch can be already reviewed and integrated.

All tests have passed, and EC review demo script has been executed from platform successfully.