Record Class DraftWindows

java.lang.Object
java.lang.Record
io.meeds.layout.model.DraftWindows
Record Components:
livePageKey - the live page, null for a site
liveNodeId - the live page's navigation node, null for a site
draftPageKey - the user's draft page, null when none exists or for a site
liveSite - the live site, null for a page
draftSite - the user's draft site, null when none exists or for a page
homePageReference - the live site's home page a site-container setting hangs on, read once for the site; null for a page
storedLayout - the stored tree the windows were resolved in, the draft's when one exists, the live layout otherwise
windows - the stored windows, in the order of the ids
contexts - the windows' contexts on that layout, in the same order

public record DraftWindows(org.exoplatform.portal.mop.page.PageKey livePageKey, Long liveNodeId, org.exoplatform.portal.mop.page.PageKey draftPageKey, org.exoplatform.portal.config.model.PortalConfig liveSite, org.exoplatform.portal.config.model.PortalConfig draftSite, String homePageReference, org.exoplatform.portal.config.model.ModelObject storedLayout, List<org.exoplatform.portal.config.model.Application> windows, List<ApplicationSettingsContext> contexts) extends Record
The windows a write addresses on the user's layout, resolved without a write: the layout read (the user's draft when their revision names one, the published layout otherwise), the stored windows the ids name and their contexts. One of the two groups of fields is set, the page's or the site's.
  • Constructor Summary

    Constructors
    Constructor
    Description
    DraftWindows(org.exoplatform.portal.mop.page.PageKey livePageKey, Long liveNodeId, org.exoplatform.portal.mop.page.PageKey draftPageKey, org.exoplatform.portal.config.model.PortalConfig liveSite, org.exoplatform.portal.config.model.PortalConfig draftSite, String homePageReference, org.exoplatform.portal.config.model.ModelObject storedLayout, List<org.exoplatform.portal.config.model.Application> windows, List<ApplicationSettingsContext> contexts)
    Creates an instance of a DraftWindows record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the contexts record component.
    boolean
     
    org.exoplatform.portal.mop.page.PageKey
    Returns the value of the draftPageKey record component.
    org.exoplatform.portal.config.model.PortalConfig
    Returns the value of the draftSite record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the homePageReference record component.
    boolean
     
    Returns the value of the liveNodeId record component.
    org.exoplatform.portal.mop.page.PageKey
    Returns the value of the livePageKey record component.
    org.exoplatform.portal.config.model.PortalConfig
    Returns the value of the liveSite record component.
    org.exoplatform.portal.config.model.ModelObject
    Returns the value of the storedLayout record component.
    final String
    Returns a string representation of this record class.
    List<org.exoplatform.portal.config.model.Application>
    Returns the value of the windows record component.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • DraftWindows

      public DraftWindows(org.exoplatform.portal.mop.page.PageKey livePageKey, Long liveNodeId, org.exoplatform.portal.mop.page.PageKey draftPageKey, org.exoplatform.portal.config.model.PortalConfig liveSite, org.exoplatform.portal.config.model.PortalConfig draftSite, String homePageReference, org.exoplatform.portal.config.model.ModelObject storedLayout, List<org.exoplatform.portal.config.model.Application> windows, List<ApplicationSettingsContext> contexts)
      Creates an instance of a DraftWindows record class.
      Parameters:
      livePageKey - the value for the livePageKey record component
      liveNodeId - the value for the liveNodeId record component
      draftPageKey - the value for the draftPageKey record component
      liveSite - the value for the liveSite record component
      draftSite - the value for the draftSite record component
      homePageReference - the value for the homePageReference record component
      storedLayout - the value for the storedLayout record component
      windows - the value for the windows record component
      contexts - the value for the contexts record component
  • Method Details

    • createDraft

      public boolean createDraft()
      Returns:
      whether the user has no draft yet, so that a write creates one first and addresses the windows on it
    • isPage

      public boolean isPage()
      Returns:
      whether the layout is a page
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • livePageKey

      public org.exoplatform.portal.mop.page.PageKey livePageKey()
      Returns the value of the livePageKey record component.
      Returns:
      the value of the livePageKey record component
    • liveNodeId

      public Long liveNodeId()
      Returns the value of the liveNodeId record component.
      Returns:
      the value of the liveNodeId record component
    • draftPageKey

      public org.exoplatform.portal.mop.page.PageKey draftPageKey()
      Returns the value of the draftPageKey record component.
      Returns:
      the value of the draftPageKey record component
    • liveSite

      public org.exoplatform.portal.config.model.PortalConfig liveSite()
      Returns the value of the liveSite record component.
      Returns:
      the value of the liveSite record component
    • draftSite

      public org.exoplatform.portal.config.model.PortalConfig draftSite()
      Returns the value of the draftSite record component.
      Returns:
      the value of the draftSite record component
    • homePageReference

      public String homePageReference()
      Returns the value of the homePageReference record component.
      Returns:
      the value of the homePageReference record component
    • storedLayout

      public org.exoplatform.portal.config.model.ModelObject storedLayout()
      Returns the value of the storedLayout record component.
      Returns:
      the value of the storedLayout record component
    • windows

      public List<org.exoplatform.portal.config.model.Application> windows()
      Returns the value of the windows record component.
      Returns:
      the value of the windows record component
    • contexts

      public List<ApplicationSettingsContext> contexts()
      Returns the value of the contexts record component.
      Returns:
      the value of the contexts record component