T
- the type of component this factory instantiates.public class ObservedComponentFactory<T> extends Object implements ComponentFactory<T>, javax.jcr.observation.EventListener
Constructor and Description |
---|
ObservedComponentFactory(String repository,
String path,
Class<T> type) |
ObservedComponentFactory(String repository,
String path,
Class<T> type,
ComponentProvider componentProvider) |
Modifier and Type | Method and Description |
---|---|
protected Class<T> |
getComponentType() |
protected Class[] |
getExposedInterfaces() |
protected Node2BeanTransformer |
getNode2BeanTransformer() |
T |
getObservedObject()
Deprecated.
since 4.3 -
info.magnolia.objectfactory.DefaultComponentProvider#newInstance(Class) returns a proxy of the observed object instead of this factory, so this method shouldn't be needed publicly. |
protected void |
instantiateDefault() |
protected boolean |
isConcrete(Class<?> clazz)
Deprecated.
since 4.5, use
Classes.isConcrete(Class) |
protected void |
load() |
T |
newInstance()
Called by the ComponentProvider to create a component.
|
void |
onEvent(javax.jcr.observation.EventIterator events) |
protected void |
onRegister(Content node)
Deprecated.
since 4.5, use
#onRegister(Node) instead |
protected void |
reload() |
protected void |
setObservedObject(T observedObject) |
protected void |
startObservation(String handle) |
String |
toString() |
protected T |
transformNode(javax.jcr.Node node) |
public ObservedComponentFactory(String repository, String path, Class<T> type)
public ObservedComponentFactory(String repository, String path, Class<T> type, ComponentProvider componentProvider)
public T newInstance()
ComponentFactory
newInstance
in interface ComponentFactory<T>
protected Class[] getExposedInterfaces()
protected void startObservation(String handle)
public void onEvent(javax.jcr.observation.EventIterator events)
onEvent
in interface javax.jcr.observation.EventListener
protected void reload()
protected void load()
protected void instantiateDefault()
@Deprecated protected boolean isConcrete(Class<?> clazz)
Classes.isConcrete(Class)
@Deprecated protected void onRegister(Content node)
#onRegister(Node)
insteadprotected T transformNode(javax.jcr.Node node) throws Node2BeanException, javax.jcr.RepositoryException
Node2BeanException
javax.jcr.RepositoryException
protected Node2BeanTransformer getNode2BeanTransformer()
@Deprecated public T getObservedObject()
info.magnolia.objectfactory.DefaultComponentProvider#newInstance(Class)
returns a proxy of the observed object instead of this factory, so this method shouldn't be needed publicly.DefaultClassFactory
, calling this shouldn't be needed,
newInstance()
returned a proxy, so you'll always see this object.protected void setObservedObject(T observedObject)
Copyright © 2003–2017 Magnolia International Ltd.. All rights reserved.