Package com.cib.yym.homepage.common

Examples of com.cib.yym.homepage.common.CacheManager


      if (temp instanceof JSONObject)
      {
        accessToken = temp.optString("access_token");
        uid = temp.optString("uid");
       
        CacheManager cache = CacheManagerFactory.getCacheManager();           
              cache.updateCache(CacheManager.MAP_WEIBO_CONFIG, "accessToken", accessToken);
             
        //TODO
        /**
         * 表示Weibo用户认证成功
         * 1. 如果用户在系统中已经有关联的siteuser账号,则将其保存到session中,认为是已登录用户
View Full Code Here


  {
    String serviceUrl = "https://api.weibo.com/2/statuses/user_timeline.json";
   
    String accessToken = null;
    try {
      CacheManager cache = CacheManagerFactory.getCacheManager();
      if(cache.getCachedData(CacheManager.MAP_WEIBO_CONFIG, "accessToken") != null)
      {
        accessToken = (String)cache.getCachedData(CacheManager.MAP_WEIBO_CONFIG, "accessToken");
        log.info("cache hit accessToken="+accessToken);
      }else
            {
              //TODO redirect to weibo login page
        //throw an exception
View Full Code Here

  @Override
  public boolean authenticate(String user, String password) {
    String authUrl = null;
    String apiKey = null;
    try {
      CacheManager cache = CacheManagerFactory.getCacheManager();
      if(cache.getCachedData(CacheManager.MAP_READITLATER_CONFIG, "authUrl") != null)
      {
        authUrl = (String)cache.getCachedData(CacheManager.MAP_READITLATER_CONFIG, "authUrl");
        apiKey = (String)cache.getCachedData(CacheManager.MAP_READITLATER_CONFIG, "apiKey");
        log.info("cache hit authUrl="+authUrl);
      }else
            {
              //read it from config directly
        authUrl = ReadItLaterConfigLoader.getInstance().getValue("authUrl");
View Full Code Here

TOP

Related Classes of com.cib.yym.homepage.common.CacheManager

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.