9.4. Using Permissions in Your Service

In this section, we return to the unfinished design of the parameter service (ParameterService) from Chapter 4 and see how permissions can be used in this service.

9.4.1. Checking Permissions

Recall that the parameter service allows other bundles to access their parameter settings and handles the task of persistently saving them to and restoring them from a file. Because we used the service factory technique, each bundle can read, create, or modify its own parameters. However, oftentimes an administrative bundle may want to configure the parameters on behalf of another bundle. For instance, the administrative bundle can set the sender, recipient, and mail host parameters for the mailer example, or the printer ...

Get Programming Open Service Gateways with Java Embedded Server™ Technology now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.