Class WebApplicationResource
- java.lang.Object
-
- fr.gouv.vitam.common.server.application.resources.ApplicationStatusResource
-
- fr.gouv.vitam.ihmrecette.appserver.WebApplicationResource
-
@Path("/v1/api") public class WebApplicationResource extends ApplicationStatusResourceWeb Application Resource class
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_CONTRACT_NAME-
Fields inherited from class fr.gouv.vitam.common.server.application.resources.ApplicationStatusResource
STATUS_URL, TENANTS_URL
-
-
Constructor Summary
Constructors Constructor Description WebApplicationResource(WebApplicationConfig webApplicationConfigonfig, UserInterfaceTransactionManager userInterfaceTransactionManager, PaginationHelper paginationHelper, DslQueryHelper dslQueryHelper, StorageService storageService)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description javax.ws.rs.core.ResponsecheckAccessRequestStatus(java.lang.String xTenantId, java.lang.String strategyId, java.lang.String offerId, java.lang.String accessRequestId)Check the status of the Access Request @accessRequestId.javax.ws.rs.core.ResponsecreateAccessRequest(java.lang.String xTenantId, java.lang.String strategyId, java.lang.String offerId, java.lang.String dataType, java.lang.String uid)Create an access request for the given offerId, dataType and uid.javax.ws.rs.core.ResponsedeleteObject(java.lang.String xTenantId, java.lang.String uid, java.lang.String dataType, java.lang.String strategyId, java.lang.String offerId)voiddownloadObjectAsStream(java.lang.String operationId, javax.ws.rs.container.AsyncResponse asyncResponse, java.lang.String xTenantId)voiddownloadObjectAsStreamForBrowser(java.lang.String operationId, javax.ws.rs.container.AsyncResponse asyncResponse, java.lang.Integer tenantId)This method exist only to download a file with a browserjavax.ws.rs.core.ResponsefindAccessContract(javax.servlet.http.HttpServletRequest request, java.lang.String select)Query to get Access contractsjavax.ws.rs.core.ResponsegetAndExecuteTestRequest(javax.servlet.http.HttpServletRequest request, java.lang.String sessionId, com.fasterxml.jackson.databind.JsonNode criteria)javax.ws.rs.core.ResponsegetLogbookMessages()Retrieve all the messages for logbookjavax.ws.rs.core.ResponsegetLogbookResult(javax.servlet.http.HttpServletRequest request, java.lang.String sessionId, java.lang.String options)this method is used to request logbook with the Vitam DSLjavax.ws.rs.core.ResponsegetLogbookResultByBrowser(javax.servlet.http.HttpServletRequest request, java.lang.String xhttpOverride, java.lang.String sessionId, java.lang.String options)Post used because Angular not support Get with bodyjavax.ws.rs.core.ResponsegetLogbookResultById(java.lang.String operationId, java.lang.String xTenantId)javax.ws.rs.core.ResponsegetLogbookStatistics(java.lang.String operationId)Generates the logbook operation statistics file (cvs format) relative to the operation parameterjavax.ws.rs.core.ResponsegetObjectAsInputStreamAsync(java.lang.String xTenantId, java.lang.String uid, java.lang.String dataType, java.lang.String strategyId, java.lang.String offerId)Retrieve an Object data as an input stream.javax.ws.rs.core.ResponsegetSecureMode()Return authentication modejavax.ws.rs.core.ResponsegetStrategies(java.lang.String xTenantId)javax.ws.rs.core.ResponselaunchAudit(java.lang.String xTenantId, java.lang.String xAccessContratId, java.lang.String operationId)Deprecated.javax.ws.rs.core.ResponselaunchIngestCleanup(java.lang.String xTenantId, java.lang.String xAccessContratId, java.lang.String operationId)javax.ws.rs.core.Responselogin(javax.servlet.http.HttpServletRequest httpRequest, com.fasterxml.jackson.databind.JsonNode object)javax.ws.rs.core.ResponseremoveAccessRequest(java.lang.String xTenantId, java.lang.String strategyId, java.lang.String offerId, java.lang.String accessRequestId)Remove the access request @accessRequestId.javax.ws.rs.core.ResponsestorageLogBackup(java.lang.String xTenantId)launch the traceabiity for storagejavax.ws.rs.core.Responsetraceability(java.lang.String xTenantId)javax.ws.rs.core.ResponsetraceabilityLfcObjectGroup(java.lang.String xTenantId)launch the traceability for object group lifecyclesjavax.ws.rs.core.ResponsetraceabilityLfcUnit(java.lang.String xTenantId)launch the traceability for unit lifecyclesjavax.ws.rs.core.ResponsetraceabilityStorage(java.lang.String xTenantId)launch the traceabiity for storagejavax.ws.rs.core.ResponseupdateLinksBetweenAU(javax.servlet.http.HttpServletRequest request, java.lang.String select)Update link between 2 AU send in the select requestjavax.ws.rs.core.ResponseuploadObject(java.lang.String xTenantId, java.lang.String uid, java.lang.String dataType, java.lang.String strategyId, java.lang.String offerId, java.lang.Long size, java.io.InputStream input)-
Methods inherited from class fr.gouv.vitam.common.server.application.resources.ApplicationStatusResource
getServerTenants, status
-
-
-
-
Field Detail
-
DEFAULT_CONTRACT_NAME
public static final java.lang.String DEFAULT_CONTRACT_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WebApplicationResource
public WebApplicationResource(WebApplicationConfig webApplicationConfigonfig, UserInterfaceTransactionManager userInterfaceTransactionManager, PaginationHelper paginationHelper, DslQueryHelper dslQueryHelper, StorageService storageService)
Constructor- Parameters:
webApplicationConfigonfig- configuration
-
-
Method Detail
-
uploadObject
@POST @Path("/replaceObject/{dataType}/{strategyId}/{offerId}/{uid}/{size}") @Consumes("application/octet-stream") @Produces("application/json") public javax.ws.rs.core.Response uploadObject(@HeaderParam("X-Tenant-Id") java.lang.String xTenantId, @PathParam("uid") java.lang.String uid, @PathParam("dataType") java.lang.String dataType, @PathParam("strategyId") java.lang.String strategyId, @PathParam("offerId") java.lang.String offerId, @PathParam("size") java.lang.Long size, java.io.InputStream input)- Parameters:
xTenantId- xtenantuid- uiddataType- data- Returns:
-
getStrategies
@GET @Path("/strategies") @Produces("application/json") public javax.ws.rs.core.Response getStrategies(@HeaderParam("X-Tenant-Id") java.lang.String xTenantId)- Parameters:
xTenantId- xtenant- Returns:
- list of strategies
-
deleteObject
@DELETE @Path("/deleteObject/{dataType}/{strategyId}/{offerId}/{uid}") @Produces("application/json") public javax.ws.rs.core.Response deleteObject(@HeaderParam("X-Tenant-Id") java.lang.String xTenantId, @PathParam("uid") java.lang.String uid, @PathParam("dataType") java.lang.String dataType, @PathParam("strategyId") java.lang.String strategyId, @PathParam("offerId") java.lang.String offerId)- Parameters:
xTenantId- xtenantuid- uiddataType- data- Returns:
-
launchAudit
@POST @Path("/launchAudit/{operationId}") @Consumes("application/json") @Produces("application/json") @Deprecated public javax.ws.rs.core.Response launchAudit(@HeaderParam("X-Tenant-Id") java.lang.String xTenantId, @HeaderParam("X-Access-Contract-Id") java.lang.String xAccessContratId, @PathParam("operationId") java.lang.String operationId)Deprecated.launch Rectification audit from recette- Parameters:
xTenantId- xTenantIdoperationId- operationId- Returns:
-
launchIngestCleanup
@POST @Path("/ingestcleanup/{operationId}") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response launchIngestCleanup(@HeaderParam("X-Tenant-Id") java.lang.String xTenantId, @HeaderParam("X-Access-Contract-Id") java.lang.String xAccessContratId, @PathParam("operationId") java.lang.String operationId)
-
getObjectAsInputStreamAsync
@GET @Path("/download/{strategyId}/{offerId}/{dataType}/{uid}") @Produces("application/octet-stream") public javax.ws.rs.core.Response getObjectAsInputStreamAsync(@HeaderParam("X-Tenant-Id") java.lang.String xTenantId, @PathParam("uid") java.lang.String uid, @PathParam("dataType") java.lang.String dataType, @PathParam("strategyId") java.lang.String strategyId, @PathParam("offerId") java.lang.String offerId)Retrieve an Object data as an input stream. Download by access.
-
createAccessRequest
@POST @Path("/access-request/{strategyId}/{offerId}/{dataType}/{uid}") @Produces("application/json") public javax.ws.rs.core.Response createAccessRequest(@HeaderParam("X-Tenant-Id") java.lang.String xTenantId, @PathParam("strategyId") java.lang.String strategyId, @PathParam("offerId") java.lang.String offerId, @PathParam("dataType") java.lang.String dataType, @PathParam("uid") java.lang.String uid)Create an access request for the given offerId, dataType and uid.
-
checkAccessRequestStatus
@GET @Path("/access-request/{strategyId}/{offerId}/{accessRequestId}") @Consumes("application/json") public javax.ws.rs.core.Response checkAccessRequestStatus(@HeaderParam("X-Tenant-Id") java.lang.String xTenantId, @PathParam("strategyId") java.lang.String strategyId, @PathParam("offerId") java.lang.String offerId, @PathParam("accessRequestId") java.lang.String accessRequestId)Check the status of the Access Request @accessRequestId.
-
removeAccessRequest
@DELETE @Path("/access-request/{strategyId}/{offerId}/{accessRequestId}") @Consumes("application/json") public javax.ws.rs.core.Response removeAccessRequest(@HeaderParam("X-Tenant-Id") java.lang.String xTenantId, @PathParam("strategyId") java.lang.String strategyId, @PathParam("offerId") java.lang.String offerId, @PathParam("accessRequestId") java.lang.String accessRequestId)Remove the access request @accessRequestId.
-
getLogbookMessages
@GET @Path("/messages/logbook") @Produces("application/json") public javax.ws.rs.core.Response getLogbookMessages()Retrieve all the messages for logbook- Returns:
- Response
-
login
@POST @Path("login") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response login(@Context javax.servlet.http.HttpServletRequest httpRequest, com.fasterxml.jackson.databind.JsonNode object)- Parameters:
object- user credentials- Returns:
- Response OK if login success
-
getLogbookStatistics
@GET @Path("/stat/{id_op}") @Produces("text/plain") public javax.ws.rs.core.Response getLogbookStatistics(@PathParam("id_op") java.lang.String operationId)Generates the logbook operation statistics file (cvs format) relative to the operation parameter- Parameters:
operationId- logbook oeration id- Returns:
- the statistics file (csv format)
-
getSecureMode
@GET @Path("/securemode") @Produces("application/json") public javax.ws.rs.core.Response getSecureMode()Return authentication mode- Returns:
- liste of authentication mode
-
traceability
@POST @Path("/operations/traceability") @Produces("application/json") public javax.ws.rs.core.Response traceability(@HeaderParam("X-Tenant-Id") java.lang.String xTenantId) throws LogbookClientServerException- Parameters:
xTenantId- the tenant id- Returns:
- the response of the request
- Throws:
LogbookClientServerException- if logbook internal resources exception occurred
-
traceabilityLfcUnit
@POST @Path("/lifecycles/units/traceability") @Produces("application/json") public javax.ws.rs.core.Response traceabilityLfcUnit(@HeaderParam("X-Tenant-Id") java.lang.String xTenantId) throws LogbookClientServerExceptionlaunch the traceability for unit lifecycles- Parameters:
xTenantId- the tenant id- Returns:
- the response of the request
- Throws:
LogbookClientServerException- if logbook internal resources exception occurred
-
traceabilityLfcObjectGroup
@POST @Path("/lifecycles/objectgroups/traceability") @Produces("application/json") public javax.ws.rs.core.Response traceabilityLfcObjectGroup(@HeaderParam("X-Tenant-Id") java.lang.String xTenantId) throws LogbookClientServerExceptionlaunch the traceability for object group lifecycles- Parameters:
xTenantId- the tenant id- Returns:
- the response of the request
- Throws:
LogbookClientServerException- if logbook internal resources exception occurred
-
traceabilityStorage
@POST @Path("/storages/traceability") @Produces("application/json") public javax.ws.rs.core.Response traceabilityStorage(@HeaderParam("X-Tenant-Id") java.lang.String xTenantId)launch the traceabiity for storage- Parameters:
xTenantId- the tenant id- Returns:
- the response of the request
- Throws:
LogbookClientServerException- if logbook internal resources exception occurred
-
storageLogBackup
@POST @Path("storages/storagelogbackup") @Produces("application/json") public javax.ws.rs.core.Response storageLogBackup(@HeaderParam("X-Tenant-Id") java.lang.String xTenantId)launch the traceabiity for storage- Parameters:
xTenantId- the tenant id- Returns:
- the response of the request
- Throws:
LogbookClientServerException- if logbook internal resources exception occurred
-
getLogbookResultByBrowser
@POST @Path("/logbooks") @Produces("application/json") public javax.ws.rs.core.Response getLogbookResultByBrowser(@Context javax.servlet.http.HttpServletRequest request, @HeaderParam("X-Http-Method-Override") java.lang.String xhttpOverride, @CookieParam("JSESSIONID") java.lang.String sessionId, java.lang.String options)Post used because Angular not support Get with body- Parameters:
request- the requestxhttpOverride- the use of http override POST methodsessionId- the id of sessionoptions- the option for creating query to find logbook- Returns:
- Response
-
updateLinksBetweenAU
@POST @Path("/updateLinks") @Produces("application/json") public javax.ws.rs.core.Response updateLinksBetweenAU(@Context javax.servlet.http.HttpServletRequest request, java.lang.String select)Update link between 2 AU send in the select request- Parameters:
request- the HTTP request and all its contextselect- select query with the following structure: {parentId: 'id', childId: 'id', action: 'ADD/DELETE'}
-
getLogbookResult
@GET @Path("/logbooks") @Produces("application/json") public javax.ws.rs.core.Response getLogbookResult(@Context javax.servlet.http.HttpServletRequest request, @CookieParam("JSESSIONID") java.lang.String sessionId, java.lang.String options)this method is used to request logbook with the Vitam DSL- Parameters:
request- request httpsessionId- using for paginationoptions- JSON object representing the Vitam DSL query- Returns:
- Response
-
getLogbookResultById
@GET @Path("/logbooks/{idOperation}") @Produces("application/json") public javax.ws.rs.core.Response getLogbookResultById(@PathParam("idOperation") java.lang.String operationId, @HeaderParam("X-Tenant-Id") java.lang.String xTenantId)- Parameters:
operationId- id of operationxTenantId- the tenant id- Returns:
- Response
-
downloadObjectAsStream
@GET @Path("/logbooks/{idOperation}") @Produces("application/octet-stream") public void downloadObjectAsStream(@PathParam("idOperation") java.lang.String operationId, @Suspended javax.ws.rs.container.AsyncResponse asyncResponse, @QueryParam("X-Tenant-Id") java.lang.String xTenantId)- Parameters:
operationId- the operation idasyncResponse- the asynchronized responsexTenantId- the tenant id
-
downloadObjectAsStreamForBrowser
@GET @Path("/logbooks/{idOperation}/content") @Produces("application/octet-stream") public void downloadObjectAsStreamForBrowser(@PathParam("idOperation") java.lang.String operationId, @Suspended javax.ws.rs.container.AsyncResponse asyncResponse, @QueryParam("X-Tenant-Id") java.lang.Integer tenantId)This method exist only to download a file with a browser- Parameters:
operationId- the operation idasyncResponse- the asynchronized responsetenantId- the working tenant
-
findAccessContract
@POST @Path("/accesscontracts") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response findAccessContract(@Context javax.servlet.http.HttpServletRequest request, java.lang.String select)Query to get Access contracts- Parameters:
request- HTTP requestselect- the query to find access contracts- Returns:
- Response
-
getAndExecuteTestRequest
@POST @Path("/dslQueryTest") @Produces("application/json") public javax.ws.rs.core.Response getAndExecuteTestRequest(@Context javax.servlet.http.HttpServletRequest request, @CookieParam("JSESSIONID") java.lang.String sessionId, com.fasterxml.jackson.databind.JsonNode criteria)
-
-