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 Details

    • GroupedPrincipal

      public GroupedPrincipal()
  • Method Details

    • getGroups

      public Set<Group> getGroups()
    • setGroups

      public void setGroups(Collection<Group> groups)
    • isMemberOf

      public boolean isMemberOf(Group group)
    • addGroup

      public void addGroup(Group group)
    • removeGroup

      public void removeGroup(Group group)
    • hasPermission

      public boolean hasPermission(Permission permission)
      Overrides:
      hasPermission in class BasicSecurityPrincipal<T extends com.foreach.across.modules.hibernate.business.SettableIdBasedEntity<?>>
    • buildAuthoritySet

      protected void buildAuthoritySet(Set<org.springframework.security.core.GrantedAuthority> authorities)
      Overrides:
      buildAuthoritySet in class BasicSecurityPrincipal<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 interface com.foreach.across.modules.spring.security.infrastructure.business.SecurityPrincipalHierarchy