Search in sources :

Example 6 with ExtendField

use of com.publiccms.views.pojo.entities.ExtendField in project PublicCMS-preview by sanluan.

the class SendTask method getExtendFieldList.

@Override
public List<ExtendField> getExtendFieldList(SysSite site, Locale locale) {
    List<ExtendField> extendFieldList = new ArrayList<>();
    extendFieldList.add(new ExtendField(CONFIG_DEFAULTENCODING, INPUTTYPE_TEXT, true, LanguagesUtils.getMessage(CommonConstants.applicationContext, locale, CONFIG_CODE_DESCRIPTION + DOT + CONFIG_DEFAULTENCODING), null, DEFAULT_CHARSET_NAME));
    extendFieldList.add(new ExtendField(CONFIG_HOST, INPUTTYPE_TEXT, true, LanguagesUtils.getMessage(CommonConstants.applicationContext, locale, CONFIG_CODE_DESCRIPTION + DOT + CONFIG_HOST), null, null));
    extendFieldList.add(new ExtendField(CONFIG_PORT, INPUTTYPE_NUMBER, true, LanguagesUtils.getMessage(CommonConstants.applicationContext, locale, CONFIG_CODE_DESCRIPTION + DOT + CONFIG_PORT), null, String.valueOf(25)));
    extendFieldList.add(new ExtendField(CONFIG_USERNAME, INPUTTYPE_TEXT, true, LanguagesUtils.getMessage(CommonConstants.applicationContext, locale, CONFIG_CODE_DESCRIPTION + DOT + CONFIG_USERNAME), null, null));
    extendFieldList.add(new ExtendField(CONFIG_PASSWORD, INPUTTYPE_PASSWORD, true, LanguagesUtils.getMessage(CommonConstants.applicationContext, locale, CONFIG_CODE_DESCRIPTION + DOT + CONFIG_PASSWORD), null, null));
    extendFieldList.add(new ExtendField(CONFIG_TIMEOUT, INPUTTYPE_NUMBER, true, LanguagesUtils.getMessage(CommonConstants.applicationContext, locale, CONFIG_CODE_DESCRIPTION + DOT + CONFIG_TIMEOUT), null, String.valueOf(3000)));
    extendFieldList.add(new ExtendField(CONFIG_AUTH, INPUTTYPE_BOOLEAN, true, LanguagesUtils.getMessage(CommonConstants.applicationContext, locale, CONFIG_CODE_DESCRIPTION + DOT + CONFIG_AUTH), null, null));
    extendFieldList.add(new ExtendField(CONFIG_FROMADDRESS, INPUTTYPE_EMAIL, true, LanguagesUtils.getMessage(CommonConstants.applicationContext, locale, CONFIG_CODE_DESCRIPTION + DOT + CONFIG_FROMADDRESS), null, null));
    return extendFieldList;
}
Also used : ExtendField(com.publiccms.views.pojo.entities.ExtendField) ArrayList(java.util.ArrayList)

Example 7 with ExtendField

use of com.publiccms.views.pojo.entities.ExtendField in project PublicCMS-preview by sanluan.

the class EmailTemplateConfigComponent method getExtendFieldList.

@Override
public List<ExtendField> getExtendFieldList(SysSite site, Locale locale) {
    List<ExtendField> extendFieldList = new ArrayList<>();
    Map<String, String> config = configComponent.getConfigData(site.getId(), EmailComponent.CONFIG_CODE);
    if (CommonUtils.notEmpty(config)) {
        extendFieldList.add(new ExtendField(CONFIG_EMAIL_TITLE, INPUTTYPE_TEXT, false, LanguagesUtils.getMessage(CommonConstants.applicationContext, locale, CONFIG_CODE_DESCRIPTION + DOT + CONFIG_EMAIL_TITLE), null, null));
        extendFieldList.add(new ExtendField(CONFIG_EMAIL_PATH, INPUTTYPE_TEMPLATE, false, LanguagesUtils.getMessage(CommonConstants.applicationContext, locale, CONFIG_CODE_DESCRIPTION + DOT + CONFIG_EMAIL_PATH), null, null));
    }
    return extendFieldList;
}
Also used : ExtendField(com.publiccms.views.pojo.entities.ExtendField) ArrayList(java.util.ArrayList)

Aggregations

ExtendField (com.publiccms.views.pojo.entities.ExtendField)7 ArrayList (java.util.ArrayList)5 CmsModel (com.publiccms.views.pojo.entities.CmsModel)3 CmsCategory (com.publiccms.entities.cms.CmsCategory)2 CmsCategoryModel (com.publiccms.entities.cms.CmsCategoryModel)2 CmsCategoryModelId (com.publiccms.entities.cms.CmsCategoryModelId)2 CmsContent (com.publiccms.entities.cms.CmsContent)2 LogOperate (com.publiccms.entities.log.LogOperate)2 SysExtendField (com.publiccms.entities.sys.SysExtendField)2 SysSite (com.publiccms.entities.sys.SysSite)2 SysUser (com.publiccms.entities.sys.SysUser)2 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)2 TypeReference (com.fasterxml.jackson.core.type.TypeReference)1 SysDept (com.publiccms.entities.sys.SysDept)1 SysDeptCategoryId (com.publiccms.entities.sys.SysDeptCategoryId)1 File (java.io.File)1 FileOutputStream (java.io.FileOutputStream)1 IOException (java.io.IOException)1 ResultSet (java.sql.ResultSet)1 Statement (java.sql.Statement)1