Package org.ametys.odf.rights
Class ODFRightHelper.PermissionContext
java.lang.Object
org.ametys.odf.rights.ODFRightHelper.PermissionContext
- Enclosing class:
- ODFRightHelper
Class representing the permission context for parents computation.
The permission context is composed by the initial content and an optional program part ancestor to restrict parents to parents which is part of this ancestor.
-
Constructor Summary
ConstructorDescriptionPermissionContext
(Content initialContent) ConstructorPermissionContext
(Content initialContent, ProgramPart ancestor) Constructor -
Method Summary
Modifier and TypeMethodDescriptionGet the ancestorGet the initial contentvoid
withAncestor
(ProgramPart ancestor) Set an ancestor.
-
Constructor Details
-
PermissionContext
Constructor- Parameters:
initialContent
- the initail content
-
PermissionContext
Constructor- Parameters:
initialContent
- the initail contentancestor
- The ancestor. Can be null.
-
-
Method Details
-
getInitialContent
Get the initial content- Returns:
- the initial content
-
withAncestor
Set an ancestor. Only parents that part of this ancestor will be returned.- Parameters:
ancestor
- the ancestor
-
getAncestor
Get the ancestor- Returns:
- the ancestor. Can be null.
-