ozone-development/ozp-iwc — pull request #66 by MidnightJava (2014-07-31 21:05:31+00:00)
Title: Feature system api

Mostly implements #41 Create a skeleton for system.api. Applications are not populated from sample data, since the REST API in ozp-center for pulling applications is ready for testing. The API loader will be made to work with this interface, and then any changes to sample data and/or the API loader will be made, so we have the ability to load applications from sample data as well as center. Issue #41 will be kept open until the application loading is complete.

This feature branch implements system.api methods for resources

/application
/application/${id}
/system
/user

The methods are implemented read-only for ordinary clients. The API loader uses the set action to load the /user and /system data from sample data (and will later use this action to load the applciation data from ozp-center and sample data). This is enforced by setting permissions {modifyAuthority: 'apiLoader'} on teh node during set or delete method invocations. Corresponding securityAttributes is set for the system.api participant in integrationTestWiring.js, enabling only the system.api participant to modify or delete data in system.api. The permissions on the node are removed after the permission check for set or delete is completed. Otherwise, the watch packet will not be delivered to the client when requested because it will fail permission check.

Unit and integration tests are provided, which perform the common API checks for system.api and check the various operations of SystemApi and SystemApiValue. An integration test is also provided which verifies that the data loaded for the /user and /system resources can be read successfully.

This branch was up to date with master when this pull request was submitted.