public interface GroupUserRelationProvider
GroupUserProvider
is used to
provide customized relation information among groups and users. In addition to getting
relation information among groups and users from customer's external security system,
this interface also provides the ability to modify relation information among groups
and users in customer's external security system.Modifier and Type | Method and Description |
---|---|
void |
addUserToGroup(java.lang.String realmName,
java.lang.String groupName,
java.lang.String userName)
Adds a sub-user into the specified parent group in customer's external security system.
|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getAllRelations(java.lang.String realmName)
Gets sub-user names of all parent groups from customer's external security system.
|
java.util.Iterator |
getSubUsers(java.lang.String realmName,
java.lang.String groupName)
Gets sub-user names of the specified parent group from customer's
external security system.
|
boolean |
isEnableEdit()
Indicates whether customer's external security system will be modified by
invoking some methods in
GroupUserRelationProvider .In common cases, invoking addUserToGroup() or removeUserFromGroup() 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 |
removeUserFromGroup(java.lang.String realmName,
java.lang.String groupName,
java.lang.String userName)
Removes a sub-user from the specified parent group in customer's external security system.
|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> getAllRelations(java.lang.String realmName) throws JRCustomerException
realmName
- the realm name.Map
object, key is parent group name, value is a List
which contains sub-user names of corresponding parent group.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 getSubUsers(java.lang.String realmName, java.lang.String groupName) throws NoSuchGroupException, JRCustomerException
realmName
- the realm name.groupName
- the parent group name.NoSuchGroupException
- If there is no group that has the specified parent group 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 addUserToGroup(java.lang.String realmName, java.lang.String groupName, java.lang.String userName) throws NoSuchGroupException, NoSuchUserException, UserExistsException, JRCustomerException
realmName
- the realm name.groupName
- the parent group name which will be added a sub-user to.userName
- the sub-user name which will be added into the specified parent groupNoSuchGroupException
- If the specified parent group does not exist in
customer's external security system.NoSuchUserException
- If the specified sub-user does not exist in
customer's external security system.UserExistsException
- If the parent group contains a sub-user, which has the same name
with userName
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 removeUserFromGroup(java.lang.String realmName, java.lang.String groupName, java.lang.String userName) throws NoSuchGroupException, NoSuchUserException, JRCustomerException
realmName
- the realm name.groupName
- the parent group name, from which a sub-user will be removed.userName
- the sub-user name which will be removed from the specified parent groupNoSuchGroupException
- If the specified parent group does not exist in
customer's external security system.NoSuchUserException
- If the specified sub-user 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()
GroupUserRelationProvider
.addUserToGroup()
or removeUserFromGroup()
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 addUserToGroup()
or removeUserFromGroup()
,
this method should return false
. isEditing()
with parameter
SecurityWebAdaptor.ACTION_EDIT_RELATION_GROUP_USER
in jet.server.api.SecurityWebAdaptor
is the same as this method's return value.true
if external security system will be affected by invoking
addUserToGroup()
or removeUserFromGroup()
, otherwise return false
.SecurityWebAdaptor