Skip to content

Commit 4acca8f

Browse files
committed
change object not found exception to be thrown as unchecked
1 parent a3ac6a8 commit 4acca8f

File tree

26 files changed

+185
-183
lines changed

26 files changed

+185
-183
lines changed

haikudepotserver-api1/src/main/java/org/haiku/haikudepotserver/api1/AuthorizationApi.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2016, Andrew Lindesay
2+
* Copyright 2014-2021, Andrew Lindesay
33
* Distributed under the terms of the MIT License.
44
*/
55

@@ -28,16 +28,16 @@ public interface AuthorizationApi {
2828
* the request.</p>
2929
*/
3030

31-
CreateAuthorizationPkgRuleResult createAuthorizationPkgRule(CreateAuthorizationPkgRuleRequest request) throws ObjectNotFoundException, AuthorizationRuleConflictException;
31+
CreateAuthorizationPkgRuleResult createAuthorizationPkgRule(CreateAuthorizationPkgRuleRequest request) throws AuthorizationRuleConflictException;
3232

3333
/**
3434
* <p>This method will delete an authorization rule identified by the coordinates in the request. If it
3535
* was not able to find the rule to delete then it will thrown an instance of
3636
* {@link ObjectNotFoundException}.</p>
3737
*/
3838

39-
RemoveAuthorizationPkgRuleResult removeAuthorizationPkgRule(RemoveAuthorizationPkgRuleRequest request) throws ObjectNotFoundException;
39+
RemoveAuthorizationPkgRuleResult removeAuthorizationPkgRule(RemoveAuthorizationPkgRuleRequest request);
4040

41-
SearchAuthorizationPkgRulesResult searchAuthorizationPkgRules(SearchAuthorizationPkgRulesRequest request) throws ObjectNotFoundException;
41+
SearchAuthorizationPkgRulesResult searchAuthorizationPkgRules(SearchAuthorizationPkgRulesRequest request);
4242

4343
}

haikudepotserver-api1/src/main/java/org/haiku/haikudepotserver/api1/JobApi.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2016, Andrew Lindesay
2+
* Copyright 2014-2021, Andrew Lindesay
33
* Distributed under the terms of the MIT License.
44
*/
55

@@ -27,14 +27,14 @@ public interface JobApi {
2727
* of the jobs.</p>
2828
*/
2929

30-
SearchJobsResult searchJobs(SearchJobsRequest request) throws ObjectNotFoundException;
30+
SearchJobsResult searchJobs(SearchJobsRequest request);
3131

3232
/**
3333
* <p>This method returns details of the job identified by data in the request. If there is no such
3434
* job for the guid supplied, it will throw
3535
* {@link ObjectNotFoundException}.</p>
3636
*/
3737

38-
GetJobResult getJob(GetJobRequest request) throws ObjectNotFoundException;
38+
GetJobResult getJob(GetJobRequest request);
3939

4040
}

haikudepotserver-api1/src/main/java/org/haiku/haikudepotserver/api1/MiscellaneousApi.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2013-2018, Andrew Lindesay
2+
* Copyright 2013-2021, Andrew Lindesay
33
* Distributed under the terms of the MIT License.
44
*/
55

