org.jasig.portal.security
Interface IAuthorizationPrincipal

All Known Implementing Classes:
AuthorizationPrincipalImpl

public interface IAuthorizationPrincipal

An IAuthorizationPrincipal represents a portal entity to which IPermissions have been granted. Such an entity could be an IGroupMember, an IChannel or an IPerson.

Version:
$Revision: 19776 $
Author:
Dan Ellentuck

Method Summary
 boolean canConfigure(int channelPublishId)
          Answers if this IAuthorizationPrincipal has permission to use the CONFIG PortletMode on the specified channel
 boolean canManage(ChannelLifecycleState state, String categoryId)
          Answers if this IAuthorizationPrincipal has permission to publish (used only by SLM).
 boolean canManage(int channelPublishId)
          Answers if this IAuthorizationPrincipal has permission to manage this channel.
 boolean canRender(int channelPublishId)
          Answers if this IAuthoriztionPrincipal has permission to render this channel.
 boolean canSubscribe(int channelPublishId)
          Answers if this IAuthorizationPrincipal has permission to subscribe to this channel.
 IPermission[] getAllPermissions()
          Returns the IPermissions for this IAuthorizationPrincipal, including inherited Permissions.
 IPermission[] getAllPermissions(String owner, String activity, String target)
          Returns the IPermissions for this IAuthorizationPrincipal for the specified owner, activity and target.
 Vector getAuthorizedChannels()
          Return a Vector of IChannels.
 String getKey()
          Returns the key of the underlying entity.
 IPermission[] getPermissions()
          Returns the IPermissions for this IAuthorizationPrincipal.
 IPermission[] getPermissions(String owner, String activity, String target)
          Returns the IPermissions for this IAuthorizationPrincipal for the specified owner, activity and target.
 String getPrincipalString()
           
 Class getType()
          Return the Type of the underlying entity.
 boolean hasPermission(String owner, String activity, String target)
          Answers if this IAuthorizationPrincipal has permission to perform the activity on the target.
 boolean hasPermission(String owner, String activity, String target, IPermissionPolicy policy)
          Answers if this IAuthorizationPrincipal has permission to perform the activity on the target, as evaluated by the policy.
 

Method Detail

canManage

boolean canManage(int channelPublishId)
                  throws AuthorizationException
Answers if this IAuthorizationPrincipal has permission to manage this channel.

Parameters:
channelPublishId - int - the Channel Id
Returns:
boolean
Throws:
AuthorizationException - thrown when authorization information could not be retrieved.

canManage

boolean canManage(ChannelLifecycleState state,
                  String categoryId)
                  throws AuthorizationException
Answers if this IAuthorizationPrincipal has permission to publish (used only by SLM).

Returns:
boolean
Throws:
AuthorizationException - thrown when authorization information could not be retrieved.

canConfigure

boolean canConfigure(int channelPublishId)
                     throws AuthorizationException
Answers if this IAuthorizationPrincipal has permission to use the CONFIG PortletMode on the specified channel

Parameters:
channelPublishId -
Returns:
Throws:
AuthorizationException

canRender

boolean canRender(int channelPublishId)
                  throws AuthorizationException
Answers if this IAuthoriztionPrincipal has permission to render this channel.

Parameters:
channelPublishId - int - the Channel publish Id
Returns:
boolean
Throws:
AuthorizationException - thrown when authorization information could not be retrieved.

canSubscribe

boolean canSubscribe(int channelPublishId)
                     throws AuthorizationException
Answers if this IAuthorizationPrincipal has permission to subscribe to this channel.

Parameters:
channelPublishId - int - the Channel Id
Returns:
boolean
Throws:
AuthorizationException - thrown when authorization information could not be retrieved.

getAllPermissions

IPermission[] getAllPermissions()
                                throws AuthorizationException
Returns the IPermissions for this IAuthorizationPrincipal, including inherited Permissions.

Returns:
org.jasig.portal.security.IPermission[]
Throws:
AuthorizationException - indicates authorization information could not be retrieved.

getAllPermissions

IPermission[] getAllPermissions(String owner,
                                String activity,
                                String target)
                                throws AuthorizationException
Returns the IPermissions for this IAuthorizationPrincipal for the specified owner, activity and target. This includes inherited IPermissions. Null parameters are ignored, so getPermissions(null, null, null) should retrieve all IPermissions for an IAuthorizationPrincipal.

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.

getAuthorizedChannels

Vector getAuthorizedChannels()
                             throws AuthorizationException
Return a Vector of IChannels.

Returns:
a java.util.Vector of IChannels
Throws:
AuthorizationException - indicates authorization information could not be retrieved.

getKey

String getKey()
Returns the key of the underlying entity.

Returns:
java.lang.String

getPermissions

IPermission[] getPermissions()
                             throws AuthorizationException
Returns the IPermissions for this IAuthorizationPrincipal.

Returns:
org.jasig.portal.security.IPermission[]
Throws:
AuthorizationException - indicates authorization information could not be retrieved.

getPermissions

IPermission[] getPermissions(String owner,
                             String activity,
                             String target)
                             throws AuthorizationException
Returns the IPermissions for this IAuthorizationPrincipal for the specified owner, activity and target. Null parameters are ignored, so getPermissions(null, null, null) should retrieve all IPermissions for an IAuthorizationPrincipal.

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.

getPrincipalString

String getPrincipalString()
Returns:
java.lang.String

getType

Class getType()
Return the Type of the underlying entity.

Returns:
java.lang.Class

hasPermission

boolean hasPermission(String owner,
                      String activity,
                      String target)
                      throws AuthorizationException
Answers if this IAuthorizationPrincipal has permission to perform the activity on the target. Params owner and activity must be non-null. If target is null, then the target is not checked.

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

hasPermission

boolean hasPermission(String owner,
                      String activity,
                      String target,
                      IPermissionPolicy policy)
                      throws AuthorizationException
Answers if this IAuthorizationPrincipal has permission to perform the activity on the target, as evaluated by the policy. Params policy, owner and activity must be non-null.

Parameters:
owner - java.lang.String
activity - java.lang.String
target - java.lang.String
policy - org.jasig.portal.security.IPermissionPolicy
Returns:
boolean
Throws:
AuthorizationException - indicates authorization information could not be retrieved.


Copyright © 2010 Jasig. All Rights Reserved.