Record Class DraftWindows
java.lang.Object
java.lang.Record
io.meeds.layout.model.DraftWindows
- Record Components:
livePageKey- the live page, null for a siteliveNodeId- the live page's navigation node, null for a sitedraftPageKey- the user's draft page, null when none exists or for a siteliveSite- the live site, null for a pagedraftSite- the user's draft site, null when none exists or for a pagehomePageReference- the live site's home page a site-container setting hangs on, read once for the site; null for a pagestoredLayout- the stored tree the windows were resolved in, the draft's when one exists, the live layout otherwisewindows- the stored windows, in the order of the idscontexts- 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
ConstructorsConstructorDescriptionDraftWindows(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 aDraftWindowsrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncontexts()Returns the value of thecontextsrecord component.booleanorg.exoplatform.portal.mop.page.PageKeyReturns the value of thedraftPageKeyrecord component.org.exoplatform.portal.config.model.PortalConfigReturns the value of thedraftSiterecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thehomePageReferencerecord component.booleanisPage()Returns the value of theliveNodeIdrecord component.org.exoplatform.portal.mop.page.PageKeyReturns the value of thelivePageKeyrecord component.org.exoplatform.portal.config.model.PortalConfigliveSite()Returns the value of theliveSiterecord component.org.exoplatform.portal.config.model.ModelObjectReturns the value of thestoredLayoutrecord component.final StringtoString()Returns a string representation of this record class.List<org.exoplatform.portal.config.model.Application> windows()Returns the value of thewindowsrecord component.
-
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 aDraftWindowsrecord class.- Parameters:
livePageKey- the value for thelivePageKeyrecord componentliveNodeId- the value for theliveNodeIdrecord componentdraftPageKey- the value for thedraftPageKeyrecord componentliveSite- the value for theliveSiterecord componentdraftSite- the value for thedraftSiterecord componenthomePageReference- the value for thehomePageReferencerecord componentstoredLayout- the value for thestoredLayoutrecord componentwindows- the value for thewindowsrecord componentcontexts- the value for thecontextsrecord 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
-
hashCode
-
equals
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 withObjects::equals(Object,Object). -
livePageKey
public org.exoplatform.portal.mop.page.PageKey livePageKey()Returns the value of thelivePageKeyrecord component.- Returns:
- the value of the
livePageKeyrecord component
-
liveNodeId
Returns the value of theliveNodeIdrecord component.- Returns:
- the value of the
liveNodeIdrecord component
-
draftPageKey
public org.exoplatform.portal.mop.page.PageKey draftPageKey()Returns the value of thedraftPageKeyrecord component.- Returns:
- the value of the
draftPageKeyrecord component
-
liveSite
-
draftSite
-
homePageReference
Returns the value of thehomePageReferencerecord component.- Returns:
- the value of the
homePageReferencerecord component
-
storedLayout
public org.exoplatform.portal.config.model.ModelObject storedLayout()Returns the value of thestoredLayoutrecord component.- Returns:
- the value of the
storedLayoutrecord component
-
windows
-
contexts
-