@RolesAllowed(value="ROLE_tavernauser") @Produces(value={"application/xml","application/json"}) @Consumes(value={"application/xml","application/json"}) public interface TavernaServerDirectoryREST
Modifier and Type | Interface and Description |
---|---|
static class |
TavernaServerDirectoryREST.NegotiationFailedException
Exception thrown to indicate a failure by the client to provide an
acceptable content type.
|
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
destroyDirectoryEntry(List<javax.ws.rs.core.PathSegment> path)
Deletes a file or directory that is in or below the working directory of
a workflow run.
|
DirectoryContents |
getDescription(javax.ws.rs.core.UriInfo ui)
Get the working directory of the workflow run.
|
javax.ws.rs.core.Response |
getDirectoryOrFileContents(List<javax.ws.rs.core.PathSegment> path,
javax.ws.rs.core.UriInfo ui,
javax.ws.rs.core.HttpHeaders headers)
|
javax.ws.rs.core.Response |
makeDirectoryOrUpdateFile(List<javax.ws.rs.core.PathSegment> parent,
MakeOrUpdateDirEntry operation,
javax.ws.rs.core.UriInfo ui)
Creates a directory in the filesystem beneath the working directory of
the workflow run, or creates or updates a file's contents, where that
file is in or below the working directory of a workflow run.
|
javax.ws.rs.core.Response |
options(List<javax.ws.rs.core.PathSegment> path)
Get an outline of the operations supported.
|
javax.ws.rs.core.Response |
setFileContents(List<javax.ws.rs.core.PathSegment> file,
InputStream contents,
javax.ws.rs.core.UriInfo ui)
Creates or updates a file in a particular location beneath the working
directory of the workflow run.
|
javax.ws.rs.core.Response |
setFileContentsFromURL(List<javax.ws.rs.core.PathSegment> file,
List<URI> referenceList,
javax.ws.rs.core.UriInfo ui)
Creates or updates a file in a particular location beneath the working
directory of the workflow run.
|
@GET @Path(value="/") @Nonnull DirectoryContents getDescription(@Nonnull @Context javax.ws.rs.core.UriInfo ui) throws FilesystemAccessException
ui
- About how this method was called.FilesystemAccessException
@OPTIONS @Path(value="{path:.*}") javax.ws.rs.core.Response options(@PathParam(value="path") List<javax.ws.rs.core.PathSegment> path)
@GET @Path(value="{path:.+}") @Produces(value={"application/xml","application/json","application/octet-stream","application/zip","*/*"}) @Nonnull javax.ws.rs.core.Response getDirectoryOrFileContents(@Nonnull @PathParam(value="path") List<javax.ws.rs.core.PathSegment> path, @Nonnull @Context javax.ws.rs.core.UriInfo ui, @Nonnull @Context javax.ws.rs.core.HttpHeaders headers) throws NoDirectoryEntryException, FilesystemAccessException, TavernaServerDirectoryREST.NegotiationFailedException
Directory
or
a File
.path
- The path to the thing to describe.ui
- About how this method was called.headers
- About what the caller was looking for.NoDirectoryEntryException
- If the name of the file or directory can't be looked up.FilesystemAccessException
- If something went wrong during the filesystem operation.TavernaServerDirectoryREST.NegotiationFailedException
- If the content type being downloaded isn't one that this
method can support.@POST @Path(value="{path:.*}") @Nonnull javax.ws.rs.core.Response makeDirectoryOrUpdateFile(@Nonnull @PathParam(value="path") List<javax.ws.rs.core.PathSegment> parent, @Nonnull MakeOrUpdateDirEntry operation, @Nonnull @Context javax.ws.rs.core.UriInfo ui) throws NoUpdateException, FilesystemAccessException, NoDirectoryEntryException
parent
- The directory to create the directory in.operation
- What to call the directory to create.ui
- About how this method was called.NoDirectoryEntryException
- If the name of the containing directory can't be looked up.NoUpdateException
- If the user is not permitted to update the run.FilesystemAccessException
- If something went wrong during the filesystem operation.@POST @Path(value="{path:(.*)}") @Consumes(value="text/uri-list") @Nonnull javax.ws.rs.core.Response setFileContentsFromURL(@PathParam(value="path") List<javax.ws.rs.core.PathSegment> file, List<URI> referenceList, @Context javax.ws.rs.core.UriInfo ui) throws NoDirectoryEntryException, NoUpdateException, FilesystemAccessException
file
- The path to the file to create or update.referenceList
- Location to get the file's contents from. Must be
publicly readable.ui
- About how this method was called.NoDirectoryEntryException
- If the name of the containing directory can't be looked up.NoUpdateException
- If the user is not permitted to update the run.FilesystemAccessException
- If something went wrong during the filesystem operation.@PUT @Path(value="{path:(.*)}") @Consumes(value={"application/octet-stream","*/*"}) @Nonnull javax.ws.rs.core.Response setFileContents(@PathParam(value="path") List<javax.ws.rs.core.PathSegment> file, InputStream contents, @Context javax.ws.rs.core.UriInfo ui) throws NoDirectoryEntryException, NoUpdateException, FilesystemAccessException
file
- The path to the file to create or update.contents
- Stream of bytes to set the file's contents to.ui
- About how this method was called.NoDirectoryEntryException
- If the name of the containing directory can't be looked up.NoUpdateException
- If the user is not permitted to update the run.FilesystemAccessException
- If something went wrong during the filesystem operation.@DELETE @Path(value="{path:.*}") @Nonnull javax.ws.rs.core.Response destroyDirectoryEntry(@PathParam(value="path") List<javax.ws.rs.core.PathSegment> path) throws NoUpdateException, FilesystemAccessException, NoDirectoryEntryException
path
- The path to the file or directory.NoUpdateException
- If the user is not permitted to update the run.FilesystemAccessException
- If something went wrong during the filesystem operation.NoDirectoryEntryException
- If the name of the file or directory can't be looked up.Copyright © 2015–2018 The Apache Software Foundation. All rights reserved.