Interface IFileHosting

All Known Subinterfaces:
IInternalBMFileSystem

@Path("/filehosting/{domainUid}") public interface IFileHosting
  • Method Details

    • getConfiguration

      @GET @Path("_config") Configuration getConfiguration() throws ServerFault
      Retrieves the configuration
      Returns:
      the Filehosting service configuration
      Throws:
      ServerFault - common error object
    • list

      @GET @Path("_list") List<FileHostingItem> list(@QueryParam("path") String path) throws ServerFault
      Lists files and folders. The listing contains only non-recursive items
      Parameters:
      path - the folder path
      Returns:
      the files and folders found under this path
      Throws:
      ServerFault - common error object
    • find

      @GET @Path("_find") List<FileHostingItem> find(@QueryParam("query") String query) throws ServerFault
      Finds items in the file hosting repository
      Parameters:
      query - the query. The format of the query is repository dependent
      Returns:
      all items matching the query
      Throws:
      ServerFault - common error object
    • exists

      @GET @Path("{path}/_exists") boolean exists(@PathParam("path") String path) throws ServerFault
      Checks if a file exists
      Parameters:
      path - the relative path to the document
      Returns:
      true if the file exists, false otherwise
      Throws:
      ServerFault - common error object
    • get

      @GET @Path("{path}/_content") Stream get(@PathParam("path") String path) throws ServerFault
      Retrieves a document from the file hosting repository
      Parameters:
      path - the relative path to the document
      Returns:
      the document data
      Throws:
      ServerFault - common error object
    • share

      @GET @Path("_share") FileHostingPublicLink share(@QueryParam("path") String path, @QueryParam("downloadLimit") Integer downloadLimit, @QueryParam("expirationDate") String expirationDate) throws ServerFault
      Retrieves a public URL to the document in the file hosting repository
      Parameters:
      path - the relative path to the document
      downloadLimit - the number of times the file can be downloaded, invalid input: '<'= 0 if unlimited
      expirationDate - a ISO-8601 compliant date, null otherwise
      Returns:
      the URL pointing to this document
      Throws:
      ServerFault - common error object
    • unShare

      @DELETE @Path("{url}/unshare") void unShare(@PathParam("url") String url) throws ServerFault
      Remove a public link
      Parameters:
      url - the share url
      Throws:
      ServerFault - common error object
    • store

      @PUT @Path("{path}") void store(@PathParam("path") String path, Stream document) throws ServerFault
      Update/insert a document
      Parameters:
      path - the relative path in the file hosting repository
      document - the document data
      Throws:
      ServerFault - common error object
    • delete

      @DELETE @Path("{path}") void delete(@PathParam("path") String path) throws ServerFault
      Deletes a document
      Parameters:
      path - the relative path in the file hosting repository
      Throws:
      ServerFault - common error object
    • info

      @GET @Path("_info") FileHostingInfo info() throws ServerFault
      Retrieves informations about the filehosting implementation
      Throws:
      ServerFault - common error object