站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.2 API 英文版文档

RoleModule - JBOSS Portal 2.2 API 英文版文档


org.jboss.portal.core.modules
Interface RoleModule

All Known Implementing Classes:
RoleModuleImpl

public interface RoleModule


Method Summary
 Role createRole(java.lang.String name, java.lang.String displayName)
          Create a new role with the specified name.
 Role findRoleByDisplayName(java.lang.String displayName)
          Retrieves a role by its displayname
 Role findRoleById(java.lang.Object id)
          Retrieves a role by its id.
 Role findRoleById(java.lang.String id)
          Retrieves a role by its id.
 Role findRoleByName(java.lang.String name)
          Retrieves a role by its name
 java.util.Set findRoleMembers(java.lang.String roleName, int offset, int limit, java.lang.String userNameFilter)
          Returns role members based on rolename
 java.util.Set findRoles()
          Get all the roles
 java.util.Set findRolesByNames(java.lang.String[] names)
          Retrieve a collection of role from the role names.
 int getRolesCount()
          Returns the number of roles.
 void removeRole(java.lang.Object id)
          Remove a role.
 

Method Detail

findRoleByName

public Role findRoleByName(java.lang.String name)
                    throws java.lang.IllegalArgumentException,
                           ModuleException
Retrieves a role by its name

Parameters:
name - the role name
Returns:
the role
Throws:
java.lang.IllegalArgumentException
ModuleException

findRolesByNames

public java.util.Set findRolesByNames(java.lang.String[] names)
                               throws java.lang.IllegalArgumentException,
                                      ModuleException
Retrieve a collection of role from the role names.

Parameters:
names - the role names
Returns:
a collection of roles
Throws:
java.lang.IllegalArgumentException
ModuleException

findRoleByDisplayName

public Role findRoleByDisplayName(java.lang.String displayName)
                           throws java.lang.IllegalArgumentException,
                                  ModuleException
Retrieves a role by its displayname

Returns:
the role
Throws:
java.lang.IllegalArgumentException
ModuleException

findRoleById

public Role findRoleById(java.lang.Object id)
                  throws java.lang.IllegalArgumentException,
                         ModuleException
Retrieves a role by its id.

Parameters:
id - the role id
Returns:
the role
Throws:
java.lang.IllegalArgumentException
ModuleException

findRoleById

public Role findRoleById(java.lang.String id)
                  throws java.lang.IllegalArgumentException,
                         ModuleException
Retrieves a role by its id.

Parameters:
id - the role id
Returns:
the role
Throws:
java.lang.IllegalArgumentException
ModuleException

createRole

public Role createRole(java.lang.String name,
                       java.lang.String displayName)
                throws java.lang.IllegalArgumentException,
                       ModuleException
Create a new role with the specified name.

Parameters:
name - the role name
displayName - the role display name
Returns:
the role
Throws:
java.lang.IllegalArgumentException
ModuleException

removeRole

public void removeRole(java.lang.Object id)
                throws java.lang.IllegalArgumentException,
                       ModuleException
Remove a role.

Parameters:
id - the role id
Throws:
java.lang.IllegalArgumentException
ModuleException

getRolesCount

public int getRolesCount()
                  throws ModuleException
Returns the number of roles.

Returns:
the number of roles
Throws:
ModuleException

findRoles

public java.util.Set findRoles()
                        throws ModuleException
Get all the roles

Returns:
the roles
Throws:
ModuleException

findRoleMembers

public java.util.Set findRoleMembers(java.lang.String roleName,
                                     int offset,
                                     int limit,
                                     java.lang.String userNameFilter)
                              throws ModuleException
Returns role members based on rolename

Parameters:
roleName -
offset -
limit -
Returns:
Throws:
ModuleException