org.zeroexchange.representation
Class DefaultRepresentationFactory

java.lang.Object
  extended by org.zeroexchange.common.AbstractBeansRegistry<T>
      extended by org.zeroexchange.common.TypedBeansRegistry<P>
          extended by org.zeroexchange.common.processors.AbstractDataProcessorsRegistry<Representation<Object>>
              extended by org.zeroexchange.representation.DefaultRepresentationFactory
All Implemented Interfaces:
org.springframework.beans.factory.config.BeanPostProcessor, org.springframework.beans.factory.InitializingBean, BeansRegistry<Representation<Object>>, RepresentationFactory

public class DefaultRepresentationFactory
extends AbstractDataProcessorsRegistry<Representation<Object>>
implements RepresentationFactory

Entity representation factory. Proxies other registered representation services.

Author:
black

Constructor Summary
DefaultRepresentationFactory()
           
 
Method Summary
protected  Class<?> getBeanClass()
           
 String getRepresentation(Object entity, int limit)
          Returns representation for the specified entity.
protected  boolean isElected(Object bean, String beanName)
          Override this method to determine which bean should be included to the current registry.
 
Methods inherited from class org.zeroexchange.common.processors.AbstractDataProcessorsRegistry
getProcessor, getProcessors
 
Methods inherited from class org.zeroexchange.common.TypedBeansRegistry
afterPropertiesSet
 
Methods inherited from class org.zeroexchange.common.AbstractBeansRegistry
createBeansCollection, getBeans, postProcessAfterInitialization, postProcessBeforeInitialization
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultRepresentationFactory

public DefaultRepresentationFactory()
Method Detail

isElected

protected boolean isElected(Object bean,
                            String beanName)
Override this method to determine which bean should be included to the current registry.

Overrides:
isElected in class AbstractDataProcessorsRegistry<Representation<Object>>

getRepresentation

public String getRepresentation(Object entity,
                                int limit)
                         throws BusinessLogicException
Returns representation for the specified entity.

Specified by:
getRepresentation in interface RepresentationFactory
Throws:
BusinessLogicException

getBeanClass

protected Class<?> getBeanClass()
Specified by:
getBeanClass in class TypedBeansRegistry<Representation<Object>>


Copyright © 2013. All Rights Reserved.