|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object weblogic.security.SubjectUtils
public class 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 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 Principal getUserPrincipal(Subject s)
s
- the Subject to extract the user from
WLSUser
,
WLSGroup
public static String getUsername(Subject s)
s
- the Subject to extract the user name from.
public static String displaySubject(Subject subject)
subject
- Subject to display.
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
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 Subject getAnonymousUser()
public static boolean isUserAnonymous(Subject subject)
subject
- the subject.
public static boolean isUserAnAdministrator(Subject subject)
subject
- subject to test for Administrator privileges.
public static void checkSubjectNonNull(Object subject)
subject
- the subject to check.
IllegalArgumentException
- if subject is null.
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs100 Copyright 2006 BEA Systems Inc. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |