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