org.coweb.admin.security
Class SecurityPolicy

java.lang.Object
  extended by org.cometd.server.DefaultSecurityPolicy
      extended by org.coweb.CowebSecurityPolicy
          extended by org.coweb.admin.security.SecurityPolicy
All Implemented Interfaces:
org.cometd.bayeux.server.SecurityPolicy

public class SecurityPolicy
extends CowebSecurityPolicy


Constructor Summary
SecurityPolicy()
           
 
Method Summary
 boolean canAdminRequest(String username, String key, boolean collab)
          Called when a user preps a session.
 boolean canInvokeServiceRequest(String username, String sessionid, String serviceName)
          Called when a user attempts to send a private message to a bot.
 boolean canSubscribeService(String username, String sessionid, String serviceName)
          Called when a user attempts to subscribe to a service bot.
 boolean canSubscribeToSession(String username, String sessionid)
          Called when a user attempts to join a session.
 boolean canSubscribeToSession(String username, String key, boolean collab)
          Called when a user attempts to join a session.
 void setAdmin(Admin admin)
           
 
Methods inherited from class org.coweb.CowebSecurityPolicy
canHandshake
 
Methods inherited from class org.cometd.server.DefaultSecurityPolicy
canCreate, canPublish, canSubscribe
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityPolicy

public SecurityPolicy()
Method Detail

setAdmin

public void setAdmin(Admin admin)

canAdminRequest

public boolean canAdminRequest(String username,
                               String key,
                               boolean collab)
Called when a user preps a session.

Parameters:
username - User attempting the prep request
key - Conference Key
collab - If this conference is collaborative
Returns:
true if the user is allowed to make a prep request.

canSubscribeToSession

public boolean canSubscribeToSession(String username,
                                     String key,
                                     boolean collab)
Called when a user attempts to join a session.

Parameters:
username - User attempting to join a session.
key - Coweb key associated with this session.
collab - true is this session is collaborative.
Returns:
true if the user is allowed to join the session.

canSubscribeToSession

public boolean canSubscribeToSession(String username,
                                     String sessionid)
Called when a user attempts to join a session.

Parameters:
username - User attempting to join a session.
sessionid - Id of the session
Returns:
true if the user is allowed to join the session.

canInvokeServiceRequest

public boolean canInvokeServiceRequest(String username,
                                       String sessionid,
                                       String serviceName)
Called when a user attempts to send a private message to a bot.

Parameters:
username - User attempting to make the request.
sessionid - Id of the session
serviceName - Name of the service the bot provides.
Returns:
true if the user is allowed to make the request.

canSubscribeService

public boolean canSubscribeService(String username,
                                   String sessionid,
                                   String serviceName)
Called when a user attempts to subscribe to a service bot.

Parameters:
username - User attempting to subscribe
sessionid - Id of the session
serviceName - Name of the service the bot provides.
Returns:
true if the user is allowed to subscribe.


Copyright © 2011-2012 The Dojo Foundation. All Rights Reserved.