-
Notifications
You must be signed in to change notification settings - Fork 301
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Michael Breu
authored and
Michael Breu
committed
Nov 29, 2024
1 parent
25125de
commit 003804a
Showing
14 changed files
with
323 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
src/main/java/de/tum/cit/aet/artemis/core/dto/SharingInfoDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,102 @@ | ||
package de.tum.cit.aet.artemis.core.dto; | ||
|
||
import java.util.Objects; | ||
|
||
import org.springframework.context.annotation.Profile; | ||
|
||
/** | ||
* the sharing info to request an specific exercise from the sharing platform. | ||
*/ | ||
@Profile("sharing") | ||
public class SharingInfoDTO { | ||
|
||
/** | ||
* the (random) basket Token | ||
*/ | ||
private String basketToken; | ||
|
||
/** | ||
* the callback URL for the basket request | ||
*/ | ||
private String returnURL; | ||
|
||
/** | ||
* the base URL for the basket request | ||
*/ | ||
private String apiBaseURL; | ||
|
||
/** | ||
* the index of the request exercise | ||
*/ | ||
private int exercisePosition; | ||
|
||
/** | ||
* the callback URL for the basket request | ||
*/ | ||
public String getReturnURL() { | ||
return returnURL; | ||
} | ||
|
||
/** | ||
* sets the callback URL for the basket request | ||
*/ | ||
public void setReturnURL(String returnURL) { | ||
this.returnURL = returnURL; | ||
} | ||
|
||
/** | ||
* the base URL for the basket request | ||
*/ | ||
public String getApiBaseURL() { | ||
return apiBaseURL; | ||
} | ||
|
||
/** | ||
* sets the base URL for the basket request | ||
*/ | ||
public void setApiBaseURL(String apiBaseURL) { | ||
this.apiBaseURL = apiBaseURL; | ||
} | ||
|
||
/** | ||
* the (random) basket Token | ||
*/ | ||
public String getBasketToken() { | ||
return basketToken; | ||
} | ||
|
||
/** | ||
* sets the basket Token | ||
*/ | ||
public void setBasketToken(String basketToken) { | ||
this.basketToken = basketToken; | ||
} | ||
|
||
/** | ||
* the index of the request exercise | ||
*/ | ||
public int getExercisePosition() { | ||
return exercisePosition; | ||
} | ||
|
||
/** | ||
* sets the index of the request exercise | ||
*/ | ||
public void setExercisePosition(int exercisePosition) { | ||
this.exercisePosition = exercisePosition; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (o == null || getClass() != o.getClass()) | ||
return false; | ||
SharingInfoDTO that = (SharingInfoDTO) o; | ||
return exercisePosition == that.exercisePosition && Objects.equals(basketToken, that.basketToken) && Objects.equals(returnURL, that.returnURL) | ||
&& Objects.equals(apiBaseURL, that.apiBaseURL); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(basketToken, returnURL, apiBaseURL, exercisePosition); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.