added java backend (logic only)

This commit is contained in:
alexandrawerner
2026-03-25 15:10:04 +01:00
commit 6276b54cb1
3 changed files with 201 additions and 0 deletions

38
UrlShortenerData.java Normal file
View 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;
}
}