com.sun.im.provider
Class PolicyProvider

java.lang.Object
  extended bycom.sun.im.provider.PolicyProvider

public abstract class PolicyProvider
extends java.lang.Object

Does policy evaluation regardless of Policy store used


Nested Class Summary
static class PolicyProvider.AccessLevelResult
          This class is used to give results with specific access levels
static class PolicyProvider.Result
          This class defines the results which can be returned after the evaluation of policy
 
Field Summary
static PolicyProvider.AccessLevelResult ADMIN_ACCESS
          Admin level access
static PolicyProvider.Result ALLOWED
          Allow the user to perform the operation
static PolicyProvider.Result INSUFFICIENT_PERMISSIONS
          Insufficient permissions to perform the operation
static PolicyProvider.Result NOT_ACCEPTABLE
          Not acceptable
static PolicyProvider.Result NOT_ALLOWED
          Do not allow the user to perform the operation
static PolicyProvider.Result PAYMENT_REQUIRED
          Payment is required for performing the operation
static PolicyProvider.AccessLevelResult READONLY_ACCESS
          Read-only access
static PolicyProvider.AccessLevelResult READWRITE_ACCESS
          Read-Write access
static PolicyProvider.Result REGISTRATION_REQUIRED
          Registration is required for performing the operation
static PolicyProvider.Result SUBSCRIPTION_REQUIRED
          Subcription is required for performing that operation
static PolicyProvider.Result UNDEFINED_ERROR
          Undefined error
 
Constructor Summary
PolicyProvider()
           
 
Method Summary
 PolicyProvider.Result checkAccessConferencePermission(CollaborationPrincipal u)
          Check if the user can access conference rooms
 PolicyProvider.Result checkAccessNewsPermission(CollaborationPrincipal u)
          Check if the user can access news channels
 PolicyProvider.Result checkAdminPermission(CollaborationPrincipal u)
          Check if the user is an I adminstrator, and so has no access restrictions to any data managed by the IM and presence services.
 PolicyProvider.Result checkChangeSettingsPermission(CollaborationPrincipal u)
          Check if the user can change his or her own settings
 PolicyProvider.Result checkChatPermission(CollaborationPrincipal u)
          Checks if the user can use the chat feature
 PolicyProvider.Result checkInvitePermission(CollaborationPrincipal u)
          Check if the user can send chat invitations to other users
 PolicyProvider.Result checkManageConferencePermission(CollaborationPrincipal u)
          Check if the user can manage conference rooms
 PolicyProvider.Result checkManageNewsPermission(CollaborationPrincipal u)
          Check if the user can manage news channel
 PolicyProvider.Result checkManagePresenceACLPermission(CollaborationPrincipal u)
          Check if the user can manage his or her presence provacy rules
 PolicyProvider.Result checkManageRosterPermission(CollaborationPrincipal u)
           
 PolicyProvider.Result checkModerateConferencePermission(CollaborationPrincipal u)
          Check if the user can moderate conference rooms
 PolicyProvider.Result checkPollPermission(CollaborationPrincipal u)
          Check if the user can send poll messages
 PolicyProvider.Result checkPublishPresencePermission(CollaborationPrincipal u)
          Check if the user can advertise his or her presence
 PolicyProvider.Result checkReceiveAlertsPermission(CollaborationPrincipal u)
          Check if the user can receive alerts.
 PolicyProvider.Result checkReceivePollsPermission(CollaborationPrincipal u)
          Check if the user can receive alerts
 PolicyProvider.Result checkSendAlertsPermission(CollaborationPrincipal u)
          Checks if the user has permission to send alerts.
 PolicyProvider.Result checkTransferFilesPermission(CollaborationPrincipal u)
          Check if the user can use the file transfer funcionality (send or receive)
 PolicyProvider.Result checkWatchPermission(CollaborationPrincipal u)
          Check if the user can access to other users presence information
static PolicyProvider.AccessLevelResult getAccessLevelResult(int access)
           
 PolicyProvider.Result getConferenceAccess(CollaborationPrincipal u, java.lang.String destination, java.lang.String secret, PolicyProvider.AccessLevelResult wouldbeAccess)
          Returns the access level of a principal into a conference.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALLOWED

public static final PolicyProvider.Result ALLOWED
Allow the user to perform the operation


INSUFFICIENT_PERMISSIONS

public static final PolicyProvider.Result INSUFFICIENT_PERMISSIONS
Insufficient permissions to perform the operation


PAYMENT_REQUIRED

public static final PolicyProvider.Result PAYMENT_REQUIRED
Payment is required for performing the operation


SUBSCRIPTION_REQUIRED

public static final PolicyProvider.Result SUBSCRIPTION_REQUIRED
Subcription is required for performing that operation


REGISTRATION_REQUIRED

public static final PolicyProvider.Result REGISTRATION_REQUIRED
Registration is required for performing the operation


NOT_ALLOWED

public static final PolicyProvider.Result NOT_ALLOWED
Do not allow the user to perform the operation


NOT_ACCEPTABLE

public static final PolicyProvider.Result NOT_ACCEPTABLE
Not acceptable


UNDEFINED_ERROR

public static final PolicyProvider.Result UNDEFINED_ERROR
Undefined error


READONLY_ACCESS

public static final PolicyProvider.AccessLevelResult READONLY_ACCESS
Read-only access


READWRITE_ACCESS

public static final PolicyProvider.AccessLevelResult READWRITE_ACCESS
Read-Write access


