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

## org.jasig.portal.security
Interface IAuthorizationService

All Known Implementing Classes:
  AuthorizationImpl

    public interface IAuthorizationService

Version:
  $Revision: 1.18 $ An `IAuthorizationService` represents the portal's authorization service. All requests for authorization activities ultimately come here.
Author:
  Bernie Durfee, bdurfee@interactivebusiness.com, Dan Ellentuck, de3@columbia.edu

Method Summary
`void` | `addPermissions(IPermission[] permissions)` Adds `IPermissions` to the service.
`boolean` | `canPrincipalPublish(IAuthorizationPrincipal principal)` I'm not sure what this means (Dan).
`boolean` | `canPrincipalRender(IAuthorizationPrincipal principal, int channelPublishId)` Answers if the principal has permission to render this Channel.
`boolean` | `canPrincipalSubscribe(IAuthorizationPrincipal principal, int channelPublishId)` Answers if the principal has permission to subscribe to this Channel.
`boolean` | `doesPrincipalHavePermission(IAuthorizationPrincipal principal, java.lang.String owner, java.lang.String activity, java.lang.String target)` Answers if the owner has given the principal permission to perform the activity on the target.
`boolean` | `doesPrincipalHavePermission(IAuthorizationPrincipal principal, java.lang.String owner, java.lang.String activity, java.lang.String target, IPermissionPolicy policy)` Answers if the owner has given the principal permission to perform the activity on the target, as evaluated by the policy.
`IPermission[]` | `getAllPermissionsForPrincipal(IAuthorizationPrincipal principal, java.lang.String owner, java.lang.String activity, java.lang.String target)` Returns the `IPermissions` owner has granted this `Principal` for the specified activity and target.
`java.util.Vector` | `getAuthorizedChannels(IAuthorizationPrincipal principal)` Does this mean all channels the principal could conceivably subscribe to or all channels principal is specifically authorized to subscribe to, or what?
`IGroupMember` | `getGroupMember(IAuthorizationPrincipal principal)`
`IPermission[]` | `getPermissionsForOwner(java.lang.String owner, java.lang.String activity, java.lang.String target)` Returns the `IPermissions` owner has granted for the specified activity and target.
`IPermission[]` | `getPermissionsForPrincipal(IAuthorizationPrincipal principal, java.lang.String owner, java.lang.String activity, java.lang.String target)` Returns the `IPermissions` owner has granted this `Principal` for the specified activity and target.
`IAuthorizationPrincipal` | `getPrincipal(IPermission permission)` Returns the `IAuthorizationPrincipal` associated with the `IPermission`.
`java.lang.String` | `getPrincipalString(IAuthorizationPrincipal principal)` Returns a `String` used to represent the `IAuthorizationPrincipal`.
`IPermission` | `newPermission(java.lang.String owner, IAuthorizationPrincipal principal)` Creates a new `IPermission` for the `principal` on behalf of the `owner`.
`IPermissionManager` | `newPermissionManager(java.lang.String key)`
`IAuthorizationPrincipal` | `newPrincipal(IGroupMember groupMember)` Converts an `IGroupMember` into an `IAuthorizationPrincipal`.
`IAuthorizationPrincipal` | `newPrincipal(java.lang.String key, java.lang.Class type)` Factory method for an `IAuthorizationPrincipal`.
`IUpdatingPermissionManager` | `newUpdatingPermissionManager(java.lang.String key)`
`void` | `removePermissions(IPermission[] permissions)` Removes `IPermissions` from the service.
`void` | `updatePermissions(IPermission[] permissions)` Updates `IPermissions` in the service.

Method Detail

### addPermissions

    void addPermissions(IPermission[] permissions)
                        throws AuthorizationException

  Adds `IPermissions` to the service.

  Parameters:
    `permissions` - IPermission[]
  Throws:
    `AuthorizationException`

### canPrincipalPublish

    boolean canPrincipalPublish(IAuthorizationPrincipal principal)
                                throws AuthorizationException

  I'm not sure what this means (Dan). Publish what?

  Parameters:
    `principal` - IAuthorizationPrincipal
  Returns:
    boolean
  Throws:
    `AuthorizationException`

