Package org.eurekastreams.server.action.request.opensocial

Examples of org.eurekastreams.server.action.request.opensocial.SetConsumerTokenInfoRequest


    {
        context.checking(new Expectations()
        {
            {
                oneOf(actionContext).getParams();
                will(returnValue(new SetConsumerTokenInfoRequest(securityToken, consumerInfo, "serviceName",
                        "tokenName", tokenInfo)));

                oneOf(securityToken).getAppUrl();
                will(returnValue("http://localhost:4040/some/path"));
View Full Code Here


    {
        context.checking(new Expectations()
        {
            {
                oneOf(actionContext).getParams();
                will(returnValue(new SetConsumerTokenInfoRequest(securityToken, consumerInfo, "serviceName",
                        "tokenName", tokenInfo)));

                oneOf(securityToken).getAppUrl();
                will(returnValue("http://localhost:4040/some/path"));
View Full Code Here

     * {@inheritDoc}. Set the OAuth Token info.
     */
    @Override
    public Serializable execute(final PrincipalActionContext inActionContext) throws ExecutionException
    {
        SetConsumerTokenInfoRequest request = (SetConsumerTokenInfoRequest) inActionContext.getParams();

        SecurityToken securityToken = request.getSecurityToken();
        TokenInfo tokenInfo = request.getTokenInfo();

        OAuthConsumer consumer = consumerMapper.execute(new OAuthConsumerRequest(request.getServiceName(),
                securityToken.getAppUrl()));
        if (consumer != null)
        {
            OAuthToken token = new OAuthToken(consumer, securityToken.getViewerId(), securityToken.getOwnerId(),
                    tokenInfo.getAccessToken(), tokenInfo.getTokenSecret());
View Full Code Here

    public void setTokenInfo(final SecurityToken securityToken, final ConsumerInfo consumerInfo,
            final String serviceName, final String tokenName, final TokenInfo tokenInfo) throws GadgetException
    {
        try
        {
            SetConsumerTokenInfoRequest request = new SetConsumerTokenInfoRequest(securityToken, consumerInfo,
                    serviceName, tokenName, tokenInfo);
            ServiceActionContext currentContext = new ServiceActionContext(request, null);
            actionController.execute(currentContext, setConsumerTokenInfoAction);
        }
        catch (ExecutionException ex)
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.action.request.opensocial.SetConsumerTokenInfoRequest

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.