Class EclipseStoreRestController

java.lang.Object
io.micronaut.eclipsestore.rest.EclipseStoreRestController

@Requires(bean=org.eclipse.store.storage.embedded.types.EmbeddedStorageFoundation.class) @Controller("/${eclipsestore.rest.path:eclipsestore}") public class EclipseStoreRestController extends Object
EclipseStore REST controller for a single StorageManager.
Since:
1.0.0
Author:
Tim Yates
  • Constructor Details

    • EclipseStoreRestController

      public EclipseStoreRestController(EclipseStoreRestService service)
      A default controller to expose the expected EclipseStore REST API per storage manager.
      Parameters:
      service - the service to query EclipseStore via the relevant StorageRestAdapter
  • Method Details

    • getRoot

      @Get("/root") public RootObject getRoot()
      Get the user defined root.
      Returns:
      the root object
    • getRoot

      @Get("/{name}/root") public RootObject getRoot(@PathVariable String name)
      Get the user defined root.
      Parameters:
      name - the name of the storage adapter
      Returns:
      the root object
    • getDictionary

      @Get("/dictionary") public String getDictionary()
      Get storage type dictionary.
      Returns:
      storage type dictionary as a single string
    • getDictionary

      @Get("/{name}/dictionary") public String getDictionary(@PathVariable String name)
      Get storage type dictionary.
      Parameters:
      name - the name of the storage adapter
      Returns:
      storage type dictionary as a single string
    • getObject

      @Get("/object/{oid}") public org.eclipse.store.storage.restadapter.types.ViewerObjectDescription getObject(@PathVariable String oid, @Nullable @QueryValue @Nullable Long valueLength, @Nullable @QueryValue @Nullable Long fixedOffset, @Nullable @QueryValue @Nullable Long fixedLength, @Nullable @QueryValue @Nullable Long variableOffset, @Nullable @QueryValue @Nullable Long variableLength, @Nullable @QueryValue @Nullable Boolean references)
      Get an object by its id.
      Parameters:
      oid - object id of the requested object
      valueLength - limit size of returned value elements to this value
      fixedOffset - index of the first fix sized element to fetch
      fixedLength - number of fix sized elements to be fetched
      variableOffset - index of the first element in variable sized collections to be fetched
      variableLength - number of elements to be fetched from variable sized collections
      references - resolve top level references and return them with this request
      Returns:
      the object
    • getObject

      @Get("/{name}/object/{oid}") public org.eclipse.store.storage.restadapter.types.ViewerObjectDescription getObject(@PathVariable String name, @PathVariable String oid, @Nullable @QueryValue @Nullable Long valueLength, @Nullable @QueryValue @Nullable Long fixedOffset, @Nullable @QueryValue @Nullable Long fixedLength, @Nullable @QueryValue @Nullable Long variableOffset, @Nullable @QueryValue @Nullable Long variableLength, @Nullable @QueryValue @Nullable Boolean references)
      Get an object by its id.
      Parameters:
      name - the name of the storage adapter
      oid - object id of the requested object
      valueLength - limit size of returned value elements to this value
      fixedOffset - index of the first fix sized element to fetch
      fixedLength - number of fix sized elements to be fetched
      variableOffset - index of the first element in variable sized collections to be fetched
      variableLength - number of elements to be fetched from variable sized collections
      references - resolve top level references and return them with this request
      Returns:
      the object
    • getFilesStatistics

      @Get("/maintenance/filesStatistics") public org.eclipse.store.storage.restadapter.types.ViewerStorageFileStatistics getFilesStatistics()
      Get statistics for all storage files.
      Returns:
      the statistics as json
    • getFilesStatistics

      @Get("/{name}/maintenance/filesStatistics") public org.eclipse.store.storage.restadapter.types.ViewerStorageFileStatistics getFilesStatistics(@PathVariable String name)
      Get statistics for all storage files.
      Parameters:
      name - the name of the storage adapter
      Returns:
      the statistics as json