T
- type of provided elementspublic abstract class AbstractDefinitionProviderWrapper<T> extends Object implements DefinitionProvider<T>
DefinitionProvider
wrappers. Allows for any implementation of
delegation via abstract getDelegate()
method.DefinitionProvider.Problem
Constructor and Description |
---|
AbstractDefinitionProviderWrapper() |
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() |
protected abstract DefinitionProvider<T> |
getDelegate() |
List<String> |
getErrorMessages() |
long |
getLastModified()
Returns the timestamp of the last change of the underlying definition change.
|
DefinitionMetadata |
getMetadata() |
Collection<DefinitionProvider.Problem> |
getProblems() |
DefinitionRawView |
getRaw()
Returns a
DefinitionRawView representation the underlying bean; it might be
invalid, partially resolved and/or disabled. |
boolean |
isValid() |
public List<DefinitionDecorator<T>> getDecorators()
getDecorators
in interface DefinitionProvider<T>
public DefinitionMetadata getMetadata()
getMetadata
in interface DefinitionProvider<T>
public T get() throws Registry.InvalidDefinitionException
DefinitionProvider
get
in interface DefinitionProvider<T>
Registry.InvalidDefinitionException
- (which is a RuntimeException) if the underlying bean is not successfully resolved, not valid, or not enabled.public DefinitionRawView getRaw()
DefinitionProvider
DefinitionRawView
representation the underlying bean; it might be
invalid, partially resolved and/or disabled.getRaw
in interface DefinitionProvider<T>
public boolean isValid()
isValid
in interface DefinitionProvider<T>
public List<String> getErrorMessages()
getErrorMessages
in interface DefinitionProvider<T>
public long getLastModified()
DefinitionProvider
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.getLastModified
in interface DefinitionProvider<T>
CachingDefinitionDecorator
public Collection<DefinitionProvider.Problem> getProblems()
getProblems
in interface DefinitionProvider<T>
protected abstract DefinitionProvider<T> getDelegate()
Copyright © 2003–2016 Magnolia International Ltd.. All rights reserved.