@Path(value="/parts") public class PartResource extends RestResource
API_KEY_CLIENT_ID, API_KEY_TOKEN, API_KEY_USER, apiClientId, apiToken, apiUser, AUTHENTICATION_PARAM_NAME, hmacHeader, querySessionId, REMOTE_USER_ID, REMOTE_USER_TOKEN, remoteUserId, remoteUserToken, request, sessionId, WOR_PARTNER_TOKEN, worPartnerToken
Constructor and Description |
---|
PartResource() |
Modifier and Type | Method and Description |
---|---|
AttachmentInfo |
addAttachment(long partId,
AttachmentInfo attachment) |
javax.ws.rs.core.Response |
addSample(String partId,
String strainNamePrefix,
PartSample partSample) |
javax.ws.rs.core.Response |
addShotgunSequence(long partId,
InputStream fileInputStream,
org.glassfish.jersey.media.multipart.FormDataContentDisposition contentDispositionHeader) |
javax.ws.rs.core.Response |
addTraceSequence(long partId,
InputStream fileInputStream,
org.glassfish.jersey.media.multipart.FormDataContentDisposition contentDispositionHeader) |
javax.ws.rs.core.Response |
create(String sourceId,
PartData partData)
Creates a new entry.
|
javax.ws.rs.core.Response |
createComment(long partId,
UserComment userComment) |
javax.ws.rs.core.Response |
createLink(String partId,
LinkType type,
PartData partData)
Creates a new link between the referenced part id and the part in the parameter
|
javax.ws.rs.core.Response |
createPartExperiment(String partId,
Study study) |
AccessPermission |
createPermission(String partId,
AccessPermission permission) |
javax.ws.rs.core.Response |
customExport(EntrySelection selection) |
javax.ws.rs.core.Response |
delete(long partId,
long historyId) |
javax.ws.rs.core.Response |
deleteAttachment(long partId,
long attachmentId) |
javax.ws.rs.core.Response |
deleteLink(String partId,
LinkType linkType,
long linkedPart)
Removes the linkId from id
|
javax.ws.rs.core.Response |
deletePartExperiment(String partId,
long experimentId) |
javax.ws.rs.core.Response |
deleteSample(javax.ws.rs.core.UriInfo info,
long partId,
long sampleId) |
javax.ws.rs.core.Response |
deleteSequence(long partId) |
javax.ws.rs.core.Response |
deleteShotgunSequence(javax.ws.rs.core.UriInfo info,
long partId,
long shotgunId) |
javax.ws.rs.core.Response |
deleteTrace(javax.ws.rs.core.UriInfo info,
long partId,
long traceId) |
javax.ws.rs.core.Response |
disablePublicAccess(String partId) |
javax.ws.rs.core.Response |
enablePublicAccess(String partId) |
javax.ws.rs.core.Response |
get(String type)
Retrieves the defaults for the requested entry types.
|
javax.ws.rs.core.Response |
getAllTraces(long partId,
String sid) |
List<AttachmentInfo> |
getAttachments(long partId) |
javax.ws.rs.core.Response |
getAutoAnnotations(long partId,
boolean ownerFeatures) |
List<UserComment> |
getComments(long partId) |
javax.ws.rs.core.Response |
getEntryFolders(String id)
Returns the folders that an entry is contained in (filtered by permissions).
|
javax.ws.rs.core.Response |
getHistory(long partId,
int limit,
int offset,
boolean asc,
String sort) |
javax.ws.rs.core.Response |
getLinkedParts(String partId,
LinkType linkType)
Get linked parts
|
javax.ws.rs.core.Response |
getPartExperiments(String partId) |
javax.ws.rs.core.Response |
getPermissions(String id) |
javax.ws.rs.core.Response |
getSamples(String partId) |
javax.ws.rs.core.Response |
getSequence(String partId,
boolean isRemote,
String remoteUserToken,
String remoteUserId,
long fid) |
ArrayList<ShotgunSequenceDTO> |
getShotgunSequences(javax.ws.rs.core.UriInfo info,
long partId,
int limit,
int start) |
PartStatistics |
getStatistics(long partId) |
PartData |
getTooltipDetails(String id,
boolean isRemote,
long fid)
Retrieves either a remote or local tooltip
|
javax.ws.rs.core.Response |
getTraces(long partId,
int limit,
int start) |
javax.ws.rs.core.Response |
moveToTrash(ArrayList<PartData> list) |
javax.ws.rs.core.Response |
read(String id,
boolean isRemote,
String remoteUserToken,
String remoteUserId,
long fid)
Retrieves a part using any of the unique identifiers.
|
javax.ws.rs.core.Response |
removePermission(String partId,
long permissionId) |
javax.ws.rs.core.Response |
transfer(PartData partData) |
javax.ws.rs.core.Response |
update(long partId,
PartData partData)
Update the part information at the specified resource identifier
|
UserComment |
updateComment(long partId,
long commentId,
UserComment userComment) |
javax.ws.rs.core.Response |
updateEntries(Visibility visibility,
List<Long> entryIds) |
javax.ws.rs.core.Response |
updateSequence(long partId,
boolean add,
FeaturedDNASequence sequence) |
addHeaders, getThisServer, getUserId, getUserId, getWebPartner, log, requireUserId, requireUserIdOrWebPartner, requireWebPartner, respond, respond, respond, respond
@GET @Produces(value="application/json") @Path(value="/{id}") public javax.ws.rs.core.Response read(@PathParam(value="id") String id, @DefaultValue(value="false") @QueryParam(value="remote") boolean isRemote, @QueryParam(value="token") String remoteUserToken, @QueryParam(value="userId") String remoteUserId, @QueryParam(value="folderId") long fid)
@GET @Produces(value="application/json") @Path(value="/defaults/{type}") public javax.ws.rs.core.Response get(@PathParam(value="type") String type)
type
- the type of entry i.e. PLASMID
, PART
, STRAIN
or
ARABIDOPSIS
. Used to retrieve the default values for that entry@GET @Produces(value="application/json") @Path(value="/{id}/folders") public javax.ws.rs.core.Response getEntryFolders(@PathParam(value="id") String id)
id
- unique identifier for entry whose containing folders are being returned@GET @Produces(value="application/json") @Path(value="/{id}/tooltip") public PartData getTooltipDetails(@PathParam(value="id") String id, @DefaultValue(value="false") @QueryParam(value="remote") boolean isRemote, @QueryParam(value="folderId") long fid)
id
- unique identifier for entry whose tooltip is to be retrievedisRemote
- if true, a remote tooltip is being retrieved, false, localfid
- required if isRemote
is true. The remote entry should be shared in this folder@GET @Produces(value="application/json") @Path(value="/{id}/permissions") public javax.ws.rs.core.Response getPermissions(@PathParam(value="id") String id)
@POST @Produces(value="application/json") @Path(value="/{id}/permissions") public AccessPermission createPermission(@PathParam(value="id") String partId, AccessPermission permission)
@DELETE @Produces(value="application/json") @Path(value="/{id}/permissions/{permissionId}") public javax.ws.rs.core.Response removePermission(@PathParam(value="id") String partId, @PathParam(value="permissionId") long permissionId)
@GET @Produces(value="application/json") @Path(value="/{id}/experiments") public javax.ws.rs.core.Response getPartExperiments(@PathParam(value="id") String partId)
@POST @Produces(value="application/json") @Path(value="/{id}/experiments") public javax.ws.rs.core.Response createPartExperiment(@PathParam(value="id") String partId, Study study)
@DELETE @Path(value="/{id}/experiments/{eid}") public javax.ws.rs.core.Response deletePartExperiment(@PathParam(value="id") String partId, @PathParam(value="eid") long experimentId)
@PUT @Produces(value="application/json") @Path(value="/{id}/permissions/public") public javax.ws.rs.core.Response enablePublicAccess(@PathParam(value="id") String partId)
@DELETE @Produces(value="application/json") @Path(value="/{id}/permissions/public") public javax.ws.rs.core.Response disablePublicAccess(@PathParam(value="id") String partId)
@GET @Produces(value="application/json") @Path(value="/{id}/statistics") public PartStatistics getStatistics(@PathParam(value="id") long partId)
@GET @Produces(value="application/json") @Path(value="/{id}/comments") public List<UserComment> getComments(@PathParam(value="id") long partId)
@POST @Produces(value="application/json") @Path(value="/{id}/comments") public javax.ws.rs.core.Response createComment(@PathParam(value="id") long partId, UserComment userComment)
@PUT @Produces(value="application/json") @Path(value="/{id}/comments/{commentId}") public UserComment updateComment(@PathParam(value="id") long partId, @PathParam(value="commentId") long commentId, UserComment userComment)
@POST @Produces(value="application/json") @Consumes(value="application/json") @Path(value="/{id}/attachments") public AttachmentInfo addAttachment(@PathParam(value="id") long partId, AttachmentInfo attachment)
@GET @Produces(value="application/json") @Path(value="/{id}/attachments") public List<AttachmentInfo> getAttachments(@PathParam(value="id") long partId)
@DELETE @Path(value="/{id}/attachments/{attachmentId}") public javax.ws.rs.core.Response deleteAttachment(@PathParam(value="id") long partId, @PathParam(value="attachmentId") long attachmentId)
@GET @Produces(value="application/json") @Path(value="/{id}/history") public javax.ws.rs.core.Response getHistory(@PathParam(value="id") long partId, @QueryParam(value="limit") int limit, @QueryParam(value="offset") int offset, @QueryParam(value="asc") boolean asc, @QueryParam(value="sort") String sort)
@DELETE @Produces(value="application/json") @Path(value="/{id}/history/{historyId}") public javax.ws.rs.core.Response delete(@PathParam(value="id") long partId, @PathParam(value="historyId") long historyId)
@GET @Produces(value="application/json") @Path(value="/{id}/traces") public javax.ws.rs.core.Response getTraces(@PathParam(value="id") long partId, @DefaultValue(value="100") @QueryParam(value="limit") int limit, @DefaultValue(value="0") @QueryParam(value="start") int start)
@GET @Path(value="/{id}/traces/all") @Produces(value="application/octet-stream") public javax.ws.rs.core.Response getAllTraces(@PathParam(value="id") long partId, @QueryParam(value="sid") String sid)
@GET @Produces(value="application/json") @Path(value="/{id}/shotgunsequences") public ArrayList<ShotgunSequenceDTO> getShotgunSequences(@Context javax.ws.rs.core.UriInfo info, @PathParam(value="id") long partId, @DefaultValue(value="100") @QueryParam(value="limit") int limit, @DefaultValue(value="0") @QueryParam(value="start") int start)
@POST @Produces(value="application/json") @Path(value="/{id}/traces") public javax.ws.rs.core.Response addTraceSequence(@PathParam(value="id") long partId, InputStream fileInputStream, org.glassfish.jersey.media.multipart.FormDataContentDisposition contentDispositionHeader)
@POST @Produces(value="application/json") @Path(value="/{id}/shotgunsequences") public javax.ws.rs.core.Response addShotgunSequence(@PathParam(value="id") long partId, InputStream fileInputStream, org.glassfish.jersey.media.multipart.FormDataContentDisposition contentDispositionHeader)
@DELETE @Path(value="/{id}/traces/{traceId}") public javax.ws.rs.core.Response deleteTrace(@Context javax.ws.rs.core.UriInfo info, @PathParam(value="id") long partId, @PathParam(value="traceId") long traceId)
@DELETE @Path(value="/{id}/shotgunsequences/{shotgunId}") public javax.ws.rs.core.Response deleteShotgunSequence(@Context javax.ws.rs.core.UriInfo info, @PathParam(value="id") long partId, @PathParam(value="shotgunId") long shotgunId)
@GET @Produces(value="application/json") @Path(value="/{id}/samples") public javax.ws.rs.core.Response getSamples(@PathParam(value="id") String partId)
@POST @Produces(value="application/json") @Path(value="/{id}/samples") public javax.ws.rs.core.Response addSample(@PathParam(value="id") String partId, @QueryParam(value="strainNamePrefix") String strainNamePrefix, PartSample partSample)
@DELETE @Produces(value="application/json") @Path(value="/{id}/samples/{sampleId}") public javax.ws.rs.core.Response deleteSample(@Context javax.ws.rs.core.UriInfo info, @PathParam(value="id") long partId, @PathParam(value="sampleId") long sampleId)
@GET @Produces(value="application/json") @Path(value="/{id}/sequence") public javax.ws.rs.core.Response getSequence(@PathParam(value="id") String partId, @DefaultValue(value="false") @QueryParam(value="remote") boolean isRemote, @QueryParam(value="token") String remoteUserToken, @QueryParam(value="userId") String remoteUserId, @QueryParam(value="folderId") long fid)
@POST @Produces(value="application/json") @Path(value="/{id}/sequence") public javax.ws.rs.core.Response updateSequence(@PathParam(value="id") long partId, @DefaultValue(value="false") @QueryParam(value="add") boolean add, FeaturedDNASequence sequence)
@DELETE @Path(value="/{id}/sequence") public javax.ws.rs.core.Response deleteSequence(@PathParam(value="id") long partId)
@POST @Consumes(value="application/json") @Produces(value="application/json") public javax.ws.rs.core.Response create(@QueryParam(value="source") String sourceId, PartData partData)
sourceId
parameter is set, the new entry is a copy
of the source id (if found) otherwise the new entry is created from the data contained in the
partData
sourceId
- optional unique identifier for an existing part to copy. If not set, the partData
parameter must be setpartData
- optional data for creating new entry. if not set, then the sourceId
must
be set@PUT @Path(value="/transfer") @Consumes(value="application/json") @Produces(value="application/json") public javax.ws.rs.core.Response transfer(PartData partData)
@PUT @Path(value="/{id}") @Consumes(value="application/json") @Produces(value="application/json") public javax.ws.rs.core.Response update(@PathParam(value="id") long partId, PartData partData)
partId
- unique resource identifier for part being updatedpartData
- data to update part with@POST @Path(value="/trash") @Consumes(value="application/json") public javax.ws.rs.core.Response moveToTrash(ArrayList<PartData> list)
@GET @Path(value="/{id}/links") public javax.ws.rs.core.Response getLinkedParts(@PathParam(value="id") String partId, @DefaultValue(value="CHILD") @QueryParam(value="linkType") LinkType linkType)
partId
- unique identifier for part whose links are to be retrievedPartData
that represent links@DELETE @Path(value="/{id}/links/{linkedId}") public javax.ws.rs.core.Response deleteLink(@PathParam(value="id") String partId, @DefaultValue(value="CHILD") @QueryParam(value="linkType") LinkType linkType, @PathParam(value="linkedId") long linkedPart)
@POST @Path(value="/{id}/links") @Consumes(value="application/json") @Produces(value="application/json") public javax.ws.rs.core.Response createLink(@PathParam(value="id") String partId, @DefaultValue(value="CHILD") @QueryParam(value="linkType") LinkType type, PartData partData)
partId
- part to be linkedpartData
- should essentially just contain the part Id or details for a new entry that should be created@PUT @Consumes(value="application/json") @Produces(value="application/json") public javax.ws.rs.core.Response updateEntries(@QueryParam(value="visibility") Visibility visibility, List<Long> entryIds)
@GET @Path(value="/{id}/annotations/auto") @Produces(value="application/json") public javax.ws.rs.core.Response getAutoAnnotations(@PathParam(value="id") long partId, @QueryParam(value="ownerFeatures") boolean ownerFeatures)
@POST @Path(value="/custom") @Produces(value="application/octet-stream") public javax.ws.rs.core.Response customExport(EntrySelection selection)
Copyright © 2017. All rights reserved.