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.group
Interface GroupPrivilegeProvider

    public interface GroupPrivilegeProvider

Within interfaces of JReport security API, `GroupPrivilegeProvider` is used to provide customized privilege setting of group. Except getting group privilege setting from customer's external security system, this interface also provide ability to modify group privilege setting in customer's external security system.
Privilege is a credential that a special operation on JReport server, this operation is not refer to any node in JReport server resource tree. Currently there are 2 types of privileges in JReport server: `jet.cs.util.APIConst.PRIVILEGE_CREATE_ANALYSIS_REPORT` indicates credential to new/open an analysis report, `jet.cs.util.APIConst.PRIVILEGE_PUBLISH_REPORT` indicates credential to deploy report/catalog to server, `jet.cs.util.APIConst.PRIVILEGE_ACCESS_ADVANCED_PROPERTIES` indicates credential to access advance information

Since:
  version 8

Method Summary
`java.util.Hashtable` | `getGroupPrivileges(java.lang.String realmName)` Get all groups' privilege setting from customer's external security system.
`boolean` | `isEnableEdit()` Indicates whether customer's external security system will be modified by invoking some methods in `GroupPrivilegeProvider`. In common cases, invokeing `setGroupPrivileges()` 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` | `setGroupPrivileges(java.lang.String realmName, java.lang.String groupName, java.lang.String[] privileges)` Set a group's privileges in customer's external security system.

Method Detail

### getGroupPrivileges

    java.util.Hashtable getGroupPrivileges(java.lang.String realmName)
                                           throws JRCustomerException

  Get all groups' privilege setting from customer's external security system.

  Parameters:
    `realmName` - the realm name
  Returns:
    A `Hashtable` object to represent all groups' privilege setting. In the returned `Hashtable`, key is group name, value is a `String` array, which may contain below strings: `jet.cs.util.APIConst.PRIVILEGE_CREATE_ANALYSIS_REPORT`, `jet.cs.util.APIConst.PRIVILEGE_PUBLISH_REPORT` and `jet.cs.util.APIConst.PRIVILEGE_ACCESS_ADVANCED_PROPERTIES` `jet.cs.util.APIConst.PRIVILEGE_CREATE_ANALYSIS_REPORT` indicates credential to new/open an analysis report, `jet.cs.util.APIConst.PRIVILEGE_PUBLISH_REPORT` indicates credential to deploy report/catalog to server, `jet.cs.util.APIConst.PRIVILEGE_ACCESS_ADVANCED_PROPERTIES` indicates credential to access advance information
  Throws:
    `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.

### setGroupPrivileges

    void setGroupPrivileges(java.lang.String realmName,
                            java.lang.String groupName,
                            java.lang.String[] privileges)
                            throws NoSuchGroupException,
                                   JRCustomerException

  Set a group's privileges in customer's external security system.

  Parameters:
    `realmName` - the realm name
    `groupName` - the group name
    `privileges` - A `String` array, which may contain below strings: `jet.cs.util.APIConst.PRIVILEGE_CREATE_ANALYSIS_REPORT`, `jet.cs.util.APIConst.PRIVILEGE_PUBLISH_REPORT` and `jet.cs.util.APIConst.PRIVILEGE_ACCESS_ADVANCED_PROPERTIES` `jet.cs.util.APIConst.PRIVILEGE_CREATE_ANALYSIS_REPORT` indicates credential to new/open an analysis report, `jet.cs.util.APIConst.PRIVILEGE_PUBLISH_REPORT` indicates credential to deploy report/catalog to server, `jet.cs.util.APIConst.PRIVILEGE_ACCESS_ADVANCED_PROPERTIES` indicates credential to access advance information
  Throws:
    `NoSuchGroupException` - If there is no a group 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.

### isEnableEdit

    boolean isEnableEdit()

  Indicates whether customer's external security system will be modified by invoking some methods in `GroupPrivilegeProvider`.
  In common cases, invokeing `setGroupPrivileges()` 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 `setGroupPrivileges()`, this method should return `false`.
  Return value of method `isEditing()` with paramter `SecurityWebAdaptor.ACTION_EDIT_GROUP_PRIVILEGES` in `jet.server.api.SecurityWebAdaptor` is same with this method's return value.

  Returns:
    `true` if external security system will be affected by invoking `setGroupPrivileges()`, 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