Class GroupedPrincipal<T extends com.foreach.across.modules.hibernate.business.SettableIdBasedEntity<?>>
java.lang.Object
com.foreach.across.modules.hibernate.business.SettableIdBasedEntity<T>
com.foreach.across.modules.user.business.BasicSecurityPrincipal<T>
com.foreach.across.modules.user.business.GroupedPrincipal<T>
- All Implemented Interfaces:
com.foreach.across.modules.hibernate.business.Auditable<String>
,com.foreach.across.modules.hibernate.business.EntityWithDto<T>
,com.foreach.across.modules.hibernate.business.IdBasedEntity
,com.foreach.across.modules.spring.security.infrastructure.business.SecurityPrincipal
,com.foreach.across.modules.spring.security.infrastructure.business.SecurityPrincipalHierarchy
,IdBasedSecurityPrincipal
,org.springframework.data.domain.Persistable<Long>
- Direct Known Subclasses:
MachinePrincipal
,User
@NotThreadSafe
@MappedSuperclass
public abstract class GroupedPrincipal<T extends com.foreach.across.modules.hibernate.business.SettableIdBasedEntity<?>>
extends BasicSecurityPrincipal<T>
implements com.foreach.across.modules.spring.security.infrastructure.business.SecurityPrincipalHierarchy
Extension to
BasicSecurityPrincipal
that allows being a member of one or more principal groups.- Author:
- Arne Vandamme
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
protected void
buildAuthoritySet
(Set<org.springframework.security.core.GrantedAuthority> authorities) Collection<com.foreach.across.modules.spring.security.infrastructure.business.SecurityPrincipal>
boolean
hasPermission
(Permission permission) boolean
isMemberOf
(Group group) void
removeGroup
(Group group) void
setGroups
(Collection<Group> groups) Methods inherited from class com.foreach.across.modules.user.business.BasicSecurityPrincipal
addRole, getAuthorities, getCreatedBy, getCreatedDate, getId, getLastModifiedBy, getLastModifiedDate, getPrincipalName, getRoles, getUserDirectory, hasPermission, hasRole, hasRole, removeRole, setCreatedBy, setCreatedDate, setId, setLastModifiedBy, setLastModifiedDate, setPrincipalName, setRoles, setUserDirectory, toString, uniquePrincipalName
Methods inherited from class com.foreach.across.modules.hibernate.business.SettableIdBasedEntity
equals, getNewEntityId, hashCode, isNew, setNewEntityId, toDto
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.foreach.across.modules.spring.security.infrastructure.business.SecurityPrincipal
getSecurityPrincipalId
-
Constructor Details
-
GroupedPrincipal
public GroupedPrincipal()
-
-
Method Details
-
getGroups
-
setGroups
-
isMemberOf
-
addGroup
-
removeGroup
-
hasPermission
- Overrides:
hasPermission
in classBasicSecurityPrincipal<T extends com.foreach.across.modules.hibernate.business.SettableIdBasedEntity<?>>
-
buildAuthoritySet
protected void buildAuthoritySet(Set<org.springframework.security.core.GrantedAuthority> authorities) - Overrides:
buildAuthoritySet
in classBasicSecurityPrincipal<T extends com.foreach.across.modules.hibernate.business.SettableIdBasedEntity<?>>
-
getParentPrincipals
public Collection<com.foreach.across.modules.spring.security.infrastructure.business.SecurityPrincipal> getParentPrincipals()- Specified by:
getParentPrincipals
in interfacecom.foreach.across.modules.spring.security.infrastructure.business.SecurityPrincipalHierarchy
-