Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.belladati.sdk.impl;
 
 import java.util.List;
 
The serialVersionUID
	private static final long serialVersionUID = -4137207765985769374L;
	private final BellaDatiClient client;
	BellaDatiConnectionImpl(String baseUrlboolean trustSelfSigned) {
		 = new BellaDatiClient(baseUrltrustSelfSigned);
	}
	public OAuthRequest oAuth(String consumerKeyString consumerSecret) {
		TokenHolder tokenHolder = new TokenHolder(consumerKeyconsumerSecret);
		.postToken("oauth/requestToken"tokenHolder);
		return new OAuthRequestImpl(tokenHolder);
	}
	public BellaDatiService xAuth(String consumerKeyString consumerSecretString usernameString password) {
		TokenHolder tokenHolder = new TokenHolder(consumerKeyconsumerSecret);
		List<? extends NameValuePairparameters = Arrays.asList(new BasicNameValuePair("x_auth_username"username),
			new BasicNameValuePair("x_auth_password"password));
		.postToken("oauth/accessToken"tokenHolderparameters);
		return new BellaDatiServiceImpl(tokenHolder);
	}
	public String toString() {
		return "Connection(server: " + .getBaseUrl() + ")";
	}
New to GrepCode? Check out our FAQ X