public class YogaBuilder extends Object
| Modifier and Type | Field and Description |
|---|---|
protected InputStream |
_aliasProperties |
protected ClassFinderStrategy |
_classFinderStrategy |
protected boolean |
_createAllLinks |
protected boolean |
_finalized |
protected RenderingListenerRegistry |
_registry |
protected SelectorResolver |
_selectorResolver |
| Constructor and Description |
|---|
YogaBuilder() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addAliases() |
protected void |
checkFinalized() |
YogaBuilder |
enableStarAsAllFields() |
YogaBuilder |
enableYogaLinks() |
void |
finalize() |
InputStream |
getAliasProperties() |
ClassFinderStrategy |
getClassFinderStrategy() |
MetaDataRegistry |
getMetaDataRegistry() |
RenderingListenerRegistry |
getRegistry() |
SelectorResolver |
getSelectorResolver() |
protected void |
init()
there are cases where a user might want to override meta data registry,
selector resolver and/or CoreSelector implementations.
|
boolean |
isCreateAllLinks() |
boolean |
isEnableYogaMetadata() |
YogaBuilder |
registerEntityConfigurations(YogaEntityConfiguration<?>... entityConfigurations) |
protected void |
registerMetadataLinkListener() |
protected void |
registerRenderingListeners() |
YogaBuilder |
registerYogaMetaDataClasses(Class<?>... classes) |
void |
setAliasProperties(InputStream aliasProperties)
This is a mechanism of allowing small aliases to be converted into pre-configured set of aliases
for complicated or common selectors.
|
void |
setClassFinderStrategy(ClassFinderStrategy classFinderStrategy)
Hibernate and other ORMs do some funky things to your pojo classes.
|
void |
setCreateYogaLinks(boolean createAllLinks)
Should yoga create metadata links as part of client requests?
|
void |
setEnableStarAsAllFields(boolean starAsAll)
Should field selectors with * be considered as a shortcut for all child fields?
|
void |
setEntityConfigurations(YogaEntityConfiguration<?>... entityConfigurations)
Set hand coded yoga configuration objects.
|
void |
setOutputCountLimit(int countLimit)
Set the maximum number of values that yoga should emit.
|
void |
setRegistry(RenderingListenerRegistry registry)
Allows you to create a RenderingListenerRegistry that contains custom event handlers
for yoga events that relate to different sets of data being added to JSon/XML outputs.
|
void |
setRootMetaDataUrl(String rootMetaDataUrl)
Set the root url to use for metadata requests.
|
void |
setYogaMetaDataRegisteredClasses(Class<?>... classes)
Register the classes that Yoga should know about for the purposes of metadata creation.
|
YogaBuilder |
withAliasProperties(InputStream propertyFile) |
YogaBuilder |
withClassFinderStrategy(ClassFinderStrategy classFinderStrategy) |
YogaBuilder |
withOutputCountLimit(int countLimit) |
YogaBuilder |
withRegistryTraverser(RenderingListenerRegistry registry) |
protected boolean _finalized
protected ClassFinderStrategy _classFinderStrategy
protected RenderingListenerRegistry _registry
protected SelectorResolver _selectorResolver
protected InputStream _aliasProperties
protected boolean _createAllLinks
protected void init()
protected void checkFinalized()
public ClassFinderStrategy getClassFinderStrategy()
public RenderingListenerRegistry getRegistry()
public SelectorResolver getSelectorResolver()
public InputStream getAliasProperties()
public boolean isCreateAllLinks()
public boolean isEnableYogaMetadata()
public MetaDataRegistry getMetaDataRegistry()
public void setClassFinderStrategy(ClassFinderStrategy classFinderStrategy)
classFinderStrategy - - a ClassFinderStrategy that knows how to introspect pojos.ClassFinderStrategypublic void setEntityConfigurations(YogaEntityConfiguration<?>... entityConfigurations)
entityConfigurations - public void setRegistry(RenderingListenerRegistry registry)
registry - a fully formed RenderingListenerRegistry object with custom listenersRenderingListenerRegistrypublic void setAliasProperties(InputStream aliasProperties)
aliasProperties - an Inputstream that contains key/value pairs to be injected into the Proptertiespublic void setOutputCountLimit(int countLimit)
public void setCreateYogaLinks(boolean createAllLinks)
public void setYogaMetaDataRegisteredClasses(Class<?>... classes)
public void setRootMetaDataUrl(String rootMetaDataUrl)
public void setEnableStarAsAllFields(boolean starAsAll)
public YogaBuilder withClassFinderStrategy(ClassFinderStrategy classFinderStrategy)
public YogaBuilder withRegistryTraverser(RenderingListenerRegistry registry)
public YogaBuilder withAliasProperties(InputStream propertyFile)
public YogaBuilder withOutputCountLimit(int countLimit)
public YogaBuilder enableYogaLinks()
public YogaBuilder registerEntityConfigurations(YogaEntityConfiguration<?>... entityConfigurations)
public YogaBuilder registerYogaMetaDataClasses(Class<?>... classes)
public YogaBuilder enableStarAsAllFields()
protected void registerMetadataLinkListener()
protected void registerRenderingListeners()
protected void addAliases()
Copyright © 2014. All Rights Reserved.