3737import okhttp3 .Response ;
3838
3939/**
40- * Represents an authenticated connection to the Box API.
41- *
42- * <p>This class handles storing authentication information, automatic token refresh, and
43- * rate-limiting. It can also be used to configure the Box API endpoint URL in order to hit a
44- * different version of the API. Multiple instances of BoxAPIConnection may be created to support
45- * multi-user login.
40+ * @deprecated {@link BoxAPIConnection} class, and the entire the com.box.sdk package is deprecated,
41+ * it is recommended to use {@link com.box.sdkgen} package. Instead of this class use {@link
42+ * com.box.sdkgen.client.BoxClient}
43+ * <p>Represents an authenticated connection to the Box API.
44+ * <p>This class handles storing authentication information, automatic token refresh, and
45+ * rate-limiting. It can also be used to configure the Box API endpoint URL in order to hit a
46+ * different version of the API. Multiple instances of BoxAPIConnection may be created to
47+ * support multi-user login.
4648 */
49+ @ Deprecated
4750public class BoxAPIConnection {
4851
4952 /**
@@ -136,22 +139,28 @@ public class BoxAPIConnection {
136139 private Authenticator authenticator ;
137140
138141 /**
139- * Constructs a new BoxAPIConnection that authenticates with a developer or access token.
140- *
142+ * @deprecated {@link BoxAPIConnection} class, and the entire com.box.sdk package is deprecated,
143+ * it is recommended to use {@link com.box.sdkgen} package. Instead of this class use {@link
144+ * com.box.sdkgen.client.BoxClient}
145+ * <p>Constructs a new BoxAPIConnection that authenticates with a developer or access token.
141146 * @param accessToken a developer or access token to use for authenticating with the API.
142147 */
148+ @ Deprecated
143149 public BoxAPIConnection (String accessToken ) {
144150 this (null , null , accessToken , null );
145151 }
146152
147153 /**
148- * Constructs a new BoxAPIConnection with an access token that can be refreshed.
149- *
154+ * @deprecated {@link BoxAPIConnection} class, and the entire com.box.sdk package is deprecated,
155+ * it is recommended to use {@link com.box.sdkgen} package. Instead of this class use {@link
156+ * com.box.sdkgen.client.BoxClient}
157+ * <p>Constructs a new BoxAPIConnection with an access token that can be refreshed.
150158 * @param clientID the client ID to use when refreshing the access token.
151159 * @param clientSecret the client secret to use when refreshing the access token.
152160 * @param accessToken an initial access token to use for authenticating with the API.
153161 * @param refreshToken an initial refresh token to use when refreshing the access token.
154162 */
163+ @ Deprecated
155164 public BoxAPIConnection (
156165 String clientID , String clientSecret , String accessToken , String refreshToken ) {
157166 this .clientID = clientID ;
@@ -171,38 +180,46 @@ public BoxAPIConnection(
171180 this .userAgent = "Box Java SDK v" + SDK_VERSION + " (Java " + JAVA_VERSION + ")" ;
172181 this .listeners = new ArrayList <>();
173182 this .customHeaders = new HashMap <>();
174-
175183 buildHttpClients ();
176184 }
177185
178186 /**
179- * Constructs a new BoxAPIConnection with an auth code that was obtained from the first half of
180- * OAuth.
181- *
187+ * @deprecated {@link BoxAPIConnection} class, and the entire com.box.sdk package is deprecated,
188+ * it is recommended to use {@link com.box.sdkgen} package. Instead of this class use {@link
189+ * com.box.sdkgen.client.BoxClient}
190+ * <p>Constructs a new BoxAPIConnection with an auth code that was obtained from the first
191+ * half of OAuth.
182192 * @param clientID the client ID to use when exchanging the auth code for an access token.
183193 * @param clientSecret the client secret to use when exchanging the auth code for an access token.
184194 * @param authCode an auth code obtained from the first half of the OAuth process.
185195 */
196+ @ Deprecated
186197 public BoxAPIConnection (String clientID , String clientSecret , String authCode ) {
187198 this (clientID , clientSecret , null , null );
188199 this .authenticate (authCode );
189200 }
190201
191202 /**
192- * Constructs a new BoxAPIConnection.
193- *
203+ * @deprecated {@link BoxAPIConnection} class, and the entire com.box.sdk package is deprecated,
204+ * it is recommended to use {@link com.box.sdkgen} package. Instead of this class use {@link
205+ * com.box.sdkgen.client.BoxClient}
206+ * <p>Constructs a new BoxAPIConnection.
194207 * @param clientID the client ID to use when exchanging the auth code for an access token.
195208 * @param clientSecret the client secret to use when exchanging the auth code for an access token.
196209 */
210+ @ Deprecated
197211 public BoxAPIConnection (String clientID , String clientSecret ) {
198212 this (clientID , clientSecret , null , null );
199213 }
200214
201215 /**
202- * Constructs a new BoxAPIConnection levaraging BoxConfig.
203- *
216+ * @deprecated {@link BoxAPIConnection} class, and the entire com.box.sdk package is deprecated,
217+ * it is recommended to use {@link com.box.sdkgen} package. Instead of this class use {@link
218+ * com.box.sdkgen.client.BoxClient}
219+ * <p>Constructs a new BoxAPIConnection leveraging BoxConfig.
204220 * @param boxConfig BoxConfig file, which should have clientId and clientSecret
205221 */
222+ @ Deprecated
206223 public BoxAPIConnection (BoxConfig boxConfig ) {
207224 this (boxConfig .getClientId (), boxConfig .getClientSecret (), null , null );
208225 }
0 commit comments