Esempio n. 1
0
 @Transactional
 public void updatePostOption(PostOption form) {
   optionsService.updateOptionValue(OptionConstants.MAXSHOW, form.getMaxshow() + "");
   optionsService.updateOptionValue(OptionConstants.ALLOW_COMMENT, form.isAllowComment() + "");
   optionsService.updateOptionValue(
       OptionConstants.DEFAULT_CATEGORY_ID, form.getDefaultCategory());
 }
Esempio n. 2
0
  public PostOption getPostOption() {
    PostOption option = new PostOption();
    option.setMaxshow(
        NumberUtils.toInteger(optionsService.getOptionValue(OptionConstants.MAXSHOW), 10));
    option.setAllowComment(
        Boolean.parseBoolean(optionsService.getOptionValue(OptionConstants.ALLOW_COMMENT)));
    option.setDefaultCategory(optionsService.getOptionValue(OptionConstants.DEFAULT_CATEGORY_ID));

    return option;
  }