org.restlet.ext.gae
Class GaeEnroler

java.lang.Object
  extended by org.restlet.ext.gae.GaeEnroler
All Implemented Interfaces:
Enroler

public class GaeEnroler
extends Object
implements Enroler

Enroler that adds a Restlet Role object to the client info if the GAE API reports that the user is an administrator.

Author:
Matt Kennedy

Constructor Summary
GaeEnroler()
          Default constructor.
GaeEnroler(Role adminRole)
          Constructor.
GaeEnroler(String adminRoleName)
          Constructor.
GaeEnroler(String adminRoleName, String adminRoleDescription)
          Constructor.
 
Method Summary
 void enrole(ClientInfo info)
          Adds admin role object if user is an administrator according to Google App Engine UserService.
 Role getAdminRole()
          Returns the administrator role.
 void setAdminRole(Role adminRole)
          Sets the administrator role.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GaeEnroler

public GaeEnroler()
Default constructor. It defines an administrator role, which name is "admin".


GaeEnroler

public GaeEnroler(Role adminRole)
Constructor.

Parameters:
adminRole - The administrator role.

GaeEnroler

public GaeEnroler(String adminRoleName)
Constructor.

Parameters:
adminRoleName - The name of the administrator role.

GaeEnroler

public GaeEnroler(String adminRoleName,
                  String adminRoleDescription)
Constructor.

Parameters:
adminRoleName - The name of the administrator role.
adminRoleDescription - The description of the administrator role.
Method Detail

enrole

public void enrole(ClientInfo info)
Adds admin role object if user is an administrator according to Google App Engine UserService.

Specified by:
enrole in interface Enroler
See Also:
Enroler.enrole(org.restlet.data.ClientInfo)

getAdminRole

public Role getAdminRole()
Returns the administrator role.

Returns:
The administrator role.

setAdminRole

public void setAdminRole(Role adminRole)
Sets the administrator role.

Parameters:
adminRole - The administrator role.


Copyright © 2005-2013 Restlet.