Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3106 from Vojtech-Sassmann/generalSponsorship
Core - general sponsorship
- Loading branch information
Showing
17 changed files
with
707 additions
and
258 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
102 changes: 102 additions & 0 deletions
102
perun-base/src/main/java/cz/metacentrum/perun/core/api/SponsoredUserData.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 |
---|---|---|
@@ -0,0 +1,102 @@ | ||
package cz.metacentrum.perun.core.api; | ||
|
||
/** | ||
* @author Vojtech Sassmann <vojtech.sassmann@gmail.com> | ||
*/ | ||
public class SponsoredUserData { | ||
|
||
private String guestName; | ||
private String firstName; | ||
private String lastName; | ||
private String titleBefore; | ||
private String titleAfter; | ||
private String namespace; | ||
private String email; | ||
private String password; | ||
private String login; | ||
|
||
public SponsoredUserData() {} | ||
public SponsoredUserData(String guestName, String firstName, String lastName, String titleBefore, String titleAfter, String namespace, String email, String password, String login) { | ||
this.guestName = guestName; | ||
this.firstName = firstName; | ||
this.lastName = lastName; | ||
this.titleBefore = titleBefore; | ||
this.titleAfter = titleAfter; | ||
this.namespace = namespace; | ||
this.email = email; | ||
this.password = password; | ||
this.login = login; | ||
} | ||
|
||
public String getFirstName() { | ||
return firstName; | ||
} | ||
|
||
public void setFirstName(String firstName) { | ||
this.firstName = firstName; | ||
} | ||
|
||
public String getLastName() { | ||
return lastName; | ||
} | ||
|
||
public void setLastName(String lastName) { | ||
this.lastName = lastName; | ||
} | ||
|
||
public String getTitleBefore() { | ||
return titleBefore; | ||
} | ||
|
||
public void setTitleBefore(String titleBefore) { | ||
this.titleBefore = titleBefore; | ||
} | ||
|
||
public String getTitleAfter() { | ||
return titleAfter; | ||
} | ||
|
||
public void setTitleAfter(String titleAfter) { | ||
this.titleAfter = titleAfter; | ||
} | ||
|
||
public String getLogin() { | ||
return login; | ||
} | ||
|
||
public void setLogin(String login) { | ||
this.login = login; | ||
} | ||
|
||
public String getPassword() { | ||
return password; | ||
} | ||
|
||
public void setPassword(String password) { | ||
this.password = password; | ||
} | ||
|
||
public String getEmail() { | ||
return email; | ||
} | ||
|
||
public void setEmail(String email) { | ||
this.email = email; | ||
} | ||
|
||
public String getNamespace() { | ||
return namespace; | ||
} | ||
|
||
public void setNamespace(String namespace) { | ||
this.namespace = namespace; | ||
} | ||
|
||
public String getGuestName() { | ||
return guestName; | ||
} | ||
|
||
public void setGuestName(String guestName) { | ||
this.guestName = guestName; | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
...main/java/cz/metacentrum/perun/core/api/exceptions/InvalidSponsoredUserDataException.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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package cz.metacentrum.perun.core.api.exceptions; | ||
|
||
/** | ||
* @author Vojtech Sassmann <vojtech.sassmann@gmail.com> | ||
*/ | ||
public class InvalidSponsoredUserDataException extends PerunException { | ||
|
||
static final long serialVersionUID = 0; | ||
|
||
public InvalidSponsoredUserDataException() { | ||
} | ||
|
||
public InvalidSponsoredUserDataException(String message) { | ||
super(message); | ||
} | ||
|
||
public InvalidSponsoredUserDataException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
|
||
public InvalidSponsoredUserDataException(Throwable cause) { | ||
super(cause); | ||
} | ||
|
||
@Override | ||
public String getFriendlyMessageTemplate() { | ||
return "Invalid data provided for the creation of a sponsored user."; | ||
} | ||
} |
45 changes: 44 additions & 1 deletion
45
perun-base/src/test/resources/sponsored-accounts-config.yml
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.