public abstract class AbstractIdentifiedInitializableComponent extends AbstractInitializableComponent implements IdentifiedComponent
InitializableComponent and IdentifiedComponent.
Note, this class synchronizes the setId(String) method and, if the component is already initialized this
method is treated as no-op.| Modifier and Type | Field and Description |
|---|---|
private String |
id
The unique identifier for this component.
|
| Constructor and Description |
|---|
AbstractIdentifiedInitializableComponent() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doInitialize()
This method checks to ensure that the component ID is not null.
|
String |
getId()
Get the ID of this component.
|
protected void |
setId(String componentId)
Sets the ID of this component.
|
destroy, doDestroy, initialize, isDestroyed, isInitialized@Nullable @NonnullAfterInit private String id
public AbstractIdentifiedInitializableComponent()
@Nullable @NonnullAfterInit public String getId()
getId in interface IdentifiedComponentprotected void setId(@Nonnull@NotEmpty String componentId)
componentId - ID of the componentprotected void doInitialize()
throws ComponentInitializationException
doInitialize in class AbstractInitializableComponentComponentInitializationException - thrown if there is a problem initializing the componentCopyright © 1999–2015. All rights reserved.