|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RoleProvider
Among the interfaces of JReport security API, RoleProvider
is used to
provide customized information of principal role, including relation information
between 2 roles. In addition to getting role information
from customer's external security system, this interface also provides the ability
to modify role information in customer's external security system.
Field Summary | |
---|---|
static java.lang.String |
TAG_ROLE_DESCRIPTION
Property of role, indicates the description of a role, the value is "role_description". |
static java.lang.String |
TAG_ROLE_NAME
Property of role, indicates role name, the value is "role_name". |
Method Summary | |
---|---|
void |
addRole(java.lang.String realmName,
java.util.Properties props)
Adds a role into customer's external security system. |
void |
addSubRole(java.lang.String realmName,
java.lang.String roleName,
java.lang.String subRole)
Adds a sub-role into the specified parent role in customer's external security system. |
java.util.Iterator |
getAllRoles(java.lang.String realmName)
Gets all role names from customer's external security system. |
java.util.Properties |
getRoleProperties(java.lang.String realmName,
java.lang.String roleName)
Gets a Properties used to represent a role. |
java.util.Iterator |
getSubRoles(java.lang.String realmName,
java.lang.String roleName)
Gets 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, invoking 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 cases. |
void |
removeRole(java.lang.String realmName,
java.lang.String roleName)
Removes the specified role from customer's external security system. |
void |
removeSubRole(java.lang.String realmName,
java.lang.String roleName,
java.lang.String subRole)
Removes a sub-role from the specified parent role in customer's external security system. |
Field Detail |
---|
static final java.lang.String TAG_ROLE_NAME
String
value that is non-null and whose 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 thinks this error should be thrown
to JReport server security system.java.util.Properties getRoleProperties(java.lang.String realmName, java.lang.String roleName) throws NoSuchRoleException, JRCustomerException
Properties
used to represent a role.
realmName
- the realm name.roleName
- the role name.
Properties
that represents a role. If a null
or an empty Properties
is returned, it means there is no any property
for the specified role.
NoSuchRoleException
- If there is no role with the specified name in
customer's external security system.
JRCustomerException
- If an error occurs during JReport server security
system invoking this method, and the implementation thinks this error should be thrown
to JReport server security system.java.util.Iterator getSubRoles(java.lang.String realmName, java.lang.String roleName) throws NoSuchRoleException, JRCustomerException
realmName
- the realm name.roleName
- the parent role name.
NoSuchRoleException
- If there is no role with the 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 thinks this error should be thrown
to JReport server security system.void addRole(java.lang.String realmName, java.util.Properties props) throws RoleExistsException, JRCustomerException
Properties
.
realmName
- the realm name.props
- a Properties
that represents a role.
RoleExistsException
- If there is a role with the same name in customer's
external security system.
JRCustomerException
- If an error occurs during JReport server security
system invoking this method, and the implementation thinks this error should be thrown
to JReport server security system.void removeRole(java.lang.String realmName, java.lang.String roleName) throws NoSuchRoleException, JRCustomerException
realmName
- the realm name.roleName
- the role name to specify which role needs to be removed.
NoSuchRoleException
- If there is no role with the 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 thinks this error should be thrown
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 name.roleName
- the parent role name which will be added a sub-role to.subRole
- the sub-role name which will be added into the specified parent role
NoSuchRoleException
- If the specified parent role or sub-role does not exist in
customer's external security system.
RoleExistsException
- If the parent role contains a sub-role, which has the same name
as subRole
in customer's external security system.
JRCustomerException
- If an error occurs during JReport server security
system invoking this method, and the implementation thinks this error should be thrown
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 name.roleName
- the parent role name, from which a sub-role will be removed.subRole
- the sub-role name which will be removed from the specified parent role.
NoSuchRoleException
- If the 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 thinks this error should be thrown
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 cases. If customer's external
security system will not be affected by invoking addRole()
, removeRole()
,
addSubRole()
or removeSubRole()
, this method should return false
. isEditing()
with parameters
SecurityWebAdaptor.ACTION_ADD_ROLE
SecurityWebAdaptor.ACTION_REMOVE_ROLE
SecurityWebAdaptor.ACTION_EDIT_RELATION_ROLE_SUBROLE
in jet.server.api.SecurityWebAdaptor
is the same as 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 |