/** * @see org.opencms.ui.apps.I_CmsAppSettings#getSettingsString() */ public String getSettingsString() { JSONObject json = new JSONObject(); try { json.put(SORT_ORDER_KEY, m_sortAscending); json.put(SORT_COLUMN_KEY, m_sortColumnId.getId()); List<String> collapsed = Lists.newArrayList(); for (CmsResourceTableProperty column : m_collapsedColumns) { collapsed.add(column.getId()); } json.put(COLLAPSED_COLUMNS_KEY, new JSONArray(collapsed)); } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } return json.toString(); }
/** * @see org.opencms.ui.apps.I_CmsAppSettings#getSettingsString() */ public String getSettingsString() { JSONObject json = new JSONObject(); try { json.put(BRACKETS, m_closeBrackets); json.put(HIGHLIGHTING, m_highlighting); json.put(WRAPPING, m_lineWrapping); json.put(FONTSIZE, m_fontSize); json.put(TABS, m_tabsVisible); } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } return json.toString(); }
/** * @see org.opencms.widgets.I_CmsADEWidget#getConfiguration(org.opencms.file.CmsObject, org.opencms.xml.types.A_CmsXmlContentValue, org.opencms.i18n.CmsMessages, org.opencms.file.CmsResource, java.util.Locale) */ public String getConfiguration( CmsObject cms, A_CmsXmlContentValue schemaType, CmsMessages messages, CmsResource resource, Locale contentLocale) { CmsGalleryWidgetConfiguration config = new CmsGalleryWidgetConfiguration( cms, messages, schemaType, getConfiguration()); JSONObject linkGalleryInfo = new JSONObject(); try { linkGalleryInfo.put("startupfolder", config.getStartup()); linkGalleryInfo.put("startuptype", config.getType()); linkGalleryInfo.put("editedresource", resource.getRootPath()); } catch (JSONException e) { // TODO: Auto-generated catch block e.printStackTrace(); } return "¶ms=" + linkGalleryInfo.toString(); }