DataCheckbox component
[aramzamzam-commons.git] / aramzamzam-commons / commons-pages-behavoir / src / main / java / net / aramzamzam / commons / pagesbehavoir / services / HttpStatusCode.java
bloba436d2a10e7eef11ff09e0d9732d8658b2f0d163
1 package net.aramzamzam.commons.pagesbehavoir.services;
3 import java.io.Serializable;
4 import java.net.URL;
6 import org.apache.tapestry5.Link;
8 public class HttpStatusCode implements Serializable {
9 private static final long serialVersionUID = 7324260894398442878L;
11 private final int statusCode;
12 private final String location;
14 public HttpStatusCode(int statusCode) {
15 this.statusCode = statusCode;
16 this.location = "";
19 public HttpStatusCode(int statusCode, String location) {
20 this.statusCode = statusCode;
21 this.location = location;
24 public HttpStatusCode(int statusCode, Link link) {
25 this(statusCode, link.toRedirectURI());
28 public HttpStatusCode(int statusCode, URL url) {
29 this(statusCode, url.toExternalForm());
32 public int getStatusCode() {
33 return statusCode;
36 public String getLocation() {
37 return location;