Examples of ConfigEntity


Examples of com.ronald.gantengtimesheet.db.ConfigEntity

import com.ronald.gantengtimesheet.db.ConfigEntityCollection;

public class Config {
  private Config() {}
  public static Integer getDefaultReportDuration() {
    ConfigEntity ce = ConfigEntityCollection.getInstance().getConfigEntity(ConfigEntityCollection.Config.DEFAULT_REPORT_DURATION.name);
    assert ce.getDataType().equals(Integer.class.getName());
    return Integer.valueOf(ce.getValue());
  }
View Full Code Here

Examples of com.ronald.gantengtimesheet.db.ConfigEntity

    ConfigEntity ce = ConfigEntityCollection.getInstance().getConfigEntity(ConfigEntityCollection.Config.DEFAULT_REPORT_DURATION.name);
    assert ce.getDataType().equals(Integer.class.getName());
    return Integer.valueOf(ce.getValue());
  }
  public static String getFrom() {
    ConfigEntity ce = ConfigEntityCollection.getInstance().getConfigEntity(ConfigEntityCollection.Config.FROM.name);
    return ce.getValue();
  }
View Full Code Here

Examples of com.ronald.gantengtimesheet.db.ConfigEntity

  public static String getFrom() {
    ConfigEntity ce = ConfigEntityCollection.getInstance().getConfigEntity(ConfigEntityCollection.Config.FROM.name);
    return ce.getValue();
  }
  public static String getTo() {
    ConfigEntity ce = ConfigEntityCollection.getInstance().getConfigEntity(ConfigEntityCollection.Config.TO.name);
    return ce.getValue();
  }
View Full Code Here

Examples of com.ronald.gantengtimesheet.db.ConfigEntity

  public static String getTo() {
    ConfigEntity ce = ConfigEntityCollection.getInstance().getConfigEntity(ConfigEntityCollection.Config.TO.name);
    return ce.getValue();
  }
  public static Double getDefaultRate() {
    ConfigEntity ce = ConfigEntityCollection.getInstance().getConfigEntity(ConfigEntityCollection.Config.DEFAULT_RATE.name);
    assert ce.getDataType().equals(Double.class.getName());
    return Double.valueOf(ce.getValue());
  }
View Full Code Here

Examples of com.ronald.gantengtimesheet.db.ConfigEntity

    ConfigEntity ce = ConfigEntityCollection.getInstance().getConfigEntity(ConfigEntityCollection.Config.DEFAULT_RATE.name);
    assert ce.getDataType().equals(Double.class.getName());
    return Double.valueOf(ce.getValue());
  }
  public static String getLastDirectory() {
    ConfigEntity ce = ConfigEntityCollection.getInstance().getConfigEntity(ConfigEntityCollection.Config.LAST_DIRECTORY.name);
    return ce.getValue();
  }
View Full Code Here

Examples of com.ronald.gantengtimesheet.db.ConfigEntity

  public static String getLastDirectory() {
    ConfigEntity ce = ConfigEntityCollection.getInstance().getConfigEntity(ConfigEntityCollection.Config.LAST_DIRECTORY.name);
    return ce.getValue();
  }
  public static String getNotes() {
    ConfigEntity ce = ConfigEntityCollection.getInstance().getConfigEntity(ConfigEntityCollection.Config.NOTES.name);
    return ce.getValue();
  }
View Full Code Here

Examples of com.ronald.gantengtimesheet.db.ConfigEntity

                    JOptionPane.YES_NO_OPTION) == JOptionPane.NO_OPTION) {
              return;
            }
          }
          exportPDF(file, chkSkipEmptyRecords.isSelected());
          final ConfigEntity ce = ConfigEntityCollection.getInstance().getConfigEntity(
                  ConfigEntityCollection.Config.LAST_DIRECTORY.name);
          ce.setValue(file.getParent());
          ce.save();
        }
      }
    });
     
      final Calendar cal = Calendar.getInstance();
View Full Code Here

Examples of org.vosao.entity.ConfigEntity

 
  @Override
  public CommentEntity addComment(String name, String content,
      PageEntity page) {

    ConfigEntity config = VosaoContext.getInstance().getConfig();
    CommentEntity comment = new CommentEntity(name, content,
        new Date(), page.getFriendlyURL());
    getDao().getCommentDao().save(comment);
    getBusiness().getSystemService().getPageCache().remove(
        page.getFriendlyURL());
    List<String> toAddresses = StrUtil.fromCSV(config.getCommentsEmail());
    if (toAddresses.size() == 0) {
      toAddresses.add(config.getSiteEmail());
    }
    for (String email : toAddresses) {
      EmailUtil.sendEmail(createCommentLetter(comment, page),
        COMMENT_LETTER_SUBJECT,
        config.getSiteEmail(),
        config.getSiteDomain() + " admin",
        StringUtils.strip(email));
      logger.debug("New comment letter was sent to " + email);
    }
    return comment;
  }
View Full Code Here

Examples of org.vosao.entity.ConfigEntity

    }
    return comment;
  }
 
  private String createCommentLetter(CommentEntity comment, PageEntity page) {
    ConfigEntity config = VosaoContext.getInstance().getConfig();
    StringBuffer b = new StringBuffer();
    b.append("<p>New comment was added to page ")
        .append(config.getSiteDomain()).append(page.getFriendlyURL())
        .append(" by ").append(comment.getName()).append("</p>")
        .append(comment.getContent());
    return b.toString();
  }
View Full Code Here

Examples of org.vosao.entity.ConfigEntity

    // set default value to all children
    if (attr.isInherited()
        && StringUtils.isNotEmpty(attr.getDefaultValue())) {
     
      PageEntity page = getDao().getPageDao().getByUrl(attr.getPageUrl());
      ConfigEntity config = VosaoContext.getInstance().getConfig();

      getBusiness().getPageAttributeBusiness().setAttribute(page,
          attr.getName(), config.getDefaultLanguage(),
          attr.getDefaultValue(), true);
    }
    return ServiceResponse.createSuccessResponse(Messages.get("success"));
  }
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.