Class ODFRightHelper.PermissionContext

java.lang.Object
org.ametys.odf.rights.ODFRightHelper.PermissionContext
Enclosing class:
ODFRightHelper

public static class ODFRightHelper.PermissionContext extends Object
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 Details

    • PermissionContext

      public PermissionContext(Content initialContent)
      Constructor
      Parameters:
      initialContent - the initail content
    • PermissionContext

      public PermissionContext(Content initialContent, ProgramPart ancestor)
      Constructor
      Parameters:
      initialContent - the initail content
      ancestor - The ancestor. Can be null.
  • Method Details

    • getInitialContent

      Get the initial content
      Returns:
      the initial content
    • withAncestor

      public void withAncestor(ProgramPart ancestor)
      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.