1 | String formUnautorized() {↵ | | 1 | String formCreated() {↵
|
2 | return formError("401 Unathorized", "Unathorized use of this service");↵ | | 2 | return formError("201 Created", "Object was created");↵
|
3 | }↵ | | 3 | }↵
|
|
4 | /**↵ | | 4 | /**↵
|
5 | * Payment is required for service.↵ | | 5 | * Indicates the document was accepted.↵
|
6 | * ↵ | | 6 | * ↵
|
7 | * @return The header in a string;↵ | | 7 | * @return The header in a string;↵
|
8 | */↵ | | 8 | */↵
|
9 | public static String formPaymentNeeded() {↵ | | 9 | public static String formAccepted() {↵
|
10 | return formError("402 Payment required", "Payment is required");↵ | | 10 | return formError("202 ↵
|
11 | }↵ | | |
|
|
12 | /**↵ | | |
|
13 | * Client if forbidden to get the request service↵ | | 11 | Accepted", "Object checked in");↵
|
| | | 12 | }↵
|
|
| | | 13 | /**↵
|
14 | .↵ | | 14 | * Indicates only a partial responce was sent.↵
|
15 | * ↵ | | 15 | * ↵
|
16 | * @return The header in a string;↵ | | 16 | * @return The header in a string;↵
|
17 | */↵ | | 17 | */↵
|
18 | public static String formForbidden() {↵ | | 18 | public static String formPartial() {↵
|
19 | return formError("403 Forbidden", "You need permission for this service");↵ | | 19 | return formError("203 Partial", "Only partail document available");↵
|
20 | }↵ | | 20 | }↵
|
|
21 | /**↵ | | 21 | /**↵
|
22 | * The requested object was not found.↵ | | 22 | * Indicates a requested URL has moved to a new address or name.↵
|
23 | * ↵ | | 23 | * ↵
|
24 | * @return The header in a string;↵ | | 24 | * @return The header in a string;↵
|
25 | */↵ | | 25 | */↵
|
26 | public static String formNotFound() {↵ | | 26 | public static String formMoved() {↵
|
27 | return formError("404 Not_found", "Requested object was not found");↵ | | 27 | ↵
|
28 | }↵ | | |
|
|
29 | /**↵ | | |
|
30 | * The server had a problem and could not fulfill the request↵ | | 28 | // 300 codes tell client to do actions↵
|
| | | 29 | return formError("301 Moved", "File has moved");↵
|
| | | 30 | }↵
|
|
| | | 31 | /**↵
|
31 | .↵ | | 32 | * Never seen this used.↵
|
32 | * ↵ | | 33 | * ↵
|
33 | * @return The header in a string;↵ | | 34 | * @return The header in a string;↵
|
34 | */↵ | | 35 | */↵
|
35 | public static String formInternalError() {↵ | | 36 | public static String formFound() {↵
|
36 | return formError("500 Internal server error", "Server broke");↵ | | 37 | return formError("↵
|
37 | }↵ | | |
|
|
38 | /**↵ | | |
|
39 | * Server does not do the requested feature↵ | | 38 | 302 Found", "Object was found");↵
|
| | | 39 | }↵
|
|
| | | 40 | /**↵
|
40 | .↵ | | 41 | * The requested method is not implemented by the server.↵
|
41 | * ↵ | | 42 | * ↵
|
42 | * @return The header in a string;↵ | | 43 | * @return The header in a string;↵
|
43 | */↵ | | 44 | */↵
|
44 | public static String formNotImplemented() {↵ | | 45 | public static String formMethod() {↵
|
45 | return formError("501 Method not implemented", "Service not implemented");↵ | | 46 | return formError("303 Method ↵
|
46 | }↵ | | |
|
|
47 | /**↵ | | |
|
48 | * Server is overloaded, client should try again latter↵ | | 47 | unseported", "Method unseported");↵
|
| | | 48 | }↵
|
|
| | | 49 | /**↵
|
49 | .↵ | | 50 | * Indicates remote copy of the requested object is current.↵
|
50 | * ↵ | | 51 | * ↵
|
51 | * @return The header in a string;↵ | | 52 | * @return The header in a string;↵
|
52 | */↵ | | 53 | */↵
|
53 | public static String formOverloaded() {↵ | | 54 | public static String formNotModified() {↵
|
54 | return formError("502 Server overloaded", "Try again latter");↵ | | 55 | return formError("↵
|
55 | }↵ | | |
|
|
56 | /**↵ | | |
|
57 | * Indicates the request took to long↵ | | 56 | 304 Not modified", "Use local copy");↵
|
| | | 57 | }↵
|
|
| | | 58 | /**↵
|
58 | .↵ | | 59 | * Client not otherized for the request.↵
|
59 | * ↵ | | 60 | * ↵
|
60 | * @return The header in a string;↵ | | 61 | * @return The header in a string;↵
|
61 | */↵ | | 62 | */↵
|
62 | public static String formTimeout() {↵ | | 63 | public static String formUnautorized() {↵
|
63 | return formError("503 Gateway timeout", "The connection timed out");↵ | | 64 | return formError("↵
|
64 | }↵ | | |
|
|
65 | /**↵ | | |
|
66 | * Indicates the client's proxies could not locate a↵ | | 65 | 401 Unathorized", "Unathorized use of this service");↵
|
| | | 66 | }↵
|
|
| | | 67 | /**↵
|
67 | server.↵ | | 68 | * Payment is required for service.↵
|
68 | * ↵ | | 69 | * ↵
|
69 | * @return The header in a string;↵ | | 70 | * @return The header in a string;↵
|
70 | */↵ | | 71 | */↵
|
71 | public static String formServerNotFound() {↵ | | 72 | public static String formPaymentNeeded() {↵
|
72 | return formError("503 Gateway timeout", "The requested server was not found");↵ | | 73 | return formError("402 Payment required", "Payment is required");↵
|
73 | }↵ | | 74 | }↵
|
|
74 | /**↵ | | 75 | /**↵
|
75 | * Indicates the client is not allowed to access the object.↵ | | 76 | * Client if forbidden to get the request service.↵
|
76 | * ↵ | | 77 | * ↵
|
77 | * @return The header in a string;↵ | | 78 | * @return The header in a string;↵
|
78 | */↵ | | 79 | */↵
|
79 | public static String formNotAllowed() {↵ | | 80 | public static String formForbidden() {↵
|
80 | return formError("403 Access Denied", "Access is not allowed");↵ | | 81 | return formError("403 Forbidden", "You need permission for this service");↵
|
81 | | | 82 |
|