T
- the provided typepublic interface DefinitionProvider<T>
Modifier and Type | Interface and Description |
---|---|
static interface |
DefinitionProvider.Problem
Allows to record and memoize the details about an issue which might have occurred during the population of a
definition provider . |
Modifier and Type | Method and Description |
---|---|
T |
get()
Returns the underlying bean if and only if it is successfully resolved, is valid, and is enabled.
|
List<DefinitionDecorator<T>> |
getDecorators() |
default List<String> |
getErrorMessages()
Deprecated.
since 5.5 - use
getProblems() instead. |
long |
getLastModified()
Returns the timestamp of the last change of the underlying definition change.
|
DefinitionMetadata |
getMetadata() |
default Collection<DefinitionProvider.Problem> |
getProblems() |
DefinitionRawView |
getRaw()
Returns a
DefinitionRawView representation the underlying bean; it might be
invalid, partially resolved and/or disabled. |
boolean |
isValid() |
List<DefinitionDecorator<T>> getDecorators()
DefinitionMetadata getMetadata()
T get() throws Registry.InvalidDefinitionException
Registry.InvalidDefinitionException
- (which is a RuntimeException) if the underlying bean is not successfully resolved, not valid, or not enabled.DefinitionRawView getRaw()
DefinitionRawView
representation the underlying bean; it might be
invalid, partially resolved and/or disabled.boolean isValid()
long getLastModified()
DefinitionProvider
merely wraps a definition instance -
such timestamp would never change and be always equal to the provider's creation date. However, if a provider generates the definition on the fly from some
resource - the last modified date might change and that might be a clear signal for an update of the structures that decorate/cache definitions.CachingDefinitionDecorator
@Deprecated default List<String> getErrorMessages()
getProblems()
instead.default Collection<DefinitionProvider.Problem> getProblems()
Copyright © 2003–2017 Magnolia International Ltd.. All rights reserved.