use of org.webpieces.router.api.extensions.ObjectStringConverter in project webpieces by deanhiller.
the class PluginSetup method wireInPluginPoints.
/**
* This is where we wire in all plugin points EXCEPT the Startup one
* we can't inject them :(
*/
@SuppressWarnings("rawtypes")
public void wireInPluginPoints(Injector appInjector) {
Key<Set<EntityLookup>> key = Key.get(new TypeLiteral<Set<EntityLookup>>() {
});
Set<EntityLookup> lookupHooks = appInjector.getInstance(key);
translator.install(lookupHooks);
Key<Set<ObjectStringConverter>> key3 = Key.get(new TypeLiteral<Set<ObjectStringConverter>>() {
});
Set<ObjectStringConverter> converters = appInjector.getInstance(key3);
translation.install(converters);
Key<Set<BodyContentBinder>> key2 = Key.get(new TypeLiteral<Set<BodyContentBinder>>() {
});
Set<BodyContentBinder> bodyBinders = appInjector.getInstance(key2);
bodyContentChecker.install(bodyBinders);
Key<Set<HtmlTagCreator>> key4 = Key.get(new TypeLiteral<Set<HtmlTagCreator>>() {
});
Set<HtmlTagCreator> htmlTagCreators = appInjector.getInstance(key4);
// Guice circular dependency we could not work around quite yet. figure out later maybe
TemplateApi api = templateApi.get();
api.installCustomTags(htmlTagCreators);
}
use of org.webpieces.router.api.extensions.ObjectStringConverter in project webpieces by deanhiller.
the class CookieScopeImpl method put.
@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public void put(String key, Object value) {
// put(key, "") is different than put(key, null) because in FieldTag, IF the field is null(from Flash cookie) then
// the webpage will display the default value. If the value is "", then page will display "" assuming customer deleted the field
hasModifiedData = true;
ObjectStringConverter marshaller = objectTranslator.getConverterFor(value);
String strValue = marshaller.objectToString(value);
cookie.put(key, strValue);
}
Aggregations