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 StringThe 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, PATHFields 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 voidProcesses an HTTP DELETE request.protected voidProcesses an HTTP GET request.protected voidProcesses an HTTP OPTIONS request.protected voidProcesses an HTTP PATCH request.protected voidProcesses an HTTP POST request.protected voidProcesses 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, sessionMethods inherited from class org.rapidcontext.core.storage.StorableObject
activate, activatedTime, destroy, dictKey, 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:
methodsImplin classWebService- Parameters:
request- the request to check- Returns:
- the array of HTTP method names supported
- See Also:
-
doOptions
Processes an HTTP OPTIONS request.- Overrides:
doOptionsin classWebService- Parameters:
request- the request to process
-
doGet
Processes an HTTP GET request.- Overrides:
doGetin classWebService- Parameters:
request- the request to process
-
doPatch
Processes an HTTP PATCH request.- Overrides:
doPatchin classWebService- Parameters:
request- the request to process
-
doPost
Processes an HTTP POST request.- Overrides:
doPostin classWebService- Parameters:
request- the request to process
-
doPut
Processes an HTTP PUT request.- Overrides:
doPutin classWebService- Parameters:
request- the request to process
-
doDelete
Processes an HTTP DELETE request.- Overrides:
doDeletein classWebService- Parameters:
request- the request to process
-