Package io.meeds.social.portlet.model
Record Class SubspacesEnvelope
java.lang.Object
java.lang.Record
io.meeds.social.portlet.model.SubspacesEnvelope
public record SubspacesEnvelope(boolean parentSpace, boolean canManageSpace, boolean canCreateSubspace, List<SubspaceItem> subspaces, StoredSettings settings)
extends Record
What the widget renders from.
parentSpace false means the widget
hides its whole application: the other fields are then empty and no listing
query ran.
settings is what the preferences hold, not what a client
asked to store: it is how the drawer learns whether its save was applied.
The action phase answers 200 whatever happens — a PortletException
thrown by SubspacesListPortlet.processAction is rethrown by the portal's
UIPortletActionListener and swallowed by
PortalRequestHandler, which logs it and commits the response
untouched — so the transport cannot tell a stored value from a refused
one, and only reading the preferences back can.
-
Constructor Summary
ConstructorsConstructorDescriptionSubspacesEnvelope(boolean parentSpace, boolean canManageSpace, boolean canCreateSubspace, List<SubspaceItem> subspaces, StoredSettings settings) Creates an instance of aSubspacesEnveloperecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecanCreateSubspacerecord component.booleanReturns the value of thecanManageSpacerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static SubspacesEnvelopebooleanReturns the value of theparentSpacerecord component.settings()Returns the value of thesettingsrecord component.Returns the value of thesubspacesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SubspacesEnvelope
public SubspacesEnvelope(boolean parentSpace, boolean canManageSpace, boolean canCreateSubspace, List<SubspaceItem> subspaces, StoredSettings settings) Creates an instance of aSubspacesEnveloperecord class.- Parameters:
parentSpace- the value for theparentSpacerecord componentcanManageSpace- the value for thecanManageSpacerecord componentcanCreateSubspace- the value for thecanCreateSubspacerecord componentsubspaces- the value for thesubspacesrecord componentsettings- the value for thesettingsrecord component
-
-
Method Details
-
notParentSpace
-
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. -
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. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
parentSpace
public boolean parentSpace()Returns the value of theparentSpacerecord component.- Returns:
- the value of the
parentSpacerecord component
-
canManageSpace
public boolean canManageSpace()Returns the value of thecanManageSpacerecord component.- Returns:
- the value of the
canManageSpacerecord component
-
canCreateSubspace
public boolean canCreateSubspace()Returns the value of thecanCreateSubspacerecord component.- Returns:
- the value of the
canCreateSubspacerecord component
-
subspaces
Returns the value of thesubspacesrecord component.- Returns:
- the value of the
subspacesrecord component
-
settings
Returns the value of thesettingsrecord component.- Returns:
- the value of the
settingsrecord component
-