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 booleanintbooleanA 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.inthashCode()booleanWhether or not this component deals with translatable data.voidsetActions(Map<String, Action<?>> actions) voidsetAttributes(Map<String, Object> attributes) voidsetAugmentationKey(String augmentationKey) voidsetClassifier(String classifier) voidsetComponents(Map<String, Component<?>> components) voidsetConditionals(List<Conditional<?>> conditionals) voidsetDescription(InternationalizedMessage description) voidsetEndpoints(Map<String, Endpoint<?>> endpoints) voidvoidsetLabel(InternationalizedMessage label) voidvoidvoidsetTranslatable(boolean translatable) voidtoString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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, 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:
compareToin interfaceComparable<C extends AbstractComponent<C>>
-
toString
-
getClassifier
Description copied from interface:ComponentAn 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.FIELDis 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:
getClassifierin interfaceComponent<C extends AbstractComponent<C>>- Returns:
- the classifier of the component
- See Also:
-
getType
Description copied from interface:ComponentAn 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.STRINGfor aClassifiers.FIELDwill result in a text input for managing a property.- Specified by:
getTypein interfaceComponent<C extends AbstractComponent<C>>- Returns:
- the type of the component
-
getId
Description copied from interface:ComponentA unique identifier for the component among its siblings. Not necessarily globally unique.- Specified by:
getIdin interfaceComponent<C extends AbstractComponent<C>>- Returns:
- the ID of the component
-
getAugmentationKey
Description copied from interface:ComponentA unique identifier for the component within its full component tree. Used for targeting augmentations.- Specified by:
getAugmentationKeyin interfaceComponent<C extends AbstractComponent<C>>- Returns:
- the augmentation key
-
getLabel
Description copied from interface:ComponentA label used for display purposes.- Specified by:
getLabelin interfaceComponent<C extends AbstractComponent<C>>- Returns:
- the label
-
getDescription
Description copied from interface:ComponentA description used for display purposes.- Specified by:
getDescriptionin interfaceComponent<C extends AbstractComponent<C>>- Returns:
- the description
-
getOrder
Description copied from interface:ComponentThe absolute ordering of this component among its siblings. If null, will be sorted last.- Specified by:
getOrderin interfaceComponent<C extends AbstractComponent<C>>- Returns:
- the order
-
getScope
Description copied from interface:ComponentThe 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:
getScopein interfaceComponent<C extends AbstractComponent<C>>- Returns:
- the scope
-
isTranslatable
public boolean isTranslatable()Description copied from interface:ComponentWhether or not this component deals with translatable data. The meaning of this field varies between classes of components and types of components.- Specified by:
isTranslatablein interfaceComponent<C extends AbstractComponent<C>>- Returns:
- whether or not translatable
-
getConditionals
Description copied from interface:ComponentA 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:
getConditionalsin interfaceComponent<C extends AbstractComponent<C>>- Returns:
- the set of conditionals
-
getAttributes
Description copied from interface:ComponentA key-value map used to provide additional metadata beyond the first-class properties.- Specified by:
getAttributesin interfaceComponent<C extends AbstractComponent<C>>- Returns:
- the attributes map
-
getComponents
Description copied from interface:ComponentA key-value map of components used for managing the children components of this component.- Specified by:
getComponentsin interfaceComponent<C extends AbstractComponent<C>>- Returns:
- the map of children
-
getActions
Description copied from interface:ComponentA key-value map of actions used for managing the actions of this component.- Specified by:
getActionsin interfaceComponent<C extends AbstractComponent<C>>- Returns:
- the map of actions
-
getEndpoints
Description copied from interface:ComponentA 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:
getEndpointsin interfaceComponent<C extends AbstractComponent<C>>- Returns:
- the map of endpoints
-
setClassifier
- Specified by:
setClassifierin interfaceComponent<C extends AbstractComponent<C>>
-
setType
- Specified by:
setTypein interfaceComponent<C extends AbstractComponent<C>>
-
setId
- Specified by:
setIdin interfaceComponent<C extends AbstractComponent<C>>
-
setAugmentationKey
- Specified by:
setAugmentationKeyin interfaceComponent<C extends AbstractComponent<C>>
-
setLabel
- Specified by:
setLabelin interfaceComponent<C extends AbstractComponent<C>>
-
setDescription
- Specified by:
setDescriptionin interfaceComponent<C extends AbstractComponent<C>>
-
setOrder
- Specified by:
setOrderin interfaceComponent<C extends AbstractComponent<C>>
-
setScope
- Specified by:
setScopein interfaceComponent<C extends AbstractComponent<C>>
-
setTranslatable
public void setTranslatable(boolean translatable) - Specified by:
setTranslatablein interfaceComponent<C extends AbstractComponent<C>>
-
setConditionals
- Specified by:
setConditionalsin interfaceComponent<C extends AbstractComponent<C>>
-
setAttributes
- Specified by:
setAttributesin interfaceComponent<C extends AbstractComponent<C>>
-
setComponents
- Specified by:
setComponentsin interfaceComponent<C extends AbstractComponent<C>>
-
setActions
- Specified by:
setActionsin interfaceComponent<C extends AbstractComponent<C>>
-
setEndpoints
- Specified by:
setEndpointsin interfaceComponent<C extends AbstractComponent<C>>
-
equals
-
canEqual
-
hashCode
public int hashCode()
-