Skip to content

Commit

Permalink
MF-5759 fix unstable route order for routes with same name but differ…
Browse files Browse the repository at this point in the history
…ent versions (#345)

Co-authored-by: Alex Decker <[email protected]>
  • Loading branch information
Alex Decker committed Aug 29, 2024
1 parent 99c78ef commit ce2eb9e
Show file tree
Hide file tree
Showing 18 changed files with 710 additions and 712 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,28 @@
* Exception thrown when the server responds with a {@link PollError} error.
*
* <p> This exception is raised by {@link
* com.dropbox.core.v2.team.DbxTeamTeamRequests#membersAddJobStatusGetV2(String)},
* {@link
* com.dropbox.core.v2.team.DbxTeamTeamRequests#membersAddJobStatusGet(String)},
* {@link
* com.dropbox.core.v2.team.DbxTeamTeamRequests#membersAddJobStatusGetV2(String)},
* {@link
* com.dropbox.core.v2.team.DbxTeamTeamRequests#membersMoveFormerMemberFilesJobStatusCheck(String)},
* {@link
* com.dropbox.core.v2.team.DbxTeamTeamRequests#membersRemoveJobStatusGet(String)},
* {@link
* com.dropbox.core.v2.team.DbxTeamTeamRequests#teamFolderArchiveCheck(String)},
* {@link
* com.dropbox.core.v2.files.DbxUserFilesRequests#copyBatchCheckV2(String)},
* {@link
* com.dropbox.core.v2.files.DbxUserFilesRequests#copyBatchCheck(String)},
* {@link
* com.dropbox.core.v2.files.DbxUserFilesRequests#copyBatchCheckV2(String)},
* {@link
* com.dropbox.core.v2.files.DbxUserFilesRequests#createFolderBatchCheck(String)},
* {@link
* com.dropbox.core.v2.files.DbxUserFilesRequests#deleteBatchCheck(String)},
* {@link
* com.dropbox.core.v2.files.DbxUserFilesRequests#moveBatchCheckV2(String)},
* {@link
* com.dropbox.core.v2.files.DbxUserFilesRequests#moveBatchCheck(String)},
* {@link
* com.dropbox.core.v2.files.DbxUserFilesRequests#moveBatchCheckV2(String)},
* {@link
* com.dropbox.core.v2.files.DbxUserFilesRequests#saveUrlCheckJobStatus(String)},
* {@link
* com.dropbox.core.v2.files.DbxUserFilesRequests#uploadSessionFinishBatchCheck(String)},
Expand All @@ -45,17 +45,17 @@
*/
public class PollErrorException extends DbxApiException {
// exception for routes:
// 2/team/members/add/job_status/get_v2
// 2/team/members/add/job_status/get
// 2/team/members/add/job_status/get_v2
// 2/team/members/move_former_member_files/job_status/check
// 2/team/members/remove/job_status/get
// 2/team/team_folder/archive/check
// 2/files/copy_batch/check_v2
// 2/files/copy_batch/check
// 2/files/copy_batch/check_v2
// 2/files/create_folder_batch/check
// 2/files/delete_batch/check
// 2/files/move_batch/check_v2
// 2/files/move_batch/check
// 2/files/move_batch/check_v2
// 2/files/save_url/check_job_status
// 2/files/upload_session/finish_batch/check
// 2/sharing/check_job_status
Expand All @@ -66,28 +66,28 @@ public class PollErrorException extends DbxApiException {

/**
* The error reported by {@link
* com.dropbox.core.v2.team.DbxTeamTeamRequests#membersAddJobStatusGetV2(String)},
* {@link
* com.dropbox.core.v2.team.DbxTeamTeamRequests#membersAddJobStatusGet(String)},
* {@link
* com.dropbox.core.v2.team.DbxTeamTeamRequests#membersAddJobStatusGetV2(String)},
* {@link
* com.dropbox.core.v2.team.DbxTeamTeamRequests#membersMoveFormerMemberFilesJobStatusCheck(String)},
* {@link
* com.dropbox.core.v2.team.DbxTeamTeamRequests#membersRemoveJobStatusGet(String)},
* {@link
* com.dropbox.core.v2.team.DbxTeamTeamRequests#teamFolderArchiveCheck(String)},
* {@link
* com.dropbox.core.v2.files.DbxUserFilesRequests#copyBatchCheckV2(String)},
* {@link
* com.dropbox.core.v2.files.DbxUserFilesRequests#copyBatchCheck(String)},
* {@link
* com.dropbox.core.v2.files.DbxUserFilesRequests#copyBatchCheckV2(String)},
* {@link
* com.dropbox.core.v2.files.DbxUserFilesRequests#createFolderBatchCheck(String)},
* {@link
* com.dropbox.core.v2.files.DbxUserFilesRequests#deleteBatchCheck(String)},
* {@link
* com.dropbox.core.v2.files.DbxUserFilesRequests#moveBatchCheckV2(String)},
* {@link
* com.dropbox.core.v2.files.DbxUserFilesRequests#moveBatchCheck(String)},
* {@link
* com.dropbox.core.v2.files.DbxUserFilesRequests#moveBatchCheckV2(String)},
* {@link
* com.dropbox.core.v2.files.DbxUserFilesRequests#saveUrlCheckJobStatus(String)},
* {@link
* com.dropbox.core.v2.files.DbxUserFilesRequests#uploadSessionFinishBatchCheck(String)},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,32 @@ public FileRequest get(String id) throws GetFileRequestErrorException, DbxExcept
return get(_arg);
}

//
// route 2/file_requests/list
//

/**
* Returns a list of file requests owned by this user. For apps with the app
* folder permission, this will only return file requests with destinations
* in the app folder.
*
* @return Result for {@link DbxUserFileRequestsRequests#list}.
*/
public ListFileRequestsResult list() throws ListFileRequestsErrorException, DbxException {
try {
return this.client.rpcStyle(this.client.getHost().getApi(),
"2/file_requests/list",
null,
false,
com.dropbox.core.stone.StoneSerializers.void_(),
ListFileRequestsResult.Serializer.INSTANCE,
ListFileRequestsError.Serializer.INSTANCE);
}
catch (DbxWrappedException ex) {
throw new ListFileRequestsErrorException("2/file_requests/list", ex.getRequestId(), ex.getUserMessage(), (ListFileRequestsError) ex.getErrorValue());
}
}

//
// route 2/file_requests/list_v2
//
Expand Down Expand Up @@ -297,32 +323,6 @@ public ListFileRequestsV2Result listV2(long limit) throws ListFileRequestsErrorE
return listV2(_arg);
}

//
// route 2/file_requests/list
//

/**
* Returns a list of file requests owned by this user. For apps with the app
* folder permission, this will only return file requests with destinations
* in the app folder.
*
* @return Result for {@link DbxUserFileRequestsRequests#list}.
*/
public ListFileRequestsResult list() throws ListFileRequestsErrorException, DbxException {
try {
return this.client.rpcStyle(this.client.getHost().getApi(),
"2/file_requests/list",
null,
false,
com.dropbox.core.stone.StoneSerializers.void_(),
ListFileRequestsResult.Serializer.INSTANCE,
ListFileRequestsError.Serializer.INSTANCE);
}
catch (DbxWrappedException ex) {
throw new ListFileRequestsErrorException("2/file_requests/list", ex.getRequestId(), ex.getUserMessage(), (ListFileRequestsError) ex.getErrorValue());
}
}

//
// route 2/file_requests/list/continue
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,19 @@
* Exception thrown when the server responds with a {@link
* ListFileRequestsError} error.
*
* <p> This exception is raised by {@link
* DbxUserFileRequestsRequests#listV2(long)} and {@link
* DbxUserFileRequestsRequests#list}. </p>
* <p> This exception is raised by {@link DbxUserFileRequestsRequests#list} and
* {@link DbxUserFileRequestsRequests#listV2(long)}. </p>
*/
public class ListFileRequestsErrorException extends DbxApiException {
// exception for routes:
// 2/file_requests/list_v2
// 2/file_requests/list
// 2/file_requests/list_v2

private static final long serialVersionUID = 0L;

/**
* The error reported by {@link DbxUserFileRequestsRequests#listV2(long)}
* and {@link DbxUserFileRequestsRequests#list}.
* The error reported by {@link DbxUserFileRequestsRequests#list} and {@link
* DbxUserFileRequestsRequests#listV2(long)}.
*/
public final ListFileRequestsError errorValue;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@
* error.
*
* <p> This exception is raised by {@link
* DbxUserFilesRequests#createFolderV2(String,boolean)} and {@link
* DbxUserFilesRequests#createFolder(String,boolean)}. </p>
* DbxUserFilesRequests#createFolder(String,boolean)} and {@link
* DbxUserFilesRequests#createFolderV2(String,boolean)}. </p>
*/
public class CreateFolderErrorException extends DbxApiException {
// exception for routes:
// 2/files/create_folder_v2
// 2/files/create_folder
// 2/files/create_folder_v2

private static final long serialVersionUID = 0L;

/**
* The error reported by {@link
* DbxUserFilesRequests#createFolderV2(String,boolean)} and {@link
* DbxUserFilesRequests#createFolder(String,boolean)}.
* DbxUserFilesRequests#createFolder(String,boolean)} and {@link
* DbxUserFilesRequests#createFolderV2(String,boolean)}.
*/
public final CreateFolderError errorValue;

Expand Down
Loading

0 comments on commit ce2eb9e

Please sign in to comment.