@ Override public void storeJson ( PortletPreferences prefs , String key , Object data ) throws IOException , ReadOnlyException , ValidatorException { final String configData = mapper . writeValueAsString ( data ) ; prefs . setValue ( key , configData ) ; prefs . store ( ) ; }
Stores a Java object as JSON in a portlet preference