BEA Systems, Inc.

BEA WebLogic Server 9.1 API Reference


weblogic.security
Class WLSPrincipals

java.lang.Object
  extended byweblogic.security.WLSPrincipals

public class WLSPrincipals
extends Object

Use this class to find out if a Principal has special meaning to WebLogic Server.

Copyright © 2005 BEA Systems, Inc. All Rights Reserved.

Constructor Summary
WLSPrincipals()
           
 
Method Summary
static String getAdministratorsGroupname()
          Get the name of the Administrators group.
static String getAnonymousRolename()
          Get the name of the Anonymous role.
static String getAnonymousUsername()
          Get the name of the anonymous user.
static Principal getAnonymousUserPrincipal()
          Returns a principal that corresponds to the anonymous username.
static String getEveryoneGroupname()
          Get the name of the everyone group.
static String getKernelUsername()
          Get the name of the kernel user.
static String getUsersGroupname()
          Get the name of the users group.
static boolean isAnonymousPrincipal(Principal principal)
          Used to tell if a Principal is an anonymous Principal.
static boolean isAnonymousRolename(String rolename)
          Used to tell if a given rolename is "Anonymous" rolename
static boolean isAnonymousUsername(String username)
          Used to tell if a username is the anonymous user.
static boolean isKernelUsername(String username)
          Used to tell if a username is the kernel user.
static boolean isSpecialGroupname(String groupname)
          Used to tell if a groupname is one of the WLS special groups, currently only "users" and "everyone".
static boolean isSpecialUsername(String username)
          Used to tell if a username is one of the WLS special groups, currently only "" and "".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WLSPrincipals

public WLSPrincipals()
Method Detail

getAdministratorsGroupname

public static String getAdministratorsGroupname()
Get the name of the Administrators group.

Returns:
the name of the administrators group

getAnonymousRolename

public static String getAnonymousRolename()
Get the name of the Anonymous role.

Returns:
the name of the Anonymous role

getAnonymousUsername

public static String getAnonymousUsername()
Get the name of the anonymous user.

Returns:
the name of the anonymous user

getAnonymousUserPrincipal

public static Principal getAnonymousUserPrincipal()
Returns a principal that corresponds to the anonymous username. This is not actually part of the anonymous user as that is a Subject with no Principals. It is used when a Principal must be returned from an anonymous user.

Returns:
the anonymous user Principal

getEveryoneGroupname

public static String getEveryoneGroupname()
Get the name of the everyone group.

Returns:
the name of the administrators group

getKernelUsername

public static String getKernelUsername()
Get the name of the kernel user.

Returns:
the name of the kernel user

getUsersGroupname

public static String getUsersGroupname()
Get the name of the users group.

Returns:
the name of the users group

isAnonymousPrincipal

public static boolean isAnonymousPrincipal(Principal principal)
Used to tell if a Principal is an anonymous Principal. This will be the case if the Principal is null, if it is the Principal returned by getAnonymousUserPrincipal() or if it is a 6.x guest Principal.

Parameters:
principal - the Principal to test
Returns:
true if this is an anonymous Principal, false otherwise

isAnonymousRolename

public static boolean isAnonymousRolename(String rolename)
Used to tell if a given rolename is "Anonymous" rolename

Parameters:
rolename - the name of the role
Returns:
true if this is a Anonymous role, false otherwise

isAnonymousUsername

public static boolean isAnonymousUsername(String username)
Used to tell if a username is the anonymous user.

Parameters:
username - the name of the user
Returns:
true if this is the anonymous user, false otherwise

isKernelUsername

public static boolean isKernelUsername(String username)
Used to tell if a username is the kernel user.

Parameters:
username - the name of the user
Returns:
true if this is the kernel user, false otherwise

isSpecialGroupname

public static boolean isSpecialGroupname(String groupname)
Used to tell if a groupname is one of the WLS special groups, currently only "users" and "everyone".

Parameters:
groupname - the name of the group
Returns:
true if this is a special group, false otherwise

isSpecialUsername

public static boolean isSpecialUsername(String username)
Used to tell if a username is one of the WLS special groups, currently only "" and "".

Parameters:
username - the name of the user
Returns:
true if this is a special user, false otherwise

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs91
Copyright 2005 BEA Systems Inc.