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