|
BEA Systems, Inc. | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweblogic.security.SubjectUtils
This class contains utilities for managing Subjects.
Constructor Summary | |
SubjectUtils()
|
Method Summary | |
static void |
checkSubjectNonNull(Object subject)
Throws an IllegalArgumentException if the Subject is null. |
static String |
displaySubject(Subject subject)
Gives a detailed display of a Subject. |
static Subject |
getAnonymousUser()
Returns an unmodifiable Subject that corresponds to an anonymous user. |
static Principal |
getOnePrincipal(Subject subject,
Class type)
Quickly return a single Principal of the specified type or return null. |
static String |
getUsername(Subject s)
Returns a username for the specified Subject. |
static Principal |
getUserPrincipal(Subject s)
Returns a principal for the specified Subject that represents the current user of the Web application. |
static boolean |
isUserAnAdministrator(Subject subject)
Returns true if the Subject has Administrator privileges. |
static boolean |
isUserAnonymous(Subject subject)
Returns true if and only if the user is the anonymous user. |
static boolean |
isUserInGroup(weblogic.security.acl.internal.AuthenticatedSubject s,
String group)
Returns true if the Subject is in the specified group. |
static boolean |
isUserInGroup(Subject s,
String group)
Returns true if the Subject is in the specified group. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SubjectUtils()
Method Detail |
public static void checkSubjectNonNull(Object subject)
subject
- the subject to check.
IllegalArgumentException
- if subject is null.public static String displaySubject(Subject subject)
subject
- Subject to display.
public static Subject getAnonymousUser()
public static Principal getOnePrincipal(Subject subject, Class type)
subject
- Subject to searchtype
- Principal type to search for
public static String getUsername(Subject s)
s
- the Subject to extract the user name from.
public static Principal getUserPrincipal(Subject s)
s
- the Subject to extract the user from
WLSUser
,
WLSGroup
public static boolean isUserAnAdministrator(Subject subject)
subject
- subject to test for Administrator privileges.
public static boolean isUserAnonymous(Subject subject)
subject
- the subject.
public static boolean isUserInGroup(weblogic.security.acl.internal.AuthenticatedSubject s, String group)
s
- AuthenticatedSubject to determin if the user is in the groupgroup
- name of group to compare
WLSGroup
public static boolean isUserInGroup(Subject s, String group)
s
- Subject to determine if the user is in the group.group
- name of group to compare.
WLSGroup
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs90 Copyright 2005 BEA Systems Inc. |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |