Interface Orderable<R extends Orderable<R>>
-
- All Superinterfaces:
ActionGrid<R>
,Comparable<R>
,Component<R>
,Copyable<R>
,Grid<R>
,Selectable<R>
,Serializable
- All Known Subinterfaces:
ExportHistoryGridExternal<E>
,GridExternal<E>
,ResidentGridField<F>
- All Known Implementing Classes:
DefaultExportHistoryGridExternal
,DefaultGridExternal
,DefaultResidentGridField
public interface Orderable<R extends Orderable<R>> extends ActionGrid<R>, Selectable<R>, Component<R>
Represents the metadata for a collection component that supports re-ordering it's members.An orderable collection is one whose members support a fixed sort ordering. This sort order is able to be managed by configuring the collection as orderable.
If configured as
orderable()
, it is required that the orderable action and endpoint are configured as well. If not, this collection will fail validation and not properly support the orderable behaviors.- Author:
- Nick Crum (ncrum)
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Orderable.ActionLabels
static class
Orderable.ActionTypes
static class
Orderable.Attributes
static class
Orderable.EndpointTypes
-
Nested classes/interfaces inherited from interface com.broadleafcommerce.metadata.dsl.core.extension.ActionGrid
ActionGrid.ActionKeys, ActionGrid.ActionPlacements
-
Nested classes/interfaces inherited from interface com.broadleafcommerce.metadata.dsl.core.extension.Grid
Grid.Keys
-
Nested classes/interfaces inherited from interface com.broadleafcommerce.metadata.dsl.core.extension.Selectable
Selectable.ConfigureSelectable, Selectable.SelectableTypes
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default R
addOrderableAction(OrderableModalFormAction<?> action)
default R
disableDragIfAllUnsorted()
default R
disableDragIfAllUnsorted(boolean isDisableDragIfAllUnsorted)
Sets whether or not drag-and-drop reordering is disabled if all records are unsorted.default R
enableDragIfAllUnsorted()
default Optional<OrderableModalFormAction<?>>
findOrderableAction()
default Optional<Endpoint<?>>
findOrderableEndpoint()
default OrderableModalFormAction<?>
getOrderableAction()
default Endpoint<?>
getOrderableEndpoint()
default boolean
isOrderable()
Returns whether or not this component is marked as orderable.default R
notOrderable()
default R
orderable()
default R
orderable(boolean isOrderable)
default R
orderable(UnaryOperator<Orderable<?>> fn)
default R
orderableAction(UnaryOperator<OrderableModalFormAction<?>> fn)
default R
orderableEndpoint(Endpoint<?> endpoint)
default R
orderableEndpoint(UnaryOperator<Endpoint<?>> fn)
default R
orderableScope(String scope)
default R
orderableUrl(String url)
default R
orderableUrl(String url, String scope)
-
Methods inherited from interface com.broadleafcommerce.metadata.dsl.core.extension.ActionGrid
addGridAction, addGridAction, addRowAction, addRowAction, findGridAction, findRowAction, getGridAction, getRowAction, gridAction, removeGridAction, removeRowAction, rowAction
-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface com.broadleafcommerce.metadata.dsl.core.Component
addAction, addAction, addComponent, addEndpoint, addEndpoint, apply, attribute, augmentationKey, classifier, clearConditionals, clearEndpoints, conditional, conditionals, description, description, findAction, findAction, findActions, findAttribute, findComponent, findComponent, findComponents, findEndpoint, findEndpoint, findEndpoints, get, get, getAction, getAction, getActions, getActionsList, getAttribute, getAttribute, getAttributes, getAugmentationKey, getClassifier, getComponent, getComponent, getComponents, getComponentsList, getConditionals, getDescription, getEndpoint, getEndpoint, getEndpoints, getEndpointsList, getId, getLabel, getOrder, getScope, getType, hasAction, hasAttribute, hasComponent, hasEndpoint, id, isAugmentable, isTranslatable, label, label, notTranslatable, order, removeAction, removeAttribute, removeComponent, removeEndpoint, scope, self, setActions, setAttributes, setAugmentationKey, setClassifier, setComponents, setConditionals, setDescription, setEndpoints, setId, setLabel, setOrder, setScope, setTranslatable, setType, translatable, translatable, type
-
Methods inherited from interface com.broadleafcommerce.metadata.dsl.core.extension.Grid
addColumn, addColumn, addColumn, addColumns, findColumn, getColumn, idKey, removeColumn
-
Methods inherited from interface com.broadleafcommerce.metadata.dsl.core.extension.Selectable
multiPageSelectable, multiPageSelectableWithExclusions, multipleSelectable, notSelectable, selectable, selectable, selectable, selectableType, singleSelectable
-
-
-
-
Method Detail
-
isOrderable
default boolean isOrderable()
Returns whether or not this component is marked as orderable.- Returns:
- true if orderable, false if not
-
orderable
default R orderable(boolean isOrderable)
-
orderable
default R orderable()
-
notOrderable
default R notOrderable()
-
orderable
default R orderable(UnaryOperator<Orderable<?>> fn)
-
addOrderableAction
default R addOrderableAction(OrderableModalFormAction<?> action)
-
orderableAction
default R orderableAction(UnaryOperator<OrderableModalFormAction<?>> fn)
-
getOrderableAction
default OrderableModalFormAction<?> getOrderableAction()
-
findOrderableAction
default Optional<OrderableModalFormAction<?>> findOrderableAction()
-
orderableEndpoint
default R orderableEndpoint(UnaryOperator<Endpoint<?>> fn)
-
getOrderableEndpoint
default Endpoint<?> getOrderableEndpoint()
-
disableDragIfAllUnsorted
default R disableDragIfAllUnsorted(boolean isDisableDragIfAllUnsorted)
Sets whether or not drag-and-drop reordering is disabled if all records are unsorted. If set to true, this will disable drag-and-drop until at least one record is sorted.- Parameters:
isDisableDragIfAllUnsorted
- whether or not to disable- Returns:
- the orderable
-
disableDragIfAllUnsorted
default R disableDragIfAllUnsorted()
-
enableDragIfAllUnsorted
default R enableDragIfAllUnsorted()
-
-