Package org.cyclos.impl.utils.formatting
Class DataTranslationProxy
- java.lang.Object
-
- org.cyclos.impl.utils.formatting.DataTranslationProxy
-
public class DataTranslationProxy extends Object
Proxies entities to use data translation instead of raw string values
-
-
Constructor Summary
Constructors Constructor Description DataTranslationProxy()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends ProcessableForDataTranslation>
Tproxy(T input, DataTranslationHandler dataTranslationHandler)Returns a proxy capable of translating the given input.static <T extends ProcessableForDataTranslation>
Tproxy(T input, DataTranslationHandler dataTranslationHandler, Language language)Returns a proxy capable of translating the given input.
-
-
-
Method Detail
-
proxy
public static final <T extends ProcessableForDataTranslation> T proxy(T input, DataTranslationHandler dataTranslationHandler)
Returns a proxy capable of translating the given input. A proxy (subclass) is returned, which handles getters for translatable properties by delegating them toDataTranslationHandler. Also, all fields which are also entities are proxied as well. The current language is used.
-
proxy
public static final <T extends ProcessableForDataTranslation> T proxy(T input, DataTranslationHandler dataTranslationHandler, Language language)
Returns a proxy capable of translating the given input. A proxy (subclass) is returned, which handles getters for translatable properties by delegating them toDataTranslationHandler. Also, all fields which are also entities are proxied as well. A custom language is used.
-
-