Package org.rapidcontext.app.web
Class StorageWebService
java.lang.Object
org.rapidcontext.core.storage.StorableObject
org.rapidcontext.core.type.WebService
org.rapidcontext.app.web.StorageWebService
- All Implemented Interfaces:
HttpUtil
A storage API web service. This service is used for accessing the
raw data storage through HTTP and provides a view of the
storage hierarchy similar to a file system.
- Version:
- 1.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.rapidcontext.util.HttpUtil
HttpUtil.HEADER, HttpUtil.Helper, HttpUtil.METHOD, HttpUtil.STATUS
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The HTML file extension.static final String[]
The HTTP methods supported by this web service.Fields inherited from class org.rapidcontext.core.type.WebService
KEY_DESCRIPTION, KEY_MATCH, matchers, METHODS_GET, METHODS_GET_POST, METHODS_POST, PATH
Fields inherited from class org.rapidcontext.core.storage.StorableObject
dict, KEY_ACTIVATED_TIME, KEY_CLASSNAME, KEY_ID, KEY_TYPE, PREFIX_COMPUTED, PREFIX_HIDDEN
-
Constructor Summary
ConstructorsConstructorDescriptionStorageWebService
(String id, String type, Dict dict) Creates a new storage web service from a serialized representation. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Processes an HTTP DELETE request.protected void
Processes an HTTP GET request.protected void
Processes an HTTP OPTIONS request.protected void
Processes an HTTP PATCH request.protected void
Processes an HTTP POST request.protected void
Processes an HTTP PUT request.protected String[]
methodsImpl
(Request request) Returns the HTTP methods implemented for the specified request.Methods inherited from class org.rapidcontext.core.type.WebService
all, description, doHead, doTrace, errorBadRequest, errorForbidden, errorInternal, errorMethodNotAllowed, errorNotFound, errorUnauthorized, headerAllow, init, matchers, methods, process, session
Methods inherited from class org.rapidcontext.core.storage.StorableObject
activate, activatedTime, destroy, id, isActive, isModified, passivate, path, serialize, sterilize, toString, type
-
Field Details
-
METHODS
The HTTP methods supported by this web service. -
EXT_HTML
The HTML file extension.- See Also:
-
-
Constructor Details
-
StorageWebService
Creates a new storage web service from a serialized representation.- Parameters:
id
- the object identifiertype
- the object type namedict
- the serialized representation
-
-
Method Details
-
methodsImpl
Returns the HTTP methods implemented for the specified request. The OPTIONS or HEAD methods doesn't have to be added to the result (added automatically later).- Specified by:
methodsImpl
in classWebService
- Parameters:
request
- the request to check- Returns:
- the array of HTTP method names supported
- See Also:
-
doOptions
Processes an HTTP OPTIONS request.- Overrides:
doOptions
in classWebService
- Parameters:
request
- the request to process
-
doGet
Processes an HTTP GET request.- Overrides:
doGet
in classWebService
- Parameters:
request
- the request to process
-
doPatch
Processes an HTTP PATCH request.- Overrides:
doPatch
in classWebService
- Parameters:
request
- the request to process
-
doPost
Processes an HTTP POST request.- Overrides:
doPost
in classWebService
- Parameters:
request
- the request to process
-
doPut
Processes an HTTP PUT request.- Overrides:
doPut
in classWebService
- Parameters:
request
- the request to process
-
doDelete
Processes an HTTP DELETE request.- Overrides:
doDelete
in classWebService
- Parameters:
request
- the request to process
-