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
Interface SecurityListener

    public interface SecurityListener

The listener interface for receiving security information changed events from customer's external security system. A `SecurityListener` is implemented by JReport server, and is added to customer's implementation of JReport security API by invoking `AuthenticationProvider.addSecurityListener()`. If any security information in customer's external security system is changed, but the change is not performed by customer's implementation of JReport security API, in this case a security changed event should be fired to security listener which has been added into customer's implementation of JReport security API. JReport server will refresh security system based on the external security changed event.

Field Summary
`static int` | `PRINCIPAL_TYPE_GROUP` PRINCIPAL_TYPE_GROUP Int identifier for principal type: group, value: 3.
`static int` | `PRINCIPAL_TYPE_ROLE` PRINCIPAL_TYPE_ROLE Int identifier for principal type: role, value: 2.
`static int` | `PRINCIPAL_TYPE_USER` PRINCIPAL_TYPE_USER Int identifier for principal type: user, value: 1.

Method Summary
`void` | `addOrganization(java.lang.String realm, java.lang.String orgName)`
`void` | `addPrincipal(java.lang.String realm, java.lang.String principal, int principalType)` Informs JReport server that a principal is added into customer's external security system, JReport server should update relevant information about this principal in security system in the future.
`void` | `addRelation(java.lang.String realm, java.lang.String parentPrincipal, int parentPrincipalType, java.lang.String subPrincipal, int subPrincipalType)` Inform JReport server that a relation is created between 2 principals in customer's external security system, JReport server should update relevant information about the new relation in security system in the future.
`void` | `removeOrganization(java.lang.String realm, java.lang.String orgName)`
`void` | `removePrincipal(java.lang.String realm, java.lang.String principal, int principalType)` Informs JReport server that a principal is removed from customer's external security system, JReport server should update relevant information about this principal in security system in the future.
`void` | `removeRelation(java.lang.String realm, java.lang.String parentPrincipal, int parentPrincipalType, java.lang.String subPrincipal, int subPrincipalType)` Informs JReport server that a relation between 2 principals is removed from customer's external security system, JReport server should update relevant information about the removed relation in security system in the future.
`void` | `updateAll(java.lang.String realmName)` Informs JReport server that all security information referred to the specified realm in JReport server should be updated according to customer's external security system.
`void` | `updatePermissons(java.lang.String realm, java.lang.String resourcePath, int versionNumber)` Informs JReport server that permission setting of a specified resource/version is updated in customer's external security system.
`void` | `updatePrivileges(java.lang.String realm, java.lang.String principal, int principalType)` Informs JReport server that privileges of a specified principal is updated in customer's external security system.

Field Detail

### PRINCIPAL_TYPE_USER

    static final int PRINCIPAL_TYPE_USER

  PRINCIPAL_TYPE_USER Int identifier for principal type: user, value: 1.

  See Also:
    Constant Field Values

### PRINCIPAL_TYPE_ROLE

    static final int PRINCIPAL_TYPE_ROLE

  PRINCIPAL_TYPE_ROLE Int identifier for principal type: role, value: 2.

  See Also:
    Constant Field Values

### PRINCIPAL_TYPE_GROUP

    static final int PRINCIPAL_TYPE_GROUP

  PRINCIPAL_TYPE_GROUP Int identifier for principal type: group, value: 3.

  See Also:
    Constant Field Values

Method Detail

### updateAll

    void updateAll(java.lang.String realmName)

  Informs JReport server that all security information referred to the specified realm in JReport server should be updated according to customer's external security system.

  Parameters:
    `realmName` - the realm name

### addPrincipal

    void addPrincipal(java.lang.String realm,
                      java.lang.String principal,
                      int principalType)

  Informs JReport server that a principal is added into customer's external security system, JReport server should update relevant information about this principal in security system in the future.

  Parameters:
    `realm` - the realm name
    `principal` - the principal name
    `principalType` - the principal type, value scope: `SecurityListener.PRINCIPAL_TYPE_USER, SecurityListener.PRINCIPAL_TYPE_GROUP, SecurityListener.PRINCIPAL_TYPE_ROLE`.

