org.apache.felix.useradmin.impl
Class RoleImpl

java.lang.Object
  extended by org.apache.felix.useradmin.impl.RoleImpl
All Implemented Interfaces:
Serializable, Version, Role
Direct Known Subclasses:
UserImpl

public class RoleImpl
extends Object
implements Role, Version, Serializable

This RoleImplclass represents Role. Act as base class for different types of roles User,Group.

Version:
$Rev$ $Date$
See Also:
Role, Serialized Form

Field Summary
protected  String name
          role name.
protected  UserAdminServiceImpl userAdmin
          UserAdmin service instance.
 
Fields inherited from interface org.osgi.service.useradmin.Role
GROUP, ROLE, USER, USER_ANYONE
 
Constructor Summary
RoleImpl()
          Construct new Role.
 
Method Summary
 String getName()
           
 Dictionary getProperties()
           
 int getType()
           
 long getVersion()
          This method getting version of a role.
protected  boolean impliedBy(AuthorizationImpl authorization)
          Checks if this role is implied by provided Authorization object.
 void increaseVersion()
          This method increasing version of a role.
 void setName(String name)
          Setting role name.
 void setUserAdmin(UserAdminServiceImpl userAdmin)
          Setting UserAdmin.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected String name
role name.


userAdmin

protected transient UserAdminServiceImpl userAdmin
UserAdmin service instance.

Constructor Detail

RoleImpl

public RoleImpl()
Construct new Role.

Method Detail

getName

public String getName()
Specified by:
getName in interface Role
See Also:
Role.getName()

getProperties

public Dictionary getProperties()
Specified by:
getProperties in interface Role
See Also:
Role.getProperties()

getType

public int getType()
Specified by:
getType in interface Role
See Also:
Role.getType()

getVersion

public long getVersion()
Description copied from interface: Version
This method getting version of a role.

Specified by:
getVersion in interface Version
Returns:
version
See Also:
Version.getVersion()

increaseVersion

public void increaseVersion()
Description copied from interface: Version
This method increasing version of a role.

Specified by:
increaseVersion in interface Version
See Also:
Version.increaseVersion()

impliedBy

protected boolean impliedBy(AuthorizationImpl authorization)
Checks if this role is implied by provided Authorization object.

Parameters:
authorization - Authorization instance.
Returns:
true if is implied false if not.
See Also:
Autorization

setUserAdmin

public void setUserAdmin(UserAdminServiceImpl userAdmin)
Setting UserAdmin.

Parameters:
userAdmin - UserAdmin isntance.

setName

public void setName(String name)
Setting role name.

Parameters:
name - role name.


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.