Restlet Framework 2.2.2
Google App Engine

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 request's ClientInfo if the GAE API reports that the user is an administrator.

Author:
Matt Kennedy

Constructor Summary
GaeEnroler()
          Default constructor.
GaeEnroler(Application application, String adminRoleName)
          Constructor.
GaeEnroler(Application application, String adminRoleName, String adminRoleDescription)
          Constructor.
GaeEnroler(Role adminRole)
          Constructor.
GaeEnroler(String adminRoleName)
          Deprecated. Use GaeEnroler(Application, String) instead.
GaeEnroler(String adminRoleName, String adminRoleDescription)
          Deprecated. Use GaeEnroler(Application, String, String) instead.
 
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(Application application,
                  String adminRoleName)
Constructor.

Parameters:
application - The parent application.
adminRoleName - The name of the administrator role.

GaeEnroler

public GaeEnroler(Application application,
                  String adminRoleName,
                  String adminRoleDescription)
Constructor.

Parameters:
application - The parent application.
adminRoleName - The name of the administrator role.
adminRoleDescription - The description of the administrator role.

GaeEnroler

public GaeEnroler(Role adminRole)
Constructor.

Parameters:
adminRole - The administrator role.

GaeEnroler

@Deprecated
public GaeEnroler(String adminRoleName)
Deprecated. Use GaeEnroler(Application, String) instead.

Constructor.

Parameters:
adminRoleName - The name of the administrator role.

GaeEnroler

@Deprecated
public GaeEnroler(String adminRoleName,
                             String adminRoleDescription)
Deprecated. Use GaeEnroler(Application, String, String) instead.

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.

Restlet Framework 2.2.2
Google App Engine

Copyright © 2005-2014 Restlet.