Search in sources :

Example 16 with Role

use of org.osgi.service.useradmin.Role in project aries by apache.

the class UserAdmin method removeProperty.

/**
     * @see org.osgi.jmx.service.useradmin.UserAdminMBean#removeProperty(java.lang.String, java.lang.String)
     */
public void removeProperty(String key, String rolename) throws IOException {
    if (rolename == null) {
        throw new IOException("Role name cannot be null");
    }
    Role role = userAdmin.getRole(rolename);
    if (role == null) {
        throw new IOException("Operation fails role with provided rolename = [" + rolename + "] doesn't exist");
    }
    role.getProperties().remove(key);
}
Also used : Role(org.osgi.service.useradmin.Role) IOException(java.io.IOException)

Aggregations

Role (org.osgi.service.useradmin.Role)16 IOException (java.io.IOException)15 Group (org.osgi.service.useradmin.Group)7 User (org.osgi.service.useradmin.User)3 TabularData (javax.management.openmbean.TabularData)2 TabularDataSupport (javax.management.openmbean.TabularDataSupport)2 GroupData (org.apache.aries.jmx.codec.GroupData)2 Authorization (org.osgi.service.useradmin.Authorization)2 CompositeData (javax.management.openmbean.CompositeData)1 AuthorizationData (org.apache.aries.jmx.codec.AuthorizationData)1 UserData (org.apache.aries.jmx.codec.UserData)1 Test (org.junit.Test)1