Package org.osforce.spring4me.social.api.service

Source Code of org.osforce.spring4me.social.api.service.AbstractApiService

/**
*
*/
package org.osforce.spring4me.social.api.service;

import java.util.Map;

import org.scribe.model.OAuthRequest;
import org.scribe.model.Response;
import org.scribe.model.Token;

/**
*
* @author <a href="mailto:haozhonghu@hotmail.com">gavin</a>
* @since 0.1.0
* @create May 16, 2011 - 3:53:36 PM
* <a href="http://www.opensourceforce.org">开源力量</a>
*/
public abstract class AbstractApiService implements ApiService {

  public String updateStatus(Map<String, Object> params) {
    OAuthRequest request = getStatusUpdateRequest(params);
    Token accessToken = (Token) params.get("accessToken");
    getOAuthService().signRequest(accessToken, request);
    Response response = request.send();
    return response.getBody();
  }

  protected abstract OAuthRequest getStatusUpdateRequest(Map<String, Object> params);

}
TOP

Related Classes of org.osforce.spring4me.social.api.service.AbstractApiService

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.