|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface RoleProvider
Within interfaces of JReport security API, RoleProvider is used to
provide customized information of principal: role, includes relation information
between 2 roles. Except getting role infomation
from customer's external security system, this interface also provide ability
to modify role information in customer's external security system.
| Field Summary | |
|---|---|
static java.lang.String |
TAG_ROLE_DESCRIPTION
TAG_ROLE_DESCRIPTION Property of role, indicates description of role, value is "role_description". |
static java.lang.String |
TAG_ROLE_NAME
TAG_ROLE_NAME Property of role, indicates role name, value is "role_name". |
| Method Summary | |
|---|---|
void |
addRole(java.lang.String realmName,
java.util.Properties props)
Add a role into customer's external security system, this role is reprsented by a Properties. |
void |
addSubRole(java.lang.String realmName,
java.lang.String roleName,
java.lang.String subRole)
Add a sub-role into specified parent role in customer's external security system. |
java.util.Iterator |
getAllRoles(java.lang.String realmName)
Get all role names from customer's external security system. |
java.util.Properties |
getRoleProperties(java.lang.String realmName,
java.lang.String roleName)
Get a Properties which used to represent a role. |
java.util.Iterator |
getSubRoles(java.lang.String realmName,
java.lang.String roleName)
Get sub-role names of the specified parent role from customer's external security system. |
boolean |
isEnableEdit()
Indicates whether customer's external security system will be modified by invoking some methods in RoleProvider.In common cases, invokeing addRole(), removeRole(),
addSubRole() or removeSubRole() should take effect on
customer's external security system, and cause modification of external security
system, this method should return true in such case. |
void |
removeRole(java.lang.String realmName,
java.lang.String roleName)
Remove specified role from customer's external security system. |
void |
removeSubRole(java.lang.String realmName,
java.lang.String roleName,
java.lang.String subRole)
Remove a sub-role from specified parent role in customer's external security system. |
| Field Detail |
|---|
static final java.lang.String TAG_ROLE_NAME
String value that non-null, length is bigger than zero.
static final java.lang.String TAG_ROLE_DESCRIPTION
String value.
| Method Detail |
|---|
java.util.Iterator getAllRoles(java.lang.String realmName)
throws JRCustomerException
realmName - the realm name
JRCustomerException - If an error occurs during JReport server security
system invoking this method, and the implementation think should throw this error
to JReport server security system.
java.util.Properties getRoleProperties(java.lang.String realmName,
java.lang.String roleName)
throws NoSuchRoleException,
JRCustomerException
Properties which used to represent a role.
realmName - the realm nameroleName - the role name
Properties that represent a role. If a null
or a empty Properties returned, means there is no any property
for specified role.
NoSuchRoleException - If there is no a role has specified name in
customer's external security system.
JRCustomerException - If an error occurs during JReport server security
system invoking this method, and the implementation think should throw this error
to JReport server security system.
java.util.Iterator getSubRoles(java.lang.String realmName,
java.lang.String roleName)
throws NoSuchRoleException,
JRCustomerException
realmName - the realm nameroleName - the parent role name.
NoSuchRoleException - If there is no a role has specified parent role name in
customer's external security system.
JRCustomerException - If an error occurs during JReport server security
system invoking this method, and the implementation think should throw this error
to JReport server security system.
void addRole(java.lang.String realmName,
java.util.Properties props)
throws RoleExistsException,
JRCustomerException
Properties.
realmName - the realm nameprops - a Properties that represent a role.
RoleExistsException - If there is a role has same name in customer's
external security system.
JRCustomerException - If an error occurs during JReport server security
system invoking this method, and the implementation think should throw this error
to JReport server security system.
void removeRole(java.lang.String realmName,
java.lang.String roleName)
throws NoSuchRoleException,
JRCustomerException
realmName - the realm nameroleName - the role name to specify which role need to be removed
NoSuchRoleException - If there is no a role has specified name (indicated
by TAG_ROLE_NAME in props) in customer's
external security system.
JRCustomerException - If an error occurs during JReport server security
system invoking this method, and the implementation think should throw this error
to JReport server security system.
void addSubRole(java.lang.String realmName,
java.lang.String roleName,
java.lang.String subRole)
throws NoSuchRoleException,
RoleExistsException,
JRCustomerException
realmName - the realm nameroleName - the parent role name which will add sub-role to.subRole - the sub-role name which will be added into specifiec parent role
NoSuchRoleException - If specified parent role or sub-role does not exist in
customer's external security system.
RoleExistsException - If parent role contains a sub-role, which has same name
with subRole in customer's external security system.
JRCustomerException - If an error occurs during JReport server security
system invoking this method, and the implementation think should throw this error
to JReport server security system.
void removeSubRole(java.lang.String realmName,
java.lang.String roleName,
java.lang.String subRole)
throws NoSuchRoleException,
JRCustomerException
realmName - the realm nameroleName - the parent role name, from which a sub-role will be removed.subRole - the sub-role name which will be removed from specifiec parent role
NoSuchRoleException - If specified parent role or sub-role does not exist in
customer's external security system.
JRCustomerException - If an error occurs during JReport server security
system invoking this method, and the implementation think should throw this error
to JReport server security system.boolean isEnableEdit()
RoleProvider.addRole(), removeRole(),
addSubRole() or removeSubRole() should take effect on
customer's external security system, and cause modification of external security
system, this method should return true in such case. If cusotmer's external
security system will not be affected by invoking addRole(), removeRole(),
addSubRole() or removeSubRole(), this method should return false. isEditing() with paramters
SecurityWebAdaptor.ACTION_ADD_ROLE
SecurityWebAdaptor.ACTION_REMOVE_ROLE
SecurityWebAdaptor.ACTION_EDIT_RELATION_ROLE_SUBROLE
in jet.server.api.SecurityWebAdaptor
is same with this method's return value.
true if external security system will be affected by invoking
addRole(), removeRole(),
addSubRole() or removeSubRole(), otherwise return false.SecurityWebAdaptor
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||