Class AbstractComponent<C extends AbstractComponent<C>>
java.lang.Object
com.broadleafcommerce.metadata.dsl.core.AbstractComponent<C>
- All Implemented Interfaces:
Component<C>
,Copyable<C>
,Serializable
,Comparable<C>
- Direct Known Subclasses:
AbstractColumn
,AbstractFormComponent
,AbstractView
public abstract class AbstractComponent<C extends AbstractComponent<C>>
extends Object
implements Component<C>
The abstract implementation of
Component
.- Author:
- Nick Crum (ncrum)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractComponent
(Component<?> component) AbstractComponent
(String classifier) AbstractComponent
(String classifier, String type) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
int
boolean
A key-value map of actions used for managing the actions of this component.A key-value map used to provide additional metadata beyond the first-class properties.A unique identifier for the component within its full component tree.An indicator of the class of components this component belongs to.A key-value map of components used for managing the children components of this component.List<Conditional<?>>
A set of conditions used to indicate when this component should be rendered.A description used for display purposes.A key-value map of endpoints used for managing the endpoints of this component.getId()
A unique identifier for the component among its siblings.getLabel()
A label used for display purposes.getOrder()
The absolute ordering of this component among its siblings.getScope()
The resource scope necessary for this component.getType()
An indicator of the type of this component.int
hashCode()
boolean
Whether or not this component deals with translatable data.void
setActions
(Map<String, Action<?>> actions) void
setAttributes
(Map<String, Object> attributes) void
setAugmentationKey
(String augmentationKey) void
setClassifier
(String classifier) void
setComponents
(Map<String, Component<?>> components) void
setConditionals
(List<Conditional<?>> conditionals) void
setDescription
(InternationalizedMessage description) void
setEndpoints
(Map<String, Endpoint<?>> endpoints) void
void
setLabel
(InternationalizedMessage label) void
void
void
setTranslatable
(boolean translatable) void
toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
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, findAttribute, findComponent, findComponent, findComponents, findEndpoint, findEndpoint, findEndpoint, findEndpoints, get, get, getAction, getAction, getActionsList, getAttribute, getAttribute, getComponent, getComponent, getComponentsList, getEndpoint, getEndpoint, getEndpointsList, hasAction, hasAttribute, hasComponent, hasEndpoint, id, isAugmentable, label, label, notTranslatable, order, removeAction, removeAttribute, removeComponent, removeEndpoint, scope, self, translatable, translatable, type
-
Constructor Details
-
AbstractComponent
-
AbstractComponent
-
AbstractComponent
-
-
Method Details
-
compareTo
- Specified by:
compareTo
in interfaceComparable<C extends AbstractComponent<C>>
-
toString
-
getClassifier
Description copied from interface:Component
An indicator of the class of components this component belongs to. This is used to distinguish components that behave in similar ways within a context. For instance,Classifiers.FIELD
is used to distinguish fields from other form components, and fields have unique interactions available to them, such as interacting with the form state.- Specified by:
getClassifier
in interfaceComponent<C extends AbstractComponent<C>>
- Returns:
- the classifier of the component
- See Also:
-
getType
Description copied from interface:Component
An indicator of the type of this component. This is used to target a specific component within a class of components. For instance, a type ofFieldTypes.STRING
for aClassifiers.FIELD
will result in a text input for managing a property.- Specified by:
getType
in interfaceComponent<C extends AbstractComponent<C>>
- Returns:
- the type of the component
-
getId
Description copied from interface:Component
A unique identifier for the component among its siblings. Not necessarily globally unique.- Specified by:
getId
in interfaceComponent<C extends AbstractComponent<C>>
- Returns:
- the ID of the component
-
getAugmentationKey
Description copied from interface:Component
A unique identifier for the component within its full component tree. Used for targeting augmentations.- Specified by:
getAugmentationKey
in interfaceComponent<C extends AbstractComponent<C>>
- Returns:
- the augmentation key
-
getLabel
Description copied from interface:Component
A label used for display purposes.- Specified by:
getLabel
in interfaceComponent<C extends AbstractComponent<C>>
- Returns:
- the label
-
getDescription
Description copied from interface:Component
A description used for display purposes.- Specified by:
getDescription
in interfaceComponent<C extends AbstractComponent<C>>
- Returns:
- the description
-
getOrder
Description copied from interface:Component
The absolute ordering of this component among its siblings. If null, will be sorted last.- Specified by:
getOrder
in interfaceComponent<C extends AbstractComponent<C>>
- Returns:
- the order
-
getScope
Description copied from interface:Component
The resource scope necessary for this component. This is used by many components in order to gate access based on the resource scopes a user has access to.- Specified by:
getScope
in interfaceComponent<C extends AbstractComponent<C>>
- Returns:
- the scope
-
isTranslatable
public boolean isTranslatable()Description copied from interface:Component
Whether or not this component deals with translatable data. The meaning of this field varies between classes of components and types of components.- Specified by:
isTranslatable
in interfaceComponent<C extends AbstractComponent<C>>
- Returns:
- whether or not translatable
-
getConditionals
Description copied from interface:Component
A set of conditions used to indicate when this component should be rendered. This is most commonly used by form components to hide/show fields and grids depending on the form state.- Specified by:
getConditionals
in interfaceComponent<C extends AbstractComponent<C>>
- Returns:
- the set of conditionals
-
getAttributes
Description copied from interface:Component
A key-value map used to provide additional metadata beyond the first-class properties.- Specified by:
getAttributes
in interfaceComponent<C extends AbstractComponent<C>>
- Returns:
- the attributes map
-
getComponents
Description copied from interface:Component
A key-value map of components used for managing the children components of this component.- Specified by:
getComponents
in interfaceComponent<C extends AbstractComponent<C>>
- Returns:
- the map of children
-
getActions
Description copied from interface:Component
A key-value map of actions used for managing the actions of this component.- Specified by:
getActions
in interfaceComponent<C extends AbstractComponent<C>>
- Returns:
- the map of actions
-
getEndpoints
Description copied from interface:Component
A key-value map of endpoints used for managing the endpoints of this component. The type of the endpoint is used as the key in the map.- Specified by:
getEndpoints
in interfaceComponent<C extends AbstractComponent<C>>
- Returns:
- the map of endpoints
-
setClassifier
- Specified by:
setClassifier
in interfaceComponent<C extends AbstractComponent<C>>
-
setType
- Specified by:
setType
in interfaceComponent<C extends AbstractComponent<C>>
-
setId
- Specified by:
setId
in interfaceComponent<C extends AbstractComponent<C>>
-
setAugmentationKey
- Specified by:
setAugmentationKey
in interfaceComponent<C extends AbstractComponent<C>>
-
setLabel
- Specified by:
setLabel
in interfaceComponent<C extends AbstractComponent<C>>
-
setDescription
- Specified by:
setDescription
in interfaceComponent<C extends AbstractComponent<C>>
-
setOrder
- Specified by:
setOrder
in interfaceComponent<C extends AbstractComponent<C>>
-
setScope
- Specified by:
setScope
in interfaceComponent<C extends AbstractComponent<C>>
-
setTranslatable
public void setTranslatable(boolean translatable) - Specified by:
setTranslatable
in interfaceComponent<C extends AbstractComponent<C>>
-
setConditionals
- Specified by:
setConditionals
in interfaceComponent<C extends AbstractComponent<C>>
-
setAttributes
- Specified by:
setAttributes
in interfaceComponent<C extends AbstractComponent<C>>
-
setComponents
- Specified by:
setComponents
in interfaceComponent<C extends AbstractComponent<C>>
-
setActions
- Specified by:
setActions
in interfaceComponent<C extends AbstractComponent<C>>
-
setEndpoints
- Specified by:
setEndpoints
in interfaceComponent<C extends AbstractComponent<C>>
-
equals
-
canEqual
-
hashCode
public int hashCode()
-