Package org.cyclos.impl.users
Class BasicUserVOConverter
- java.lang.Object
-
- org.cyclos.impl.utils.conversion.AbstractBeanConverter<T>
-
- org.cyclos.impl.utils.conversion.ObjectConverter<VO>
-
- org.cyclos.impl.utils.conversion.EntityVOConverter<BasicUserVO>
-
- org.cyclos.impl.users.BasicUserVOConverter
-
- All Implemented Interfaces:
BeanConverter<BasicUserVO>
@Component public class BasicUserVOConverter extends EntityVOConverter<BasicUserVO>
Converter forBasicUserVO. Several checks are performed. For example:- When the user is not visible by the logged user, if the user is admin, returns a generic VO which represents the administration (no id). If an user, returns only the name and username.
- When the user is not managed by the logged user, no hidden fields are returned (custom fields, e-mails, phones and addresses).
- When managed, just return anything.
-
-
Field Summary
-
Fields inherited from class org.cyclos.impl.utils.conversion.AbstractBeanConverter
beanHandler, configurationHandler, conversionHandler, entityManagerHandler, profileFieldHandler
-
-
Constructor Summary
Constructors Constructor Description BasicUserVOConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidfill(Object source, BasicUserVO vo, Object[] excludingProperties, InvocationContext.ConversionContext context)Copy properties from the source to the destination objectprotected BasicUserVOinstantiate(Class<BasicUserVO> beanType, Object source, InvocationContext.ConversionContext context)Instantiate the result object from the given source object.-
Methods inherited from class org.cyclos.impl.utils.conversion.ObjectConverter
convert, getSessionData, registerMapping, resolveDestinationType
-
Methods inherited from class org.cyclos.impl.utils.conversion.AbstractBeanConverter
canBeUsedAsSourceForFilling, getApplicationContext, getBeanType, getFormatter
-
-
-
-
Method Detail
-
fill
protected void fill(Object source, BasicUserVO vo, Object[] excludingProperties, InvocationContext.ConversionContext context)
Description copied from class:ObjectConverterCopy properties from the source to the destination object- Overrides:
fillin classEntityVOConverter<BasicUserVO>
-
instantiate
protected BasicUserVO instantiate(Class<BasicUserVO> beanType, Object source, InvocationContext.ConversionContext context)
Description copied from class:ObjectConverterInstantiate the result object from the given source object. By default, just invoke the default constructor on the bean type- Overrides:
instantiatein classEntityVOConverter<BasicUserVO>
-
-