Interface Role
Role objects managed by the User Admin
 service.
 
 
 This interface exposes the characteristics shared by all Role
 classes: a name, a type, and a set of properties.
 
 Properties represent public information about the Role object that
 can be read by anyone. Specific UserAdminPermission objects are
 required to change a Role object's properties.
 
 Role object properties are Dictionary objects. Changes to
 these objects are propagated to the User Admin service and made persistent.
 
 Every User Admin service contains a set of predefined Role objects
 that are always present and cannot be removed. All predefined Role
 objects are of type ROLE. This version of the
 org.osgi.service.useradmin package defines a single predefined role
 named "user.anyone", which is inherited by any other role. Other
 predefined roles may be added in the future. Since "user.anyone" is
 a Role object that has properties associated with it that can be read
 and modified. Access to these properties and their use is application
 specific and is controlled using UserAdminPermission in the same way
 that properties for other Role objects are.
- "Consumers of this API must not implement this interface"
- 
Field Details- 
USER_ANYONEThe name of the predefined role, user.anyone, that all users and groups belong to.- Since:
- 1.1
- See Also:
 
- 
ROLEstatic final int ROLEThe type of a predefined role.The value of ROLEis 0.- See Also:
 
- 
USERstatic final int USERThe type of aUserrole.The value of USERis 1.- See Also:
 
- 
GROUPstatic final int GROUPThe type of aGrouprole.The value of GROUPis 2.- See Also:
 
 
- 
- 
Method Details- 
getNameString getName()Returns the name of this role.- Returns:
- The role's name.
 
- 
getTypeint getType()Returns the type of this role.- Returns:
- The role's type.
 
- 
getPropertiesDictionary<String,Object> getProperties()Returns aDictionaryof the (public) properties of thisRoleobject. Any changes to the returnedDictionarywill change the properties of thisRoleobject. This will cause aUserAdminEventobject of typeUserAdminEvent.ROLE_CHANGEDto be broadcast to anyUserAdminListenerobjects.Only objects of type Stringmay be used as property keys, and only objects of typeStringorbyte[]may be used as property values. Any other types will cause an exception of typeIllegalArgumentExceptionto be raised.In order to add, change, or remove a property in the returned Dictionary, aUserAdminPermissionnamed after the property name (or a prefix of it) with actionchangePropertyis required.- Returns:
- Dictionarycontaining the properties of this- Roleobject.
 
 
-