-
Notifications
You must be signed in to change notification settings - Fork 7
Agroclim additions #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
258fc1d
c5fbebd
482f0bf
eb0f00b
4cc2ede
1be7747
001b53a
5502260
691a12d
b863af5
7e55fc1
56052c3
b57dba2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,7 +18,7 @@ | |
| package com.researchspace.dataverse.api.v1; | ||
|
|
||
| import java.text.ParseException; | ||
| import java.util.Date; | ||
| import java.time.LocalDateTime; | ||
|
|
||
| import com.researchspace.springrest.ext.RestClientException; | ||
|
|
||
|
|
@@ -29,19 +29,18 @@ public interface UsersOperations { | |
|
|
||
| /** | ||
| * Get token expiration date. | ||
| * @return java.util.Date token expiration date. | ||
| * @return java.time.LocalDateTime token expiration. | ||
| * @throws ParseException | ||
| * @throws RestClientException | ||
| */ | ||
| Date getTokenExpirationDate() throws ParseException; | ||
| LocalDateTime getTokenExpirationDate() throws ParseException; | ||
|
|
||
| /** | ||
| * Recreate user token. | ||
| * @return new token | ||
| * @throws Exception | ||
| * Get token expiration text returned by dataverse. | ||
| * @return String as the form of <Token XXXXX expires on yyyy-MM-dd HH:mm:ss.SSS>. | ||
| * @throws ParseException | ||
| * @throws RestClientException | ||
| */ | ||
| String recreateToken(); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. deleting /renaming this will break existing clients. Solution is to keep the original method signature and add your method as a new method - it looks like it is doing something different?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The method was finally not developed. We considered, that in our use, it was better to create the token ourselves when it would expire. |
||
|
|
||
|
|
||
| String getTokenExpiration() throws ParseException; | ||
|
|
||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will break existing client code that expects java.util.Date. To avoid doing that, suggest creating a new method with a variant name e.g. 'getTokenExpirationLocalDateTime'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a work in progress, and is not breaking anything because the method was non existing before.