Class DraftRestoreContext

java.lang.Object
io.jmix.uirecoveryflowui.facet.DraftRestoreContext

public class DraftRestoreContext extends Object
Context passed to a DraftsFacet restore delegate when a draft is found for the owning view.
  • Field Details

    • draft

      protected final ViewDraft draft
    • view

      protected final View<?> view
    • restorePrevented

      protected boolean restorePrevented
  • Constructor Details

    • DraftRestoreContext

      public DraftRestoreContext(ViewDraft draft, View<?> view)
  • Method Details

    • getDraft

      public ViewDraft getDraft()
      Returns the found draft.
    • getView

      public View<?> getView()
      Returns the view the draft was found for.
    • preventRestore

      public void preventRestore()
      Prevents the facet from applying the draft, so that the view can implement custom restore logic itself.
    • isRestorePrevented

      public boolean isRestorePrevented()
      Returns true if preventRestore() was called.