Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jet.server.api.custom.security.relation
Interface GroupUserRelationProvider

    public interface GroupUserRelationProvider

Within interfaces of JReport security API, `GroupUserProvider` is used to provide customized relation information among groups and users. Except getting relation infomation among groups and users from customer's external security system, this interface also provide ability to modify relation information among groups and users in customer's external security system.

Since:
  version 8

Method Summary
`void` | `addUserToGroup(java.lang.String realmName, java.lang.String groupName, java.lang.String userName)` Add a sub-user into specified parent group in customer's external security system.
`java.util.Iterator` | `getSubUsers(java.lang.String realmName, java.lang.String groupName)` Get sub-user names of the specified parent group from cusotmer'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, invokeing `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 case.
`void` | `removeUserFromGroup(java.lang.String realmName, java.lang.String groupName, java.lang.String userName)` Remove a sub-user from specified parent group in customer's external security system.

Method Detail

### getSubUsers

    java.util.Iterator getSubUsers(java.lang.String realmName,
                                   java.lang.String groupName)
                                   throws NoSuchGroupException,
                                          JRCustomerException

  Get sub-user names of the specified parent group from cusotmer's external security system.

  Parameters:
    `realmName` - the realm name
    `groupName` - the parent group name.
  Returns:
    sub-user names of specified parent group.
  Throws:
    `NoSuchGroupException` - If there is no a group has 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 think should throw this error to JReport server security system.

### addUserToGroup

    void addUserToGroup(java.lang.String realmName,
                        java.lang.String groupName,
                        java.lang.String userName)
                        throws NoSuchGroupException,
                               NoSuchUserException,
                               UserExistsException,
                               JRCustomerException

  Add a sub-user into specified parent group in customer's external security system.

  Parameters:
    `realmName` - the realm name
    `groupName` - the parent group name which will add sub-user to.
    `userName` - the sub-user name which will be added into specifiec parent group
  Throws:
    `NoSuchGroupException` - If specified parent group does not exist in customer's external security system.
    `NoSuchUserException` - If specified sub-user does not exist in customer's external security system.
    `UserExistsException` - If parent group contains a sub-user, which has 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 think should throw this error to JReport server security system.

### removeUserFromGroup

    void removeUserFromGroup(java.lang.String realmName,
                             java.lang.String groupName,
                             java.lang.String userName)
                             throws NoSuchGroupException,
                                    NoSuchUserException,
                                    JRCustomerException

  Remove a sub-user from specified parent group in customer's external security system.

  Parameters:
    `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 specifiec parent group
  Throws:
    `NoSuchGroupException` - If specified parent group does not exist in customer's external security system.
    `NoSuchUserException` - If 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 think should throw this error to JReport server security system.

### isEnableEdit

    boolean isEnableEdit()

  Indicates whether customer's external security system will be modified by invoking some methods in `GroupUserRelationProvider`.
  In common cases, invokeing `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 case. If cusotmer's external security system will not be affected by invoking `addUserToGroup()` or `removeUserFromGroup()`, this method should return `false`.
  Return value of method `isEditing()` with paramter `SecurityWebAdaptor.ACTION_EDIT_RELATION_GROUP_USER` in `jet.server.api.SecurityWebAdaptor` is same with this method's return value.

  Returns:
    `true` if external security system will be affected by invoking `addUserToGroup()` or `removeUserFromGroup()`, otherwise return `false`.
  See Also:
    `SecurityWebAdaptor`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD