Package org.azd.connection
Class Connection
java.lang.Object
org.azd.connection.Connection
@Deprecated(since="v6.0; This is deprecated; Please use AzDClientApi which uses Personal access token and OAuth2.0 authentication.")
public class Connection
extends Object
Deprecated.
The factory class which sets the default parameters to use this library.
To call the Azure DevOps services REST API organization name and personal access token are mandatory. Setting these parameters as default helps to work with this library on ease.
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionDeprecated.default with no parametersConnection
(String organization, String personalAccessToken) Deprecated.Instantiates the class with organization name and personal access token.Connection
(String organization, String project, String personalAccessToken) Deprecated.Instantiates the class with organization name, project name and personal access token.Connection
(String organization, String project, AuthorizedToken oauthToken, String appSecret, String appCallBackURL) Deprecated.Instantiates the class with organization name, project name and oauth access token.Connection
(String organization, String project, AuthorizedToken oauthToken, String appSecret, String appCallBackURL, Connection.TokenRefreshedHandler tokenRefreshedHandler) Deprecated.Instantiates the class with organization name, project name and oauth access token.Connection
(String organization, AuthorizedToken oauthToken, String appSecret, String appCallBackURL) Deprecated.Instantiates the class with organization name and oauth access token.Connection
(String organization, AuthorizedToken oauthToken, String appSecret, String appCallBackURL, Connection.TokenRefreshedHandler tokenRefreshedHandler) Deprecated.Instantiates the class with organization name and oauth access token. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Get the default organization nameDeprecated.Get the personal access tokenDeprecated.Get the default Project namevoid
setOauthToken
(AuthorizedToken oauthToken) Deprecated.Set the oauth access tokenvoid
setOrganization
(String organization) Deprecated.Set the organization name to defaultvoid
setPersonalAccessToken
(String personalAccessToken) Deprecated.Set the personal access tokenvoid
setProject
(String project) Deprecated.Set the project name to default
-
Constructor Details
-
Connection
public Connection()Deprecated.default with no parameters -
Connection
Deprecated.Instantiates the class with organization name and personal access token. Use this method if you don't want to specify the devops project- Parameters:
organization
- pass the organization namepersonalAccessToken
- pass the personal access token
-
Connection
Deprecated.Instantiates the class with organization name, project name and personal access token. Use this method if you want to specify the devops project- Parameters:
organization
- pass the organization nameproject
- provide the project namepersonalAccessToken
- pass the personal access token
-
Connection
public Connection(String organization, AuthorizedToken oauthToken, String appSecret, String appCallBackURL) Deprecated.Instantiates the class with organization name and oauth access token. Use this method if you don't want to specify the devops project and you don't want to be notified on oauth token refreshing- Parameters:
organization
- pass the organization nameoauthToken
- pass the oauth access tokenappSecret
- pass the app/client secret. It is used to refresh the oauth access tokenappCallBackURL
- pass the app/client callBackURL (declared in the app). It is used to refresh the oauth access token
-
Connection
public Connection(String organization, String project, AuthorizedToken oauthToken, String appSecret, String appCallBackURL, Connection.TokenRefreshedHandler tokenRefreshedHandler) Deprecated.Instantiates the class with organization name, project name and oauth access token. Use this method if you want to specify the devops project and you want to be notified on oauth token refreshing- Parameters:
organization
- pass the organization nameproject
- provide the project nameoauthToken
- pass the oauth access tokenappSecret
- pass the app/client secret. It is used to refresh the oauth access tokenappCallBackURL
- pass the app/client callBackURL (declared in the app). It is used to refresh the oauth access tokentokenRefreshedHandler
- pass the handler to be called on oauth token refresh
-
Connection
public Connection(String organization, AuthorizedToken oauthToken, String appSecret, String appCallBackURL, Connection.TokenRefreshedHandler tokenRefreshedHandler) Deprecated.Instantiates the class with organization name and oauth access token. Use this method if you don't want to specify the devops project but you want to be notified on oauth token refreshing- Parameters:
organization
- pass the organization nameoauthToken
- pass the oauth access tokenappSecret
- pass the app/client secret. It is used to refresh the oauth access tokenappCallBackURL
- pass the app/client callBackURL (declared in the app). It is used to refresh the oauth access tokentokenRefreshedHandler
- pass the handler to be called on oauth token refresh
-
Connection
public Connection(String organization, String project, AuthorizedToken oauthToken, String appSecret, String appCallBackURL) Deprecated.Instantiates the class with organization name, project name and oauth access token. Use this method if you want to specify the devops project and you don't want to be notified on oauth token refreshing- Parameters:
organization
- pass the organization nameproject
- provide the project nameoauthToken
- pass the oauth access tokenappSecret
- pass the app/client secret. It is used to refresh the oauth access tokenappCallBackURL
- pass the app/client callBackURL (declared in the app). It is used to refresh the oauth access token
-
-
Method Details
-
getOrganization
Deprecated.Get the default organization name- Returns:
- organization name
-
setOrganization
Deprecated.Set the organization name to default- Parameters:
organization
- pass the organization name
-
getProject
Deprecated.Get the default Project name- Returns:
- project name
-
setProject
Deprecated.Set the project name to default- Parameters:
project
- pass the project name
-
getPersonalAccessToken
Deprecated.Get the personal access token- Returns:
- the personal access token
- Throws:
AzDException
- Default Api Exception handler.
-
setPersonalAccessToken
Deprecated.Set the personal access token- Parameters:
personalAccessToken
- pass the personal access token
-
setOauthToken
Deprecated.Set the oauth access token- Parameters:
oauthToken
- pass the oauth access token
-