Package com.appspot.piment.dao

Examples of com.appspot.piment.dao.ConfigItemDao


public final class MailUtils {

  public static void sendErrorReport(String errorReport) {

  ConfigItemDao configItemDao = new ConfigItemDao();

  Properties props = new Properties();
  Session session = Session.getDefaultInstance(props, null);
  try {
    Message msg = new MimeMessage(session);
    InternetAddress adminAddress = new InternetAddress(configItemDao.getValue("app.admin.email.address"), configItemDao.getValue("app.admin.email.displayname"));
    msg.setFrom(adminAddress);
    msg.addRecipient(Message.RecipientType.TO, adminAddress);
    msg.setSubject(Constants.APP_NAME + " Exception may occur !!!");
    msg.setText(errorReport);
    Transport.send(msg);
View Full Code Here


  this.setAuthToken(authToken);
  }

  private void init() {
  if (this.configMap == null) {
    ConfigItemDao configItemDao = new ConfigItemDao();
    this.configMap = configItemDao.getValues();
  }
  Weibo.CONSUMER_KEY = configMap.get("sina.oauth.consumer.key");
  Weibo.CONSUMER_SECRET = configMap.get("sina.oauth.consumer.secret");
  System.setProperty("weibo4j.oauth.consumerKey", Weibo.CONSUMER_KEY);
  System.setProperty("weibo4j.oauth.consumerSecret", Weibo.CONSUMER_SECRET);
View Full Code Here

  Map<String, String> configMap = null;

  public Job1009() {
  super();
  ConfigItemDao configItemDao = new ConfigItemDao();
  this.configMap = configItemDao.getValues();
  }
View Full Code Here

  this.authTokenDao = new AuthTokenDao();

  this.userMapDao = new UserMapDao();

  ConfigItemDao configItemDao = new ConfigItemDao();
  this.configMap = configItemDao.getValues();

  // tqqロボットユーザIDを元にAccessTokenを取り出す
  AuthToken tqqRobotAuthToken = authTokenDao.getByUserId(this.configMap.get("qq.piment.robot.id"), WeiboSource.Tqq);

  // sinaロボットユーザIDを元にAccessTokenを取り出す
View Full Code Here

  }

  private void init() {

  if (this.configMap == null) {
    ConfigItemDao configItemDao = new ConfigItemDao();

    this.configMap = configItemDao.getValues();
  }

  this.baseParams = new BaseParams();

  this.baseParams.setAuthConsumerKey(configMap.get("qq.oauth.consumer.key"));
View Full Code Here

TOP

Related Classes of com.appspot.piment.dao.ConfigItemDao

Copyright © 2018 www.massapicom. 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.