Class WebApplicationResource
java.lang.Object
fr.gouv.vitam.common.server.application.resources.ApplicationStatusResource
fr.gouv.vitam.ihmrecette.appserver.WebApplicationResource
Web Application Resource class
-
Field Summary
FieldsFields inherited from class fr.gouv.vitam.common.server.application.resources.ApplicationStatusResource
STATUS_URL, TENANTS_URL -
Constructor Summary
ConstructorsConstructorDescriptionWebApplicationResource(WebApplicationConfig webApplicationConfigonfig, UserInterfaceTransactionManager userInterfaceTransactionManager, PaginationHelper paginationHelper, DslQueryHelper dslQueryHelper, StorageService storageService) Constructor -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.ResponsecheckAccessRequestStatus(String xTenantId, String strategyId, String offerId, String accessRequestId) Check the status of the Access Request @accessRequestId.javax.ws.rs.core.ResponsecreateAccessRequest(String xTenantId, String strategyId, String offerId, String dataType, String uid) Create an access request for the given offerId, dataType and uid.javax.ws.rs.core.ResponsevoiddownloadObjectAsStream(String operationId, javax.ws.rs.container.AsyncResponse asyncResponse, String xTenantId) voiddownloadObjectAsStreamForBrowser(String operationId, javax.ws.rs.container.AsyncResponse asyncResponse, Integer tenantId) This method exist only to download a file with a browserjavax.ws.rs.core.ResponsefindAccessContract(javax.servlet.http.HttpServletRequest request, String select) Query to get Access contractsjavax.ws.rs.core.ResponsegetAndExecuteTestRequest(javax.servlet.http.HttpServletRequest request, String sessionId, com.fasterxml.jackson.databind.JsonNode criteria) javax.ws.rs.core.ResponseRetrieve all the messages for logbookjavax.ws.rs.core.ResponsegetLogbookResult(javax.servlet.http.HttpServletRequest request, String sessionId, String options) this method is used to request logbook with the Vitam DSLjavax.ws.rs.core.ResponsegetLogbookResultByBrowser(javax.servlet.http.HttpServletRequest request, String xhttpOverride, String sessionId, String options) Post used because Angular not support Get with bodyjavax.ws.rs.core.ResponsegetLogbookResultById(String operationId, String xTenantId) javax.ws.rs.core.ResponsegetLogbookStatistics(String operationId) Generates the logbook operation statistics file (cvs format) relative to the operation parameterjavax.ws.rs.core.ResponsegetObjectAsInputStreamAsync(String xTenantId, String uid, String dataType, String strategyId, String offerId) Retrieve an Object data as an input stream.javax.ws.rs.core.ResponseReturn authentication modejavax.ws.rs.core.ResponsegetStrategies(String xTenantId) javax.ws.rs.core.ResponselaunchAudit(String xTenantId, String xAccessContratId, String operationId) Deprecated.javax.ws.rs.core.ResponselaunchIngestCleanup(String xTenantId, String xAccessContratId, String operationId) javax.ws.rs.core.Responselogin(javax.servlet.http.HttpServletRequest httpRequest, com.fasterxml.jackson.databind.JsonNode object) javax.ws.rs.core.ResponseremoveAccessRequest(String xTenantId, String strategyId, String offerId, String accessRequestId) Remove the access request @accessRequestId.javax.ws.rs.core.ResponsestorageLogBackup(String xTenantId) launch the traceabiity for storagejavax.ws.rs.core.Responsetraceability(String xTenantId) javax.ws.rs.core.ResponsetraceabilityLfcObjectGroup(String xTenantId) launch the traceability for object group lifecyclesjavax.ws.rs.core.ResponsetraceabilityLfcUnit(String xTenantId) launch the traceability for unit lifecyclesjavax.ws.rs.core.ResponsetraceabilityStorage(String xTenantId) launch the traceabiity for storagejavax.ws.rs.core.ResponseupdateLinksBetweenAU(javax.servlet.http.HttpServletRequest request, String select) Update link between 2 AU send in the select requestjavax.ws.rs.core.ResponseuploadObject(String xTenantId, String uid, String dataType, String strategyId, String offerId, Long size, InputStream input) Methods inherited from class fr.gouv.vitam.common.server.application.resources.ApplicationStatusResource
getServerTenants, status
-
Field Details
-
DEFAULT_CONTRACT_NAME
- See Also:
-
-
Constructor Details
-
WebApplicationResource
public WebApplicationResource(WebApplicationConfig webApplicationConfigonfig, UserInterfaceTransactionManager userInterfaceTransactionManager, PaginationHelper paginationHelper, DslQueryHelper dslQueryHelper, StorageService storageService) Constructor- Parameters:
webApplicationConfigonfig- configuration
-
-
Method Details
-
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") String xTenantId, @PathParam("uid") String uid, @PathParam("dataType") String dataType, @PathParam("strategyId") String strategyId, @PathParam("offerId") String offerId, @PathParam("size") Long size, 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") 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") String xTenantId, @PathParam("uid") String uid, @PathParam("dataType") String dataType, @PathParam("strategyId") String strategyId, @PathParam("offerId") 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") String xTenantId, @HeaderParam("X-Access-Contract-Id") String xAccessContratId, @PathParam("operationId") 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") String xTenantId, @HeaderParam("X-Access-Contract-Id") String xAccessContratId, @PathParam("operationId") 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") String xTenantId, @PathParam("uid") String uid, @PathParam("dataType") String dataType, @PathParam("strategyId") String strategyId, @PathParam("offerId") 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") String xTenantId, @PathParam("strategyId") String strategyId, @PathParam("offerId") String offerId, @PathParam("dataType") String dataType, @PathParam("uid") 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") String xTenantId, @PathParam("strategyId") String strategyId, @PathParam("offerId") String offerId, @PathParam("accessRequestId") 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") String xTenantId, @PathParam("strategyId") String strategyId, @PathParam("offerId") String offerId, @PathParam("accessRequestId") 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") 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") 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") String xTenantId) throws LogbookClientServerException launch 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") String xTenantId) throws LogbookClientServerException launch 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") 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") 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") String xhttpOverride, @CookieParam("JSESSIONID") String sessionId, 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, 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") String sessionId, 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") String operationId, @HeaderParam("X-Tenant-Id") 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") String operationId, @Suspended javax.ws.rs.container.AsyncResponse asyncResponse, @QueryParam("X-Tenant-Id") 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") String operationId, @Suspended javax.ws.rs.container.AsyncResponse asyncResponse, @QueryParam("X-Tenant-Id") 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, 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") String sessionId, com.fasterxml.jackson.databind.JsonNode criteria)
-