| java.lang.Object org.apache.jetspeed.security.SecurityHelper
SecurityHelper | public class SecurityHelper (Code) | |
Security helper.
author: David Sean Taylor version: $Id: SecurityHelper.java 517121 2007-03-12 07:45:49Z ate $ |
addPermissions | public static void addPermissions(PermissionCollection perms, PermissionCollection permsToAdd)(Code) | |
Adds a collection of permsToAdd to a collection of existing permissions.
Parameters: perms - The existing permissions. Parameters: permsToAdd - The permissions to add. |
createSubject | public static Subject createSubject(String principalName)(Code) | |
Utility method to create a subject.
Parameters: principalName - The user principal name. The subject. |
getBestPrincipal | public static Principal getBestPrincipal(Subject subject, Class classe)(Code) | |
Given a subject, finds the first principal of the given classe for that subject. If a
principal of the given classe is not found, then the first other principal is returned. If
the list is empty, null is returned.
Parameters: subject - The subject supplying the principals. Parameters: classe - A class or interface derived from java.security.InternalPrincipal. The first principal matching a principal classe parameter. |
getBestPrincipal | public static Principal getBestPrincipal(Principal[] principals, Class classe)(Code) | |
Returns the first matching principal of a given type.
Parameters: principals - The array of pricinpals Parameters: classe - The class of Principal The principal. |
getPasswordCredential | public static PasswordCredential getPasswordCredential(Subject subject)(Code) | |
Given a subject, find the (first) PasswordCredential from the private credentials
Parameters: subject - The subject the PasswordCredential or null if not found. |
getPreferencesFullPath | public static String getPreferencesFullPath(Principal principal)(Code) | |
Utility method used to retrieve the Preferences API absolute/full path from a given
principal.
Parameters: principal - The principal. The Preferences absolute/full path. |
getPrincipal | public static Principal getPrincipal(Subject subject, Class classe)(Code) | |
Given a subject, finds the first principal of the given classe for that subject. If a
principal of the given classe is not found, null is returned.
Parameters: subject - The subject supplying the principals. Parameters: classe - A class or interface derived from java.security.InternalPrincipal. The first principal matching a principal classe parameter. |
getPrincipals | public static List getPrincipals(Subject subject, Class classe)(Code) | |
Given a subject, finds all principals of the given classe for that subject. If no principals
of the given class is not found, null is returned.
Parameters: subject - The subject supplying the principals. Parameters: classe - A class or interface derived from java.security.InternalPrincipal. A List of all principals of type Principal matching a principal classe parameter. |
|
|