added java backend (logic only)
This commit is contained in:
38
UrlShortenerData.java
Normal file
38
UrlShortenerData.java
Normal file
@@ -0,0 +1,38 @@
|
||||
package backendAlex;
|
||||
|
||||
|
||||
public class UrlShortenerData {
|
||||
|
||||
private String longUrl;
|
||||
|
||||
private String shortUrl;
|
||||
|
||||
// Default constructor (required for Jackson)
|
||||
public UrlShortenerData() {
|
||||
}
|
||||
|
||||
// Optional: Convenience constructor
|
||||
public UrlShortenerData(String longUrl, String shortUrl) {
|
||||
this.longUrl = longUrl;
|
||||
this.shortUrl = shortUrl;
|
||||
}
|
||||
|
||||
// Standard Setter für longUrl
|
||||
public void setLongUrl(String longUrl) {
|
||||
this.longUrl = longUrl;
|
||||
}
|
||||
|
||||
// Standard Setter für shortUrl
|
||||
public void setShortUrl(String shortUrl) {
|
||||
this.shortUrl = shortUrl;
|
||||
}
|
||||
|
||||
// Getter
|
||||
public String getLongUrl() {
|
||||
return this.longUrl;
|
||||
}
|
||||
|
||||
public String getShortUrl() {
|
||||
return this.shortUrl;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user