@Override public String encodeJSONExtraDataConfig( Map<String, String> parameters, TPersonBean user, Integer entityId, Integer entityType) { StringBuilder sb = new StringBuilder(); JSONUtility.appendStringValue(sb, "tql", parameters.get("tql")); return sb.toString(); }
/** * Gets the localized labels used in field specific configuration (are common for * getSettingsJSON() and getDefaultSettingsJSON()) * * @param locale * @param bundleName * @return */ @Override public String getLocalizationJSON(Locale locale, String bundleName) { StringBuilder stringBuilder = new StringBuilder(); JSONUtility.appendStringValue( stringBuilder, FieldConfigJSON.JSON_FIELDS.TEXTBOX_SETTINGS_DEFAULT_DOUBLE_LABEL, LocalizeUtil.getLocalizedText( "customTextBoxDouble.prompt.defaultDouble", locale, bundleName)); JSONUtility.appendStringValue( stringBuilder, FieldConfigJSON.JSON_FIELDS.TEXTBOX_SETTINGS_MIN_DOUBLE_LABEL, LocalizeUtil.getLocalizedText("customTextBoxDouble.prompt.minValue", locale, bundleName)); JSONUtility.appendStringValue( stringBuilder, FieldConfigJSON.JSON_FIELDS.TEXTBOX_SETTINGS_MAX_DOUBLE_LABEL, LocalizeUtil.getLocalizedText("customTextBoxDouble.prompt.maxValue", locale, bundleName)); return stringBuilder.toString(); }
/** * Gets the localized labels used in field specific configuration (are common for * getSettingsJSON() and getDefaultSettingsJSON()) * * @param locale * @param bundleName * @return */ @Override public String getLocalizationJSON(Locale locale, String bundleName) { StringBuilder stringBuilder = new StringBuilder(); JSONUtility.appendStringValue( stringBuilder, FieldConfigJSON.JSON_FIELDS.OPTION_SETTINGS_LIST_LABEL, getListLabel(locale, bundleName)); return stringBuilder.toString(); }
/** * Creates the file upload JSON string for a template * * @param success * @param existingTemplates * @return */ public static String createFileSelectJSON( boolean success, List<LabelValueBean> existingTemplates, String selectedTemplate) { StringBuilder sb = new StringBuilder(); sb.append("{"); JSONUtility.appendBooleanValue(sb, JSONUtility.JSON_FIELDS.SUCCESS, success); sb.append(JSONUtility.JSON_FIELDS.DATA).append(":{"); JSONUtility.appendStringValue(sb, "docxTemplateList", selectedTemplate); JSONUtility.appendLabelValueBeanList(sb, "existingTemplates", existingTemplates); sb.append("}"); sb.append("}"); return sb.toString(); }