@@ -46,7 +46,7 @@ public interface MiscellaneousApi {
4646
* specified in the request does not exist.</p>
4747
*/
4848

49-
GetAllMessagesResult getAllMessages(GetAllMessagesRequest getAllMessagesRequest) throws ObjectNotFoundException;
49+
GetAllMessagesResult getAllMessages(GetAllMessagesRequest getAllMessagesRequest);
5050

5151
/**
5252
* <P>This method will return a list of all of the possible architectures in the system such as x86 or arm.

haikudepotserver-api1/src/main/java/org/haiku/haikudepotserver/api1/PkgApi.java

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2013-2019, Andrew Lindesay
2+
* Copyright 2013-2021, Andrew Lindesay
33
* Distributed under the terms of the MIT License.
44
*/
55

@@ -22,63 +22,63 @@ public interface PkgApi {
2222
* packages.</p>
2323
*/
2424

25-
UpdatePkgCategoriesResult updatePkgCategories(UpdatePkgCategoriesRequest updatePkgCategoriesRequest) throws ObjectNotFoundException;
25+
UpdatePkgCategoriesResult updatePkgCategories(UpdatePkgCategoriesRequest updatePkgCategoriesRequest);
2626

2727
/**
2828
* <p>This method can be invoked to get a list of all of the packages that match some search critera in the
2929
* request.</p>
3030
*/
3131

32-
SearchPkgsResult searchPkgs(SearchPkgsRequest request) throws ObjectNotFoundException;
32+
SearchPkgsResult searchPkgs(SearchPkgsRequest request);
3333

3434
/**
3535
* <p>This method will return a package and the specified versions. It will throw an
3636
* {@link ObjectNotFoundException} if the package was not able to be located.</p>
3737
*/
3838

39-
GetPkgResult getPkg(GetPkgRequest request) throws ObjectNotFoundException;
39+
GetPkgResult getPkg(GetPkgRequest request);
4040

4141
/**
4242
* <p>Returns a list of meta-data regarding the icon data related to the pkg. This does not contain the icon
4343
* data itself; just the meta data.</p>
4444
*/
4545

46-
GetPkgIconsResult getPkgIcons(GetPkgIconsRequest request) throws ObjectNotFoundException;
46+
GetPkgIconsResult getPkgIcons(GetPkgIconsRequest request);
4747

4848
/**
4949
* <p>This request will configure the icons for the package nominated. Note that only certain configurations of
5050
* icon data may be acceptable; for example, it will require a 16x16px and 32x32px bitmap image.</p>
5151
*/
5252

53-
ConfigurePkgIconResult configurePkgIcon(ConfigurePkgIconRequest request) throws ObjectNotFoundException, BadPkgIconException;
53+
ConfigurePkgIconResult configurePkgIcon(ConfigurePkgIconRequest request) throws BadPkgIconException;
5454

5555
/**
5656
* <p>This request will remove any icons from the package.</p>
5757
*/
5858

59-
RemovePkgIconResult removePkgIcon(RemovePkgIconRequest request) throws ObjectNotFoundException;
59+
RemovePkgIconResult removePkgIcon(RemovePkgIconRequest request);
6060

6161
/**
6262
* <p>This method will get the details of a screenshot image.</p>
6363
*/
6464

65-
GetPkgScreenshotResult getPkgScreenshot(GetPkgScreenshotRequest request) throws ObjectNotFoundException;
65+
GetPkgScreenshotResult getPkgScreenshot(GetPkgScreenshotRequest request);
6666

6767
/**
6868
* <p>This method will return an ordered list of the screenshots that are available for this package. It will
6969
* throw an {@link ObjectNotFoundException} in the case where the
7070
* nominated package is not able to be found.</p>
7171
*/
7272

73-
GetPkgScreenshotsResult getPkgScreenshots(GetPkgScreenshotsRequest getPkgScreenshotsRequest) throws ObjectNotFoundException;
73+
GetPkgScreenshotsResult getPkgScreenshots(GetPkgScreenshotsRequest getPkgScreenshotsRequest);
7474

7575
/**
7676
* <p>This method will remove the nominated screenshot from the package. If the screenshot is not able to be
7777
* found using the code supplied, the method will throw an instance of
7878
* {@link ObjectNotFoundException}.</p>
7979
*/
8080

81-
RemovePkgScreenshotResult removePkgScreenshot(RemovePkgScreenshotRequest removePkgScreenshotRequest) throws ObjectNotFoundException;
81+
RemovePkgScreenshotResult removePkgScreenshot(RemovePkgScreenshotRequest removePkgScreenshotRequest);
8282

8383
/**
8484
* <p>This method will reorder the screenshots related to the nominated package. If any of the screenshots are
@@ -87,20 +87,20 @@ public interface PkgApi {
8787
* {@link ObjectNotFoundException} will be thrown.</p>
8888
*/
8989

90-
ReorderPkgScreenshotsResult reorderPkgScreenshots(ReorderPkgScreenshotsRequest reorderPkgScreenshotsRequest) throws ObjectNotFoundException;
90+
ReorderPkgScreenshotsResult reorderPkgScreenshots(ReorderPkgScreenshotsRequest reorderPkgScreenshotsRequest);
9191

9292
/**
9393
* <p>This method will update the localizations supplied for the package identified in the request. In order to
9494
* remove a localization for a given language, supply the localization data for that language as NULL.</p>
9595
*/
9696

97-
UpdatePkgLocalizationResult updatePkgLocalization(UpdatePkgLocalizationRequest updatePkgLocalizationRequest) throws ObjectNotFoundException;
97+
UpdatePkgLocalizationResult updatePkgLocalization(UpdatePkgLocalizationRequest updatePkgLocalizationRequest);
9898

9999
/**
100100
* <p>This method will return all of the localizations that are specific to the package identified in the request.</p>
101101
*/
102102

103-
GetPkgLocalizationsResult getPkgLocalizations(GetPkgLocalizationsRequest getPkgLocalizationsRequest) throws ObjectNotFoundException;
103+
GetPkgLocalizationsResult getPkgLocalizations(GetPkgLocalizationsRequest getPkgLocalizationsRequest);
104104

105105
/**
106106
* <p>This method will return the package version localizations for the nominated package. It will return
@@ -109,14 +109,14 @@ public interface PkgApi {
109109
* context of a specific package version rather than the latest.</p>
110110
*/
111111

112-
GetPkgVersionLocalizationsResult getPkgVersionLocalizations(GetPkgVersionLocalizationsRequest getPkgVersionLocalizationsRequest) throws ObjectNotFoundException;
112+
GetPkgVersionLocalizationsResult getPkgVersionLocalizations(GetPkgVersionLocalizationsRequest getPkgVersionLocalizationsRequest);
113113

114114
/**
115115
* <p>This method will update the prominence of the nominated package. The prominence is identified by the
116116
* ordering of the prominence as a natural identifier.</p>
117117
*/
118118

119-
UpdatePkgProminenceResult updatePkgProminence(UpdatePkgProminenceRequest request) throws ObjectNotFoundException;
119+
UpdatePkgProminenceResult updatePkgProminence(UpdatePkgProminenceRequest request);
120120

121121
/**
122122
* <p>The package might have a change log associated with it. This is just a long string with notes
@@ -125,7 +125,7 @@ public interface PkgApi {
125125
* </p>
126126
*/
127127

128-
GetPkgChangelogResult getPkgChangelog(GetPkgChangelogRequest request) throws ObjectNotFoundException;
128+
GetPkgChangelogResult getPkgChangelog(GetPkgChangelogRequest request);
129129

130130
/**
131131
* <p>The package is able to have a change log associated with it. This method will update the change
@@ -134,13 +134,13 @@ public interface PkgApi {
134134
* @throws ObjectNotFoundException if the package is not able to be found.
135135
*/
136136

137-
UpdatePkgChangelogResult updatePkgChangelog(UpdatePkgChangelogRequest request) throws ObjectNotFoundException;
137+
UpdatePkgChangelogResult updatePkgChangelog(UpdatePkgChangelogRequest request);
138138

139139
/**
140140
* <p>This method will allow a package version to be updated.</p>
141141
* @throws ObjectNotFoundException if the package version is not able to be found.
142142
*/
143143

144-
UpdatePkgVersionResult updatePkgVersion(UpdatePkgVersionRequest request) throws ObjectNotFoundException;
144+
UpdatePkgVersionResult updatePkgVersion(UpdatePkgVersionRequest request);
145145

146146
}

haikudepotserver-api1/src/main/java/org/haiku/haikudepotserver/api1/PkgJobApi.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2017, Andrew Lindesay
2+
* Copyright 2016-2021, Andrew Lindesay
33
* Distributed under the terms of the MIT License.
44
*/
55

@@ -26,7 +26,7 @@ public interface PkgJobApi {
2626
* @throws ObjectNotFoundException in the case that the data identified by GUID does not exist.
2727
*/
2828

29-
QueuePkgCategoryCoverageImportSpreadsheetJobResult queuePkgCategoryCoverageImportSpreadsheetJob(QueuePkgCategoryCoverageImportSpreadsheetJobRequest request) throws ObjectNotFoundException;
29+
QueuePkgCategoryCoverageImportSpreadsheetJobResult queuePkgCategoryCoverageImportSpreadsheetJob(QueuePkgCategoryCoverageImportSpreadsheetJobRequest request);
3030

3131
/**
3232
* <p>Enqueues a request on behalf of the current user to produce a spreadsheet showing which packages have spreadsheets
@@ -62,7 +62,7 @@ public interface PkgJobApi {
6262
* containing package icons.</p>
6363
*/
6464

65-
QueuePkgIconArchiveImportJobResult queuePkgIconArchiveImportJob(QueuePkgIconArchiveImportJobRequest request) throws ObjectNotFoundException;
65+
QueuePkgIconArchiveImportJobResult queuePkgIconArchiveImportJob(QueuePkgIconArchiveImportJobRequest request);
6666

6767
/**
6868
* <p>Enqueues a job to cause all PkgVersion objects with no payload length to get those populated if possible.</p>
@@ -93,6 +93,6 @@ public interface PkgJobApi {
9393
* containing package screenshots.</p>
9494
*/
9595

96-
QueuePkgScreenshotArchiveImportJobResult queuePkgScreenshotArchiveImportJob(QueuePkgScreenshotArchiveImportJobRequest request) throws ObjectNotFoundException;
96+
QueuePkgScreenshotArchiveImportJobResult queuePkgScreenshotArchiveImportJob(QueuePkgScreenshotArchiveImportJobRequest request);
9797

9898
}

haikudepotserver-api1/src/main/java/org/haiku/haikudepotserver/api1/RepositoryApi.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2018, Andrew Lindesay
2+
* Copyright 2014-2021, Andrew Lindesay
33
* Distributed under the terms of the MIT License.
44
*/
55

@@ -33,56 +33,56 @@ public interface RepositoryApi {
3333
* code in the request object.</p>
3434
*/
3535

36-
GetRepositoryResult getRepository(GetRepositoryRequest getRepositoryRequest) throws ObjectNotFoundException;
36+
GetRepositoryResult getRepository(GetRepositoryRequest getRepositoryRequest);
3737

3838
/**
3939
* <p>This method will update the repository. As well as the data to update, it also includes a 'filter' that
4040
* defines the fields that should be updated in this request.</p>
4141
*/
4242

43-
UpdateRepositoryResult updateRepository(UpdateRepositoryRequest updateRepositoryRequest) throws ObjectNotFoundException;
43+
UpdateRepositoryResult updateRepository(UpdateRepositoryRequest updateRepositoryRequest);
4444

4545
/**
4646
* <p>This method will trigger the import process for a repository.</p>
4747
*/
4848

49-
TriggerImportRepositoryResult triggerImportRepository(TriggerImportRepositoryRequest triggerImportRepositoryRequest) throws ObjectNotFoundException;
49+
TriggerImportRepositoryResult triggerImportRepository(TriggerImportRepositoryRequest triggerImportRepositoryRequest);
5050

5151
/**
5252
* <p>This method will create a repository. This method will throw
5353
* {@link ObjectNotFoundException} if the architecture identified by a
5454
* supplied code is not able to be found as an architecture.</p>
5555
*/
5656

57-
CreateRepositoryResult createRepository(CreateRepositoryRequest createRepositoryRequest) throws ObjectNotFoundException;
57+
CreateRepositoryResult createRepository(CreateRepositoryRequest createRepositoryRequest);
5858

5959
/**
6060
* <p>Returns details of the repository source.</p>
6161
* @throws ObjectNotFoundException is the repository source is not available.
6262
*/
6363

64-
GetRepositorySourceResult getRepositorySource(GetRepositorySourceRequest request) throws ObjectNotFoundException;
64+
GetRepositorySourceResult getRepositorySource(GetRepositorySourceRequest request);
6565

6666
/**
6767
* <p>Allows the repository source to be updated.</p>
6868
* @throws ObjectNotFoundException if the repository source was not able to be found given the code supplied.
6969
*/
7070

71-
UpdateRepositorySourceResult updateRepositorySource(UpdateRepositorySourceRequest request) throws ObjectNotFoundException;
71+
UpdateRepositorySourceResult updateRepositorySource(UpdateRepositorySourceRequest request);
7272

7373
/**
7474
* <p>Creates the repository source.</p>
7575
* @throws ObjectNotFoundException if the repository is not able to be found.
7676
*/
7777

78-
CreateRepositorySourceResult createRepositorySource(CreateRepositorySourceRequest request) throws ObjectNotFoundException;
78+
CreateRepositorySourceResult createRepositorySource(CreateRepositorySourceRequest request);
7979

8080
/**
8181
* <p>Creates a new mirror for a repository source.</p>
8282
* @since 2018-07-23
8383
*/
8484

85-
CreateRepositorySourceMirrorResult createRepositorySourceMirror(CreateRepositorySourceMirrorRequest request) throws ObjectNotFoundException;
85+
CreateRepositorySourceMirrorResult createRepositorySourceMirror(CreateRepositorySourceMirrorRequest request);
8686

8787
/**
8888
* <p>Updates an existing mirror. The mirror should be identified by its code.
@@ -92,18 +92,18 @@ public interface RepositoryApi {
9292
* @since 2018-07-24
9393
*/
9494

95-
UpdateRepositorySourceMirrorResult updateRepositorySourceMirror(UpdateRepositorySourceMirrorRequest request) throws ObjectNotFoundException;
95+
UpdateRepositorySourceMirrorResult updateRepositorySourceMirror(UpdateRepositorySourceMirrorRequest request);
9696

9797
/**
9898
* @since 2018-07-29
9999
*/
100100

101-
GetRepositorySourceMirrorResult getRepositorySourceMirror(GetRepositorySourceMirrorRequest request) throws ObjectNotFoundException;
101+
GetRepositorySourceMirrorResult getRepositorySourceMirror(GetRepositorySourceMirrorRequest request);
102102

103103
/**
104104
* @since 2018-12-29
105105
*/
106106

107-
RemoveRepositorySourceMirrorResult removeRepositorySourceMirror(RemoveRepositorySourceMirrorRequest request) throws ObjectNotFoundException;
107+
RemoveRepositorySourceMirrorResult removeRepositorySourceMirror(RemoveRepositorySourceMirrorRequest request);
108108

109109
}

haikudepotserver-api1/src/main/java/org/haiku/haikudepotserver/api1/UserApi.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2013-2020, Andrew Lindesay
2+
* Copyright 2013-2021, Andrew Lindesay
33
* Distributed under the terms of the MIT License.
44
*/
55

@@ -23,7 +23,7 @@ public interface UserApi {
2323
* in the filter will be updated.</p>
2424
*/
2525

26-
UpdateUserResult updateUser(UpdateUserRequest updateUserRequest) throws ObjectNotFoundException;
26+
UpdateUserResult updateUser(UpdateUserRequest updateUserRequest);
2727

2828
/**
2929
* <p>This method will create a user in the system. It is identified by a username
@@ -32,15 +32,15 @@ public interface UserApi {
3232
* in the case that the referenced 'natural language' is not able to be found.</p>
3333
*/
3434

35-
CreateUserResult createUser(CreateUserRequest createUserRequest) throws ObjectNotFoundException, InvalidUserUsageConditionsException;
35+
CreateUserResult createUser(CreateUserRequest createUserRequest) throws InvalidUserUsageConditionsException;
3636

3737
/**
3838
* <p>This method will get the user identified by the nickname in the request object.
3939
* If no user was able to be found an instance of {@link ObjectNotFoundException}
4040
* is thrown.</p>
4141
*/
4242

43-
GetUserResult getUser(GetUserRequest getUserRequest) throws ObjectNotFoundException;
43+
GetUserResult getUser(GetUserRequest getUserRequest);
4444

4545
/**
4646
* <p>This method will allow a client to authenticate against the server. If this is
@@ -62,7 +62,7 @@ public interface UserApi {
6262
* <p>This method will allow the client to modify the password of a user.</p>
6363
*/
6464

65-
ChangePasswordResult changePassword(ChangePasswordRequest changePasswordRequest) throws ObjectNotFoundException, ValidationException;
65+
ChangePasswordResult changePassword(ChangePasswordRequest changePasswordRequest) throws ValidationException;
6666

6767
/**
6868
* <p>This method will allow a search for users.</p>

0 commit comments

Comments
 (0)