Package com.erudika.para.server.rest
Class Api1
java.lang.Object
com.erudika.para.server.rest.Api1
@RestController
@ConditionalOnProperty(value="para.api_enabled",
havingValue="true")
@RequestMapping(value="/v1",
produces="application/json")
public final class Api1
extends Object
This is the main REST API configuration class which defines all endpoints for all resources and the way API request
will be handled. This is API version 1.0.
- Author:
- Alex Bogdanovski [[email protected]]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<?> addConstraint(String type, String field, String cname, jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<?> addConstraintHandler(com.erudika.para.core.App app, String type, String field, String cname, jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody> backup()org.springframework.http.ResponseEntity<org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody> backupHandler(com.erudika.para.core.App app) org.springframework.http.ResponseEntity<?> batchCreate(jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<?> batchCreateHandler(com.erudika.para.core.App app, jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<?> batchDelete(jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<?> batchDeleteHandler(com.erudika.para.core.App app, jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<?> batchPut(jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<?> batchRead(jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<?> batchReadHandler(com.erudika.para.core.App app, jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<?> batchUpdate(jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<?> batchUpdateHandler(com.erudika.para.core.App app, jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<?> checkPermission(String subjectid, String type, String method) org.springframework.http.ResponseEntity<?> checkPermissionHandler(com.erudika.para.core.App app, String subjectid, String type, String method) org.springframework.http.ResponseEntity<?> configOptions(jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<?> org.springframework.http.ResponseEntity<?> createHandler(com.erudika.para.core.App app, String type, jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<?> createLink(String type, String id, String id2) org.springframework.http.ResponseEntity<?> org.springframework.http.ResponseEntity<?> deleteAllLinks(String type, String id, jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<?> deleteHandler(com.erudika.para.core.App app, String type, String id) org.springframework.http.ResponseEntity<?> deleteLink(String type, String id, String type2, String id2, jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<?> deleteSetting(String key) org.springframework.http.ResponseEntity<?> deleteSettingHandler(com.erudika.para.core.App app, String key) org.springframework.http.ResponseEntity<?> org.springframework.http.ResponseEntity<?> getConstraints(String type) org.springframework.http.ResponseEntity<?> getConstraintsHandler(com.erudika.para.core.App app, String type) org.springframework.http.ResponseEntity<?> org.springframework.http.ResponseEntity<?> getPermissions(String subjectid) org.springframework.http.ResponseEntity<?> getPermissionsHandler(com.erudika.para.core.App app, String subjectid) org.springframework.http.ResponseEntity<?> getSetting(String key) org.springframework.http.ResponseEntity<?> getSettingHandler(com.erudika.para.core.App app, String key) org.springframework.http.ResponseEntity<?> org.springframework.http.ResponseEntity<?> grantPermission(String subjectid, String type, jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<?> grantPermissionHandler(com.erudika.para.core.App app, String subjectid, String type, jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<?> health()org.springframework.http.ResponseEntity<?> intro()org.springframework.http.ResponseEntity<?> listTypes(jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<?> listTypesHandler(com.erudika.para.core.App app, jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<?> me(jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<?> newKeys()org.springframework.http.ResponseEntity<?> newKeysHandler(com.erudika.para.core.App app) org.springframework.http.ResponseEntity<?> org.springframework.http.ResponseEntity<?> overwriteHandler(com.erudika.para.core.App app, String type, String id, jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<?> org.springframework.http.ResponseEntity<?> putSetting(String key, jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<?> putSettingHandler(com.erudika.para.core.App app, String key, jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<?> putSettings(jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<?> org.springframework.http.ResponseEntity<?> readHandler(com.erudika.para.core.App app, String type, String id) org.springframework.http.ResponseEntity<?> org.springframework.http.ResponseEntity<?> readIdHandler(com.erudika.para.core.App app, String id) org.springframework.http.ResponseEntity<?> readLink(String type, String id, String type2, String id2, jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<?> readLinksForType(String type, String id, String type2, jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<?> reindex(jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<?> reindexHandler(com.erudika.para.core.App app, jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<?> removeConstraint(String type, String field, String cname) org.springframework.http.ResponseEntity<?> removeConstraintHandler(com.erudika.para.core.App app, String type, String field, String cname) org.springframework.http.ResponseEntity<?> restore(jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<?> restoreHandler(com.erudika.para.core.App app, jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<?> revokeAllPermissions(String subjectid) org.springframework.http.ResponseEntity<?> revokePermission(String subjectid, String type) org.springframework.http.ResponseEntity<?> revokePermissionHandler(com.erudika.para.core.App app, String subjectid, String type) org.springframework.http.ResponseEntity<?> search(jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<?> org.springframework.http.ResponseEntity<?> searchHandler(com.erudika.para.core.App app, String typeParam, String querytype, jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<?> searchType(String type, jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<?> searchType(String type, String querytype, jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<?> searchTypeDefault(String type, jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<?> setup()org.springframework.http.ResponseEntity<?> org.springframework.http.ResponseEntity<?> org.springframework.http.ResponseEntity<?> updateHandler(com.erudika.para.core.App app, String type, String id, jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity<?> utilsHandler(String method, jakarta.servlet.http.HttpServletRequest req)
-
Constructor Details
-
Api1
public Api1()
-
-
Method Details
-
intro
@GetMapping({"","/"}) public org.springframework.http.ResponseEntity<?> intro() -
setup
@GetMapping("/_setup") public org.springframework.http.ResponseEntity<?> setup() -
setup
@GetMapping("/_setup/{appid}") public org.springframework.http.ResponseEntity<?> setup(@PathVariable String appid, jakarta.servlet.http.HttpServletRequest req) -
newKeys
@PostMapping("/_newkeys") public org.springframework.http.ResponseEntity<?> newKeys() -
newKeysHandler
public org.springframework.http.ResponseEntity<?> newKeysHandler(com.erudika.para.core.App app) -
create
@PostMapping("/{type}") public org.springframework.http.ResponseEntity<?> create(@PathVariable String type, jakarta.servlet.http.HttpServletRequest req) throws IOException - Throws:
IOException
-
createHandler
public org.springframework.http.ResponseEntity<?> createHandler(com.erudika.para.core.App app, String type, jakarta.servlet.http.HttpServletRequest req) throws IOException - Throws:
IOException
-
read
-
readHandler
-
update
@PatchMapping("/{type}/{id}") public org.springframework.http.ResponseEntity<?> update(@PathVariable String type, @PathVariable String id, jakarta.servlet.http.HttpServletRequest req) throws IOException - Throws:
IOException
-
updateHandler
public org.springframework.http.ResponseEntity<?> updateHandler(com.erudika.para.core.App app, String type, String id, jakarta.servlet.http.HttpServletRequest req) throws IOException - Throws:
IOException
-
overwrite
@PutMapping("/{type}/{id}") public org.springframework.http.ResponseEntity<?> overwrite(@PathVariable String type, @PathVariable String id, jakarta.servlet.http.HttpServletRequest req) throws IOException - Throws:
IOException
-
overwriteHandler
public org.springframework.http.ResponseEntity<?> overwriteHandler(com.erudika.para.core.App app, String type, String id, jakarta.servlet.http.HttpServletRequest req) throws IOException - Throws:
IOException
-
delete
-
deleteHandler
-
batchCreate
@PostMapping("/_batch") public org.springframework.http.ResponseEntity<?> batchCreate(jakarta.servlet.http.HttpServletRequest req) throws IOException - Throws:
IOException
-
batchPut
@PutMapping("/_batch") public org.springframework.http.ResponseEntity<?> batchPut(jakarta.servlet.http.HttpServletRequest req) throws IOException - Throws:
IOException
-
batchCreateHandler
public org.springframework.http.ResponseEntity<?> batchCreateHandler(com.erudika.para.core.App app, jakarta.servlet.http.HttpServletRequest req) throws IOException - Throws:
IOException
-
batchRead
@GetMapping("/_batch") public org.springframework.http.ResponseEntity<?> batchRead(jakarta.servlet.http.HttpServletRequest req) -
batchReadHandler
public org.springframework.http.ResponseEntity<?> batchReadHandler(com.erudika.para.core.App app, jakarta.servlet.http.HttpServletRequest req) -
batchUpdate
@PatchMapping("_batch") public org.springframework.http.ResponseEntity<?> batchUpdate(jakarta.servlet.http.HttpServletRequest req) throws IOException - Throws:
IOException
-
batchUpdateHandler
public org.springframework.http.ResponseEntity<?> batchUpdateHandler(com.erudika.para.core.App app, jakarta.servlet.http.HttpServletRequest req) throws IOException - Throws:
IOException
-
batchDelete
@DeleteMapping("/_batch") public org.springframework.http.ResponseEntity<?> batchDelete(jakarta.servlet.http.HttpServletRequest req) -
batchDeleteHandler
public org.springframework.http.ResponseEntity<?> batchDeleteHandler(com.erudika.para.core.App app, jakarta.servlet.http.HttpServletRequest req) -
search
@GetMapping("/search") public org.springframework.http.ResponseEntity<?> search(jakarta.servlet.http.HttpServletRequest req) -
search
@GetMapping("/search/{querytype}") public org.springframework.http.ResponseEntity<?> search(@PathVariable String querytype, jakarta.servlet.http.HttpServletRequest req) -
searchType
@GetMapping("/{type}") public org.springframework.http.ResponseEntity<?> searchType(@PathVariable String type, jakarta.servlet.http.HttpServletRequest req) -
searchTypeDefault
@GetMapping("/{type}/search") public org.springframework.http.ResponseEntity<?> searchTypeDefault(@PathVariable String type, jakarta.servlet.http.HttpServletRequest req) -
searchType
-
searchHandler
-
utilsHandler
@GetMapping("/utils/{method}") public org.springframework.http.ResponseEntity<?> utilsHandler(@PathVariable String method, jakarta.servlet.http.HttpServletRequest req) -
listTypes
@GetMapping("/_types") public org.springframework.http.ResponseEntity<?> listTypes(jakarta.servlet.http.HttpServletRequest req) -
listTypesHandler
public org.springframework.http.ResponseEntity<?> listTypesHandler(com.erudika.para.core.App app, jakarta.servlet.http.HttpServletRequest req) -
me
@GetMapping("/_me") public org.springframework.http.ResponseEntity<?> me(jakarta.servlet.http.HttpServletRequest req) -
readId
@GetMapping("/_id/{id}") public org.springframework.http.ResponseEntity<?> readId(@PathVariable String id) -
readIdHandler
public org.springframework.http.ResponseEntity<?> readIdHandler(com.erudika.para.core.App app, String id) -
configOptions
@GetMapping("/_config/options") public org.springframework.http.ResponseEntity<?> configOptions(jakarta.servlet.http.HttpServletRequest req) -
getConstraints
@GetMapping("/_constraints") public org.springframework.http.ResponseEntity<?> getConstraints() -
getConstraints
@GetMapping("/_constraints/{type}") public org.springframework.http.ResponseEntity<?> getConstraints(@PathVariable String type) -
getConstraintsHandler
public org.springframework.http.ResponseEntity<?> getConstraintsHandler(com.erudika.para.core.App app, String type) -
addConstraint
@PutMapping("/_constraints/{type}/{field}/{cname}") public org.springframework.http.ResponseEntity<?> addConstraint(@PathVariable String type, @PathVariable String field, @PathVariable String cname, jakarta.servlet.http.HttpServletRequest req) throws IOException - Throws:
IOException
-
addConstraintHandler
public org.springframework.http.ResponseEntity<?> addConstraintHandler(com.erudika.para.core.App app, String type, String field, String cname, jakarta.servlet.http.HttpServletRequest req) throws IOException - Throws:
IOException
-
removeConstraint
-
removeConstraintHandler
-
getPermissions
@GetMapping("/_permissions") public org.springframework.http.ResponseEntity<?> getPermissions() -
getPermissions
@GetMapping("/_permissions/{subjectid}") public org.springframework.http.ResponseEntity<?> getPermissions(@PathVariable String subjectid) -
getPermissionsHandler
public org.springframework.http.ResponseEntity<?> getPermissionsHandler(com.erudika.para.core.App app, String subjectid) -
checkPermission
-
checkPermissionHandler
-
grantPermission
@PutMapping("/_permissions/{subjectid}/{type}") public org.springframework.http.ResponseEntity<?> grantPermission(@PathVariable String subjectid, @PathVariable String type, jakarta.servlet.http.HttpServletRequest req) throws IOException - Throws:
IOException
-
grantPermissionHandler
public org.springframework.http.ResponseEntity<?> grantPermissionHandler(com.erudika.para.core.App app, String subjectid, String type, jakarta.servlet.http.HttpServletRequest req) throws IOException - Throws:
IOException
-
revokePermission
-
revokeAllPermissions
@DeleteMapping("/_permissions/{subjectid}") public org.springframework.http.ResponseEntity<?> revokeAllPermissions(@PathVariable String subjectid) -
revokePermissionHandler
-
getSettings
@GetMapping("/_settings") public org.springframework.http.ResponseEntity<?> getSettings() -
getSetting
@GetMapping("/_settings/{key}") public org.springframework.http.ResponseEntity<?> getSetting(@PathVariable String key) -
getSettingHandler
public org.springframework.http.ResponseEntity<?> getSettingHandler(com.erudika.para.core.App app, String key) -
putSettings
@PutMapping("/_settings") public org.springframework.http.ResponseEntity<?> putSettings(jakarta.servlet.http.HttpServletRequest req) throws IOException - Throws:
IOException
-
putSetting
@PutMapping("/_settings/{key}") public org.springframework.http.ResponseEntity<?> putSetting(@PathVariable String key, jakarta.servlet.http.HttpServletRequest req) throws IOException - Throws:
IOException
-
putSettingHandler
public org.springframework.http.ResponseEntity<?> putSettingHandler(com.erudika.para.core.App app, String key, jakarta.servlet.http.HttpServletRequest req) throws IOException - Throws:
IOException
-
deleteSetting
@DeleteMapping("/_settings/{key}") public org.springframework.http.ResponseEntity<?> deleteSetting(@PathVariable String key) -
deleteSettingHandler
public org.springframework.http.ResponseEntity<?> deleteSettingHandler(com.erudika.para.core.App app, String key) -
health
@GetMapping("/_health") public org.springframework.http.ResponseEntity<?> health() -
reindex
@PostMapping("/_reindex") public org.springframework.http.ResponseEntity<?> reindex(jakarta.servlet.http.HttpServletRequest req) -
reindexHandler
public org.springframework.http.ResponseEntity<?> reindexHandler(com.erudika.para.core.App app, jakarta.servlet.http.HttpServletRequest req) -
backup
@GetMapping(value="/_export", produces="application/zip") public org.springframework.http.ResponseEntity<org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody> backup() -
backupHandler
public org.springframework.http.ResponseEntity<org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody> backupHandler(com.erudika.para.core.App app) -
restore
@PutMapping(value="/_import", consumes="application/zip") public org.springframework.http.ResponseEntity<?> restore(jakarta.servlet.http.HttpServletRequest req) -
restoreHandler
public org.springframework.http.ResponseEntity<?> restoreHandler(com.erudika.para.core.App app, jakarta.servlet.http.HttpServletRequest req) -
readLink
-
readLinksForType
-
createLink
-
putLink
-
deleteLink
-
deleteAllLinks
-