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