org.tigris.scarab.util
Class AnonymousUserUtil

java.lang.Object
  extended byorg.tigris.scarab.util.AnonymousUserUtil

public class AnonymousUserUtil
extends java.lang.Object

Author:
hdab To change the template for this generated type comment go to Window - Preferences - Java - Code Generation - Code and Comments

Constructor Summary
AnonymousUserUtil()
           
 
Method Summary
static boolean anonymousAccessAllowed()
          Returns true, when anonymous user access is explicitly allowed,.
static void anonymousLogin(org.apache.turbine.RunData data)
          Login the Anonymous user and prepare the run data
static java.lang.String getAnonymousRolename()
          Returns the name of the anonymous rolename Note: This method returns the anonymous userid independent from wether anonymous access is allowed or not.
static org.apache.fulcrum.security.entity.User getAnonymousUser()
          Return an instanceof the Anonymous User.
static java.lang.String getAnonymousUserId()
          Returns the userid of the anonymous user Note: This method returns the anonymous userid independent from wether anonymous access is allowed or not.
static boolean isUserAnonymous(ScarabUser user)
          Returns true if the user is the one set in scarab.anonymous.username, and false otherwise.
static void userLogin(org.apache.turbine.RunData data, org.apache.fulcrum.security.entity.User user)
          Login a given user into the session updating the rundata.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnonymousUserUtil

public AnonymousUserUtil()
Method Detail

isUserAnonymous

public static boolean isUserAnonymous(ScarabUser user)
Returns true if the user is the one set in scarab.anonymous.username, and false otherwise. Note: If anonymous access is denied per configuration, this method always returns false!

Returns:

anonymousAccessAllowed

public static boolean anonymousAccessAllowed()
Returns true, when anonymous user access is explicitly allowed,. Otherwise returns false.

Returns:

getAnonymousUserId

public static java.lang.String getAnonymousUserId()
Returns the userid of the anonymous user Note: This method returns the anonymous userid independent from wether anonymous access is allowed or not.

Returns:

getAnonymousRolename

public static java.lang.String getAnonymousRolename()
Returns the name of the anonymous rolename Note: This method returns the anonymous userid independent from wether anonymous access is allowed or not.

Returns:

getAnonymousUser

public static org.apache.fulcrum.security.entity.User getAnonymousUser()
                                                                throws org.apache.fulcrum.security.util.DataBackendException,
                                                                       org.apache.fulcrum.security.util.UnknownEntityException
Return an instanceof the Anonymous User. If Anonymous user has been switched off, this method returns a Turbine-anonymous user.

Returns:
Throws:
org.apache.fulcrum.security.util.DataBackendException
org.apache.fulcrum.security.util.UnknownEntityException

anonymousLogin

public static void anonymousLogin(org.apache.turbine.RunData data)
Login the Anonymous user and prepare the run data

Parameters:
data -

userLogin

public static void userLogin(org.apache.turbine.RunData data,
                             org.apache.fulcrum.security.entity.User user)
Login a given user into the session updating the rundata.

Parameters:
data -
user -


Copyright © 2000-2004 Tigris.org. All Rights Reserved.