### canPrincipalRender

    boolean canPrincipalRender(IAuthorizationPrincipal principal,
                               int channelPublishId)
                               throws AuthorizationException

  Answers if the principal has permission to render this Channel.

  Parameters:
    `principal` - IAuthorizationPrincipal
    `channelPublishId` - int
  Returns:
    boolean
  Throws:
    `AuthorizationException` - indicates authorization information could not be retrieved.

### canPrincipalSubscribe

    boolean canPrincipalSubscribe(IAuthorizationPrincipal principal,
                                  int channelPublishId)
                                  throws AuthorizationException

  Answers if the principal has permission to subscribe to this Channel.

  Parameters:
    `principal` - IAuthorizationPrincipal
    `channelPublishId` - int
  Returns:
    boolean
  Throws:
    `AuthorizationException` - indicates authorization information could not be retrieved.

### doesPrincipalHavePermission

    boolean doesPrincipalHavePermission(IAuthorizationPrincipal principal,
                                        java.lang.String owner,
                                        java.lang.String activity,
                                        java.lang.String target)
                                        throws AuthorizationException

  Answers if the owner has given the principal permission to perform the activity on the target. Params `owner` and `activity` must be non-null. If `target` is null, then target is not checked.

  Parameters:
    `principal` - IAuthorizationPrincipal
    `owner` - java.lang.String
    `activity` - java.lang.String
    `target` - java.lang.String
  Returns:
    boolean
  Throws:
    `AuthorizationException` - indicates authorization information could not be retrieved.

### getAllPermissionsForPrincipal

    IPermission[] getAllPermissionsForPrincipal(IAuthorizationPrincipal principal,
                                                java.lang.String owner,
                                                java.lang.String activity,
                                                java.lang.String target)
                                                throws AuthorizationException

  Returns the `IPermissions` owner has granted this `Principal` for the specified activity and target. This includes inherited `IPermissions`. Null parameters will be ignored, that is, all `IPermissions` matching the non-null parameters are retrieved. So, `getPermissions(principal,null, null, null)` should retrieve all `IPermissions` for a `Principal`.

  Parameters:
    `principal` - IAuthorizationPrincipal
    `owner` - java.lang.String
    `activity` - java.lang.String
    `target` - java.lang.String
  Returns:
    org.jasig.portal.security.IPermission[]
  Throws:
    `AuthorizationException` - indicates authorization information could not be retrieved.

### getAuthorizedChannels

    java.util.Vector getAuthorizedChannels(IAuthorizationPrincipal principal)
                                           throws AuthorizationException

  Does this mean all channels the principal could conceivably subscribe to or all channels principal is specifically authorized to subscribe to, or what?

  Parameters:
    `principal` - IAuthorizationPrincipal
  Returns:
    Vector (of channels?)
  Throws:
    `AuthorizationException` - indicates authorization information could not

### getGroupMember

    IGroupMember getGroupMember(IAuthorizationPrincipal principal)
                                throws GroupsException

  Parameters:
    `principal` - org.jasig.portal.security.IAuthorizationPrincipal
  Returns:
    org.jasig.portal.groups.IGroupMember
  Throws:
    `GroupsException`

### getPermissionsForOwner

    IPermission[] getPermissionsForOwner(java.lang.String owner,
                                         java.lang.String activity,
                                         java.lang.String target)
                                         throws AuthorizationException

  Returns the `IPermissions` owner has granted for the specified activity and target. Null parameters will be ignored, that is, all `IPermissions` matching the non-null parameters are retrieved.

  Parameters:
    `owner` - java.lang.String
    `activity` - java.lang.String
    `target` - java.lang.String
  Returns:
    org.jasig.portal.security.IPermission[]
  Throws:
    `AuthorizationException` - indicates authorization information could not be retrieved.

