Interface PrivilegeSet

All Superinterfaces:
Collection<Privilege>, Iterable<Privilege>, Set<Privilege>

public interface PrivilegeSet extends Set<Privilege>
Represents a set of individual privileges.

External representations, for example, when serialized as JSON, prefer composite privileges over individual ones. This means that if a privilege set contains all privileges included in a composite privilege, only the name of the composite privilege is serialized. If multiple composite privileges match, all matching ones are serialized.

This set of privileges natively represents only individual privileges. To "collapse" those into composite privileges, use collapseComposites(Privileges).

Composite privileges can however be used as arguments to all contains() functions and to the add()/remove() builder methods.

Do not use a PrivilegeSet when the special meaning of composite privileges needs to be retained, especially during access checks.