Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Die zentrale Schnittstelle zur Verwaltung von Rollen ist das Interface org.osgi.service.useradmin.UserAdmin. Über diese API können Sie neue Rollen anlegen bzw. bestehende Rollen abfragen oder entfernen (vgl. Listing 17-9):
package org.osgi.service.useradmin;
public interface UserAdmin {
public Role createRole(String name, int type);
public boolean removeRole(String name);
public Role getRole(String name);
public Role[] getRoles(String filter) throws
InvalidSyntaxException;
public User getUser(String key, String value);
public Authorization getAuthorization(User user);
} |