Class ParentDocumentContextHolder

java.lang.Object
io.jmix.webdavflowui.view.webdavdocument.ParentDocumentContextHolder

public class ParentDocumentContextHolder extends Object
Holds current parent document object for documents and collections that are displayed on the screen and performs ParentDocumentContextHolder.OnParentChangeAction when holding value is changed.
  • Constructor Details

    • ParentDocumentContextHolder

      public ParentDocumentContextHolder()
  • Method Details

    • getParentDocument

      public WebdavDocument getParentDocument()
      Returns parent document for current context.
      Returns:
      parent document for current context
    • setParentDocument

      public void setParentDocument(WebdavDocument parentDocument)
      Changes current context to new parent document.
      Parameters:
      parentDocument - - document to be set
    • goToRoot

      public void goToRoot()
      Moves context to the root of the document hierarchy.
    • goToUpperLevel

      public void goToUpperLevel()
      Moves context to the one level up.
    • isRoot

      public boolean isRoot()
      Returns true if current context is on top level
    • setChangeAction

      public void setChangeAction(ParentDocumentContextHolder.OnParentChangeAction changeAction)
      Sets the handler for changing current context.
      Parameters:
      changeAction - - action that will be performed when context is changed
    • refresh

      public void refresh()
      Calls action handler in order to refresh dependent objects' states.