### getPermissionsForPrincipal

    IPermission[] getPermissionsForPrincipal(IAuthorizationPrincipal principal,
                                             java.lang.String owner,
                                             java.lang.String activity,
                                             java.lang.String target)
                                             throws AuthorizationException

  Returns the `IPermissions` owner has granted this `Principal` for the specified activity and target. Null parameters will be ignored, that is, all `IPermissions` matching the non-null parameters are retrieved. So, `getPermissions(principal,null, null, null)` should retrieve all `IPermissions` for a `Principal`.

  Parameters:
    `principal` - IAuthorizationPrincipal
    `owner` - java.lang.String
    `activity` - java.lang.String
    `target` - java.lang.String
  Returns:
    org.jasig.portal.security.IPermission[]
  Throws:
    `AuthorizationException` - indicates authorization information could not be retrieved.

### newPermission

    IPermission newPermission(java.lang.String owner,
                              IAuthorizationPrincipal principal)
                              throws AuthorizationException

  Creates a new `IPermission` for the `principal` on behalf of the `owner`.

  Parameters:
    `owner` - String
    `principal` - IAuthorizationPrincipal
  Throws:
    `AuthorizationException`

### newPermissionManager

    IPermissionManager newPermissionManager(java.lang.String key)
                                            throws AuthorizationException

  Parameters:
    `key` - java.lang.String
  Returns:
    org.jasig.portal.security.IPermissionManager
  Throws:
    `AuthorizationException`

### newPrincipal

    IAuthorizationPrincipal newPrincipal(java.lang.String key,
                                         java.lang.Class type)

  Factory method for an `IAuthorizationPrincipal`. This type wraps an underlying entity so that the authorization system can treat all principals alike.

  Parameters:
    `key` - String
    `type` - Class
  Returns:
    IAuthorizationPrincipal

### newPrincipal

    IAuthorizationPrincipal newPrincipal(IGroupMember groupMember)
                                         throws GroupsException

  Converts an `IGroupMember` into an `IAuthorizationPrincipal`.

  Parameters:
    `groupMember` - org.jasig.portal.groups.IGroupMember
  Returns:
    org.jasig.portal.security.IAuthorizationPrincipal
  Throws:
    `GroupsException`

### newUpdatingPermissionManager

    IUpdatingPermissionManager newUpdatingPermissionManager(java.lang.String key)
                                                            throws AuthorizationException

  Parameters:
    `key` - java.lang.String
  Returns:
    org.jasig.portal.security.IUpdatingPermissionManager
  Throws:
    `AuthorizationException`

### removePermissions

    void removePermissions(IPermission[] permissions)
                           throws AuthorizationException

  Removes `IPermissions` from the service.

  Parameters:
    `permissions` - IPermission[]
  Throws:
    `AuthorizationException`

### updatePermissions

    void updatePermissions(IPermission[] permissions)
                           throws AuthorizationException

  Updates `IPermissions` in the service.

  Parameters:
    `permissions` - IPermission[]
  Throws:
    `AuthorizationException`

### getPrincipal

    IAuthorizationPrincipal getPrincipal(IPermission permission)
                                         throws AuthorizationException

  Returns the `IAuthorizationPrincipal` associated with the `IPermission`.

  Parameters:
    `permission` - IPermission
  Throws:
    `AuthorizationException`

### getPrincipalString

    java.lang.String getPrincipalString(IAuthorizationPrincipal principal)

  Returns a `String` used to represent the `IAuthorizationPrincipal`.

  Parameters:
    `principal` - IAuthorizationPrincipal

### doesPrincipalHavePermission

    boolean doesPrincipalHavePermission(IAuthorizationPrincipal principal,
                                        java.lang.String owner,
                                        java.lang.String activity,
                                        java.lang.String target,
                                        IPermissionPolicy policy)
                                        throws AuthorizationException

  Answers if the owner has given the principal permission to perform the activity on the target, as evaluated by the policy. Params `policy`, `owner` and `activity` must be non-null. If `target` is null, then target is not checked.

  Parameters:
    `principal` - IAuthorizationPrincipal
    `owner` - java.lang.String
    `activity` - java.lang.String
    `target` - java.lang.String
  Returns:
    boolean
  Throws:
    `AuthorizationException` - indicates authorization information could not be retrieved.

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