Interface FetchEntity<C extends FetchEntity<C>>
-
- All Superinterfaces:
Comparable<C>
,Component<C>
,Copyable<C>
,Serializable
- All Known Subinterfaces:
UpdateEntityView<V>
- All Known Implementing Classes:
DefaultUpdateEntityLongFormView
,DefaultUpdateEntityView
public interface FetchEntity<C extends FetchEntity<C>> extends Component<C>
Represents the metadata for a component that supports fetching a single entity.- Author:
- Nick Crum (ncrum)
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
FetchEntity.EndpointTypes
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default C
addReadEndpoint(Endpoint<?> endpoint)
Adds theFetchEntity.EndpointTypes.READ
endpoint for the component.default Optional<Endpoint<?>>
findReadEndpoint()
Finds theFetchEntity.EndpointTypes.READ
endpoint for this component.default Endpoint<?>
getReadEndpoint()
Retrieves theFetchEntity.EndpointTypes.READ
endpoint for this component.default C
readEndpoint(UnaryOperator<Endpoint<?>> fn)
Configures theFetchEntity.EndpointTypes.READ
endpoint for the component.default C
readScope(String scope)
Configures theFetchEntity.EndpointTypes.READ
endpoint with the given scope.default C
readUrl(String url)
Configures theFetchEntity.EndpointTypes.READ
endpoint with the given url.default C
readUrl(String url, String scope)
Configures theFetchEntity.EndpointTypes.READ
endpoint with the given url and scope.-
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
-
-
-
-
Method Detail
-
addReadEndpoint
default C addReadEndpoint(Endpoint<?> endpoint)
Adds theFetchEntity.EndpointTypes.READ
endpoint for the component.- Parameters:
endpoint
- the endpoint- Returns:
- this
-
readEndpoint
default C readEndpoint(UnaryOperator<Endpoint<?>> fn)
Configures theFetchEntity.EndpointTypes.READ
endpoint for the component.- Parameters:
fn
- the function to configure the endpoint- Returns:
- this
-
readUrl
default C readUrl(String url)
Configures theFetchEntity.EndpointTypes.READ
endpoint with the given url.- Parameters:
url
- the url- Returns:
- this
-
readScope
default C readScope(String scope)
Configures theFetchEntity.EndpointTypes.READ
endpoint with the given scope.- Parameters:
scope
- the scope- Returns:
- this
-
readUrl
default C readUrl(String url, String scope)
Configures theFetchEntity.EndpointTypes.READ
endpoint with the given url and scope.- Parameters:
url
- the urlscope
- the scope- Returns:
- this
-
getReadEndpoint
default Endpoint<?> getReadEndpoint()
Retrieves theFetchEntity.EndpointTypes.READ
endpoint for this component.- Returns:
- the endpoint if it exists
- See Also:
for null-safe operation
-
findReadEndpoint
default Optional<Endpoint<?>> findReadEndpoint()
Finds theFetchEntity.EndpointTypes.READ
endpoint for this component.- Returns:
- an optional with the endpoint, or empty
-
-