|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sourceforge.jfacets.acegi.AcegiProfileRepository
public class AcegiProfileRepository
The AcegiProfileRepository enable easy use of WebFacets with Acegi.
It relies on injected UserDetailsService in order to
retrieve users and related roles.
IMPORTANT : Acegi does not support hierarchical roles and does
not allow to get informations about a role. Thereby, in order to use
these features, your UserDetailsService has to implement the
IHierarchicalUserDetailsService interface. Otherwise,
it'll work only for flat roles and you will only be able to use facets
for user profiles (not roles).
| Field Summary | |
|---|---|
private java.util.HashMap<java.lang.String,org.acegisecurity.userdetails.UserDetails> |
cachedUserDetails
|
private static JFacetsLogger |
logger
|
private boolean |
useCache
|
private org.acegisecurity.userdetails.UserDetailsService |
userDetailsService
the injected UserDetailsService |
| Constructor Summary | |
|---|---|
AcegiProfileRepository()
|
|
| Method Summary | |
|---|---|
org.acegisecurity.GrantedAuthority |
getGrantedAuthority(java.lang.String roleName)
Return the GrantedAuthority for passed role name. |
org.acegisecurity.GrantedAuthority[] |
getParentRoles(org.acegisecurity.GrantedAuthority grantedAuthority)
Return a list of parent roles for passed Granted Authority. |
IProfile |
getProfileById(java.lang.String profileId)
Return a profile by ID. |
IProfile[] |
getRootProfiles()
|
IProfile[] |
getSubProfiles(IProfile parentProfile)
|
IProfile[] |
getSuperProfiles(IProfile profile)
Return the super profiles for passed profile if found, a 0-length array if not found. |
org.acegisecurity.userdetails.UserDetailsService |
getUserDetailsService()
get the UserDetailsService |
boolean |
isUseCache()
|
void |
setUseCache(boolean useCache)
|
void |
setUserDetailsService(org.acegisecurity.userdetails.UserDetailsService userDetailsService)
set the UserDetailsService |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private org.acegisecurity.userdetails.UserDetailsService userDetailsService
private static final JFacetsLogger logger
private java.util.HashMap<java.lang.String,org.acegisecurity.userdetails.UserDetails> cachedUserDetails
private boolean useCache
| Constructor Detail |
|---|
public AcegiProfileRepository()
| Method Detail |
|---|
public IProfile getProfileById(java.lang.String profileId)
UserDetailsProfile in case passed
profileId represents a role name, or a GrantedAuthorityProfile if
passed profileId identifies a valid user (uses UserDetailsService).
getProfileById in interface IProfileRepositorypublic IProfile[] getSuperProfiles(IProfile profile)
getSuperProfiles in interface IProfileRepositorypublic org.acegisecurity.GrantedAuthority getGrantedAuthority(java.lang.String roleName)
public org.acegisecurity.GrantedAuthority[] getParentRoles(org.acegisecurity.GrantedAuthority grantedAuthority)
public org.acegisecurity.userdetails.UserDetailsService getUserDetailsService()
public void setUserDetailsService(org.acegisecurity.userdetails.UserDetailsService userDetailsService)
public boolean isUseCache()
public void setUseCache(boolean useCache)
public IProfile[] getRootProfiles()
getRootProfiles in interface INavigableProfileRepositorypublic IProfile[] getSubProfiles(IProfile parentProfile)
getSubProfiles in interface INavigableProfileRepository
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||