ADMIN_ACCESS

public static final PolicyProvider.AccessLevelResult ADMIN_ACCESS
Admin level access

Constructor Detail

PolicyProvider

public PolicyProvider()
Method Detail

getAccessLevelResult

public static PolicyProvider.AccessLevelResult getAccessLevelResult(int access)

checkSendAlertsPermission

public PolicyProvider.Result checkSendAlertsPermission(CollaborationPrincipal u)
Checks if the user has permission to send alerts.

Parameters:
u - principal doing the request
Returns:
Result based on the policy. The default value is ALLOWED

checkChatPermission

public PolicyProvider.Result checkChatPermission(CollaborationPrincipal u)
Checks if the user can use the chat feature

Parameters:
u - principal doing the request
Returns:
Result based on the policy. The default value is ALLOWED

checkAccessConferencePermission

public PolicyProvider.Result checkAccessConferencePermission(CollaborationPrincipal u)
Check if the user can access conference rooms

Parameters:
u - principal doing the request
Returns:
Result based on the policy. The default value is ALLOWED

checkManageConferencePermission

public PolicyProvider.Result checkManageConferencePermission(CollaborationPrincipal u)
Check if the user can manage conference rooms

Parameters:
u - principal doing the request
Returns:
Result based on the policy. The default value is ALLOWED

checkModerateConferencePermission

public PolicyProvider.Result checkModerateConferencePermission(CollaborationPrincipal u)
Check if the user can moderate conference rooms

Parameters:
u - principal doing the request
Returns:
Result based on the policy. The default value is ALLOWED

checkReceiveAlertsPermission

public PolicyProvider.Result checkReceiveAlertsPermission(CollaborationPrincipal u)
Check if the user can receive alerts.

Parameters:
u - principal doing the request
Returns:
Result based on the policy. The default value is ALLOWED

checkReceivePollsPermission

public PolicyProvider.Result checkReceivePollsPermission(CollaborationPrincipal u)
Check if the user can receive alerts

Parameters:
u - principal doing the request
Returns:
Result based on the policy. The default value is ALLOWED

checkAccessNewsPermission

public PolicyProvider.Result checkAccessNewsPermission(CollaborationPrincipal u)
Check if the user can access news channels

Parameters:
u - principal doing the request
Returns:
Result based on the policy. The default value is ALLOWED

checkManageNewsPermission

public PolicyProvider.Result checkManageNewsPermission(CollaborationPrincipal u)
Check if the user can manage news channel

Parameters:
u - principal doing the request
Returns:
Result based on the policy. The default value is ALLOWED

checkManageRosterPermission

public PolicyProvider.Result checkManageRosterPermission(CollaborationPrincipal u)
Parameters:
u - principal doing the request
Returns:
true if the user can send alerts

checkChangeSettingsPermission

public PolicyProvider.Result checkChangeSettingsPermission(CollaborationPrincipal u)
Check if the user can change his or her own settings

Parameters:
u - principal doing the request
Returns:
Result based on the policy. The default value is ALLOWED

checkPollPermission

public PolicyProvider.Result checkPollPermission(CollaborationPrincipal u)
Check if the user can send poll messages

Parameters:
u - principal doing the request
Returns:
Result based on the policy. The default value is ALLOWED

checkInvitePermission

public PolicyProvider.Result checkInvitePermission(CollaborationPrincipal u)
Check if the user can send chat invitations to other users

Parameters:
u - principal doing the request
Returns:
Result based on the policy. The default value is ALLOWED

checkManagePresenceACLPermission

public PolicyProvider.Result checkManagePresenceACLPermission(CollaborationPrincipal u)
Check if the user can manage his or her presence provacy rules

Parameters:
u - principal doing the request
Returns:
Result based on the policy. The default value is ALLOWED

checkTransferFilesPermission

public PolicyProvider.Result checkTransferFilesPermission(CollaborationPrincipal u)
Check if the user can use the file transfer funcionality (send or receive)

Parameters:
u - principal doing the request
Returns:
Result based on the policy. The default value is ALLOWED

checkPublishPresencePermission

public PolicyProvider.Result checkPublishPresencePermission(CollaborationPrincipal u)
Check if the user can advertise his or her presence

Parameters:
u - principal doing the request
Returns:
Result based on the policy. The default value is ALLOWED

checkWatchPermission

public PolicyProvider.Result checkWatchPermission(CollaborationPrincipal u)
Check if the user can access to other users presence information

Parameters:
u - principal doing the request
Returns:
Result based on the policy. The default value is ALLOWED

checkAdminPermission

public PolicyProvider.Result checkAdminPermission(CollaborationPrincipal u)
Check if the user is an I adminstrator, and so has no access restrictions to any data managed by the IM and presence services.

Parameters:
u - principal doing the request
Returns:
Result based on the policy. The default value is NOT_ALLOWED

getConferenceAccess

public PolicyProvider.Result getConferenceAccess(CollaborationPrincipal u,
                                                 java.lang.String destination,
                                                 java.lang.String secret,
                                                 PolicyProvider.AccessLevelResult wouldbeAccess)
Returns the access level of a principal into a conference. Note: the access level returned may not be higher than that derived from affiliations for the destination.

Parameters:
u - principal requesting access to the conference
destination - serialized conference address
secret - a password or token included in the join request, if any.
wouldbeAccess - The AccessLevelResult for the user based on the Conference affiliations.
Returns:
a Result with an valid AccessLevelResult as defined in this class.