|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.benow.security.user.Subject
@Deprecated public class Subject
A Subject acts as a container for Principals. Each Principal has permissions associated with it and may have those permissions checked via checkPermission(Permission).
Subjects may be associated with ProtectedActions via the doAs(Principal,ProtectedAction) method. The protected actions may call assertPermission(Permission) to resolve and validate user permissions during execution.
| Constructor Summary | |
|---|---|
Subject()
Deprecated. |
|
| Method Summary | |
|---|---|
void |
addPrincipal(java.security.Principal p)
Deprecated. |
static void |
assertPermission(java.lang.Class prefix,
java.lang.String suffix)
Deprecated. |
static void |
assertPermission(Permission perm)
Deprecated. |
void |
checkPermission(Permission perm)
Deprecated. Checks the permissions within each of the principals contained within this subject |
void |
checkPermission(java.lang.String name)
Deprecated. |
void |
checkPermission(java.lang.String name,
java.lang.String params)
Deprecated. |
static User |
currentPrincipal()
Deprecated. Gets the current principal for the currently executing thread. |
static void |
doAs(User user,
org.benow.java.run.MessyRunnable action)
Deprecated. Do the given action as the given subject. |
static void |
doAs(User user,
org.benow.java.run.MessyRunnable action,
boolean block)
Deprecated. perform the given action as the given subject, infoming the given listener. |
java.lang.String |
getName()
Deprecated. |
boolean |
hasPermission(java.lang.Class permissionPrefix,
java.lang.String suffix)
Deprecated. |
boolean |
hasPermission(Permission perm)
Deprecated. |
boolean |
hasPermission(java.lang.String name)
Deprecated. |
boolean |
hasPermission(java.lang.String name,
java.lang.String params)
Deprecated. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.security.Principal |
|---|
equals, hashCode, toString |
| Constructor Detail |
|---|
public Subject()
| Method Detail |
|---|
public void addPrincipal(java.security.Principal p)
public void checkPermission(Permission perm)
throws java.lang.SecurityException
perm -
java.lang.SecurityException
public void checkPermission(java.lang.String name)
throws java.lang.SecurityException
java.lang.SecurityException
public void checkPermission(java.lang.String name,
java.lang.String params)
throws java.lang.SecurityException
java.lang.SecurityException
public boolean hasPermission(java.lang.Class permissionPrefix,
java.lang.String suffix)
public boolean hasPermission(Permission perm)
perm -
public boolean hasPermission(java.lang.String name)
public boolean hasPermission(java.lang.String name,
java.lang.String params)
public static void doAs(User user,
org.benow.java.run.MessyRunnable action)
throws java.lang.Throwable
user - action -
java.lang.Exception - thrown in PrivilegedAction, if any.
java.lang.Throwable
public static void doAs(User user,
org.benow.java.run.MessyRunnable action,
boolean block)
throws java.lang.Throwable
user - action - block - Wait for the action to complete, or process the action in a backgrounded thread?
java.lang.Exception
java.lang.Throwable
public static User currentPrincipal()
throws java.lang.SecurityException
java.lang.SecurityException
public static void assertPermission(java.lang.Class prefix,
java.lang.String suffix)
throws java.lang.SecurityException
java.lang.SecurityException
public static void assertPermission(Permission perm)
throws java.lang.SecurityException
java.lang.SecurityExceptionpublic java.lang.String getName()
getName in interface java.security.Principal
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||