T
- the provided typepublic interface DefinitionProvider<T>
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() |
List<String> |
getErrorMessages() |
long |
getLastModified()
Returns the timestamp of the last change of the underlying definition change.
|
DefinitionMetadata |
getMetadata() |
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
Copyright © 2003–2016 Magnolia International Ltd.. All rights reserved.