Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Karaf

http://karaf.apache.org/

Camel / CXF routes Bundle

This component provides the REST front end and the Authentication for the Karaf based middleware. It uses the REST definition provided by Rest-API (documented in a later chapter.) Then uses CXF and Camel, to route the contents to various beans to carry out the business logic and API calls. To allow for configuration via the configuration files in the assembly, we also inherit the Authentication Providers and Storage Providers in such away to allow them to be beans inside the Spring container, and have their properties auto populated by Spring. 

The operations is simple, first check or provide authentication, then route the calls to the correct bean function to get the desired value.

Assembly

This builds a zip or tar.gz that contains a complete fully functional setup for the REST component. Inside you will find some example reports in etc/reports as well as all the configuration you need in etc. It also builds a development version, which you can run in the target directory and it's configuration files are configured to point to the reports in the source, rather than in the build directory. This can speed up development efforts. 

Features

This generates and installs the pom and features file into maven. Which is required to correctly import all the resources into an OSGI container.

Example Authrest

This is an example authentication provider for REST. Essentially there is a RestAuthenticationProvider, which offloads the authentication process to a rest end point. This is an example implementation of the end point.

Javascript / Jetty

This is where the example HTML, CSS and Javascript live. You can find Kagura.js here which is a javascript file which handles does the jQuery/ajax work for the rest communication. The entire design is to reduce page loads and the amount of data communicated, to allow for a fast and speedy load. It is not framework heavy to allow for people in the future to customise the end page. It is only an example, and not prescribed.

Resources

This stores the favicon.

Rest-API

 The Rest-API component provides a template for the REST results. It contains a model that responses from REST backends should provide as well as a javax.rs annotated interface which your project can inherit to guarantee Kagura.js compatibility.