Examples of CmsConfig


Examples of com.jeecms.cms.entity.main.CmsConfig

@Repository
public class CmsConfigDaoImpl extends HibernateBaseDao<CmsConfig, Integer>
    implements CmsConfigDao {
  public CmsConfig findById(Integer id) {
    CmsConfig entity = get(id);
    return entity;
  }
View Full Code Here

Examples of com.jeecms.cms.entity.main.CmsConfig

  @RequestMapping(value = "/attachment.jspx", method = RequestMethod.GET)
  public void attachment(Integer cid, Integer i, Long t, String k,
      HttpServletRequest request, HttpServletResponse response,
      ModelMap model) throws IOException {
    CmsConfig config = CmsUtils.getSite(request).getConfig();
    String code = config.getDownloadCode();
    int h = config.getDownloadTime() * 60 * 60 * 1000;
    if (pwdEncoder.isPasswordValid(k, cid + ";" + i + ";" + t, code)) {
      long curr = System.currentTimeMillis();
      if (t + h > curr) {
        Content c = contentMng.findById(cid);
        if (c != null) {
View Full Code Here

Examples of com.jeecms.cms.entity.main.CmsConfig

  public void url(Integer cid, Integer n, HttpServletRequest request,
      HttpServletResponse response, ModelMap model) {
    if (cid == null || n == null) {
      return;
    }
    CmsConfig config = CmsUtils.getSite(request).getConfig();
    String code = config.getDownloadCode();
    long t = System.currentTimeMillis();
    JSONArray arr = new JSONArray();
    String key;
    for (int i = 0; i < n; i++) {
      key = pwdEncoder.encodePassword(cid + ";" + i + ";" + t, code);
View Full Code Here

Examples of com.jeecms.cms.entity.main.CmsConfig

  public String submit(String username, String email, String password,
      CmsUserExt userExt, String captcha, String nextUrl,
      HttpServletRequest request, HttpServletResponse response,
      ModelMap model) throws IOException {
    CmsSite site = CmsUtils.getSite(request);
    CmsConfig config=site.getConfig();
    WebErrors errors = validateSubmit(username, email, password, captcha,
        site, request, response);
    if (errors.hasErrors()) {
      return FrontUtils.showError(request, response, model, errors);
    }
    String ip = RequestUtils.getIpAddr(request);
    if(config.getEmailValidate()){
      EmailSender sender = configMng.getEmailSender();
      MessageTemplate msgTpl = configMng.getRegisterMessageTemplate();
      if (sender == null) {
        // 邮件服务器没有设置好
        model.addAttribute("status", 4);
View Full Code Here

Examples of com.jeecms.cms.entity.main.CmsConfig

    if (StringUtils.isBlank(username)) {
      ResponseUtils.renderJson(response, "false");
      return;
    }
    CmsSite site = CmsUtils.getSite(request);
    CmsConfig config = site.getConfig();
    // 保留字检查不通过,返回false。
    if (!config.getMemberConfig().checkUsernameReserved(username)) {
      ResponseUtils.renderJson(response, "false");
      return;
    }
    // 用户名存在,返回false。
    if (unifiedUserMng.usernameExist(username)) {
View Full Code Here

Examples of com.jeecms.cms.entity.main.CmsConfig

    c.setCommentsWeek((short) (c.getCommentsWeek() + 1));
    c.setCommentsDay((short) (c.getCommentsDay() + 1));
  }

  public int freshCacheToDB(Ehcache cache) {
    CmsConfig config = cmsConfigMng.get();
    clearCount(config);
    int count = dao.freshCacheToDB(cache);
    copyCount(config);
    return count;
  }
View Full Code Here

Examples of com.jeecms.cms.entity.main.CmsConfig

@Service
@Transactional
public class CmsConfigMngImpl implements CmsConfigMng {
  @Transactional(readOnly = true)
  public CmsConfig get() {
    CmsConfig entity = dao.findById(1);
    return entity;
  }
View Full Code Here

Examples of com.jeecms.cms.entity.main.CmsConfig

    dao.findById(1).setCountClearTime(d);
  }

  public CmsConfig update(CmsConfig bean) {
    Updater<CmsConfig> updater = new Updater<CmsConfig>(bean);
    CmsConfig entity = dao.updateByUpdater(updater);
    entity.blankToNull();
    return entity;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.