### removePrincipal

    void removePrincipal(java.lang.String realm,
                         java.lang.String principal,
                         int principalType)

  Informs JReport server that a principal is removed from customer's external security system, JReport server should update relevant information about this principal in security system in the future.

  Parameters:
    `realm` - the realm name
    `principal` - the principal name
    `principalType` - the principal type, value scope: `SecurityListener.PRINCIPAL_TYPE_USER, SecurityListener.PRINCIPAL_TYPE_GROUP, SecurityListener.PRINCIPAL_TYPE_ROLE`.

### addRelation

    void addRelation(java.lang.String realm,
                     java.lang.String parentPrincipal,
                     int parentPrincipalType,
                     java.lang.String subPrincipal,
                     int subPrincipalType)

  Inform JReport server that a relation is created between 2 principals in customer's external security system, JReport server should update relevant information about the new relation in security system in the future.

  Parameters:
    `realm` - the realm name
    `parentPrincipal` - the parent principal name
    `parentPrincipalType` - the parent principal type, value scope: `SecurityListener.PRINCIPAL_TYPE_USER, SecurityListener.PRINCIPAL_TYPE_GROUP, SecurityListener.PRINCIPAL_TYPE_ROLE`.
    `subPrincipal` - the sub-principal name
    `subPrincipalType` - the sub-principal type, value scope: `SecurityListener.PRINCIPAL_TYPE_USER, SecurityListener.PRINCIPAL_TYPE_GROUP, SecurityListener.PRINCIPAL_TYPE_ROLE`.

### removeRelation

    void removeRelation(java.lang.String realm,
                        java.lang.String parentPrincipal,
                        int parentPrincipalType,
                        java.lang.String subPrincipal,
                        int subPrincipalType)

  Informs JReport server that a relation between 2 principals is removed from customer's external security system, JReport server should update relevant information about the removed relation in security system in the future.

  Parameters:
    `realm` - the realm name
    `parentPrincipal` - the parent principal name
    `parentPrincipalType` - the parent principal type, value scope: `SecurityListener.PRINCIPAL_TYPE_USER, SecurityListener.PRINCIPAL_TYPE_GROUP, SecurityListener.PRINCIPAL_TYPE_ROLE`.
    `subPrincipal` - the sub-principal name
    `subPrincipalType` - the sub-principal type, value scope: `SecurityListener.PRINCIPAL_TYPE_USER, SecurityListener.PRINCIPAL_TYPE_GROUP, SecurityListener.PRINCIPAL_TYPE_ROLE`.

### updatePermissons

    void updatePermissons(java.lang.String realm,
                          java.lang.String resourcePath,
                          int versionNumber)

  Informs JReport server that permission setting of a specified resource/version is updated in customer's external security system. JReport server should update permission setting of this resource/version in security system in the future.

  Parameters:
    `realm` - the realm name
    `resourcePath` - the resource path to specify a resource
    `versionNumber` - the version number of the resource. A valid version number should be a positive integer. If `versionNumber` is less than 1, it means permission setting of the resource specified by `resourcePath` is updated.

### updatePrivileges

    void updatePrivileges(java.lang.String realm,
                          java.lang.String principal,
                          int principalType)

  Informs JReport server that privileges of a specified principal is updated in customer's external security system. JReport server should update this principal's privileges in security system in the future.

  Parameters:
    `realm` - the realm name
    `principal` - the principal name, whose privileges have been updated
    `principalType` - the principal type, value scope: `SecurityListener.PRINCIPAL_TYPE_USER, SecurityListener.PRINCIPAL_TYPE_GROUP, SecurityListener.PRINCIPAL_TYPE_ROLE`.

### addOrganization

    void addOrganization(java.lang.String realm,
                         java.lang.String orgName)

### removeOrganization

    void removeOrganization(java.lang.String realm,
                            java.lang.String orgName)

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