Class Transactions


  • @Scope("prototype")
    @Path("/fcr:tx")
    public class Transactions
    extends FedoraBaseResource
    The rest interface for transaction management. The interfaces allows for creation, commit and rollback of transactions.
    Author:
    awoods, gregjan, mohideen
    • Method Detail

      • getTransactionStatus

        @GET
        @Path("{transactionId}")
        public javax.ws.rs.core.Response getTransactionStatus​(@PathParam("transactionId")
                                                              String txId)
        Get the status of an existing transaction
        Parameters:
        txId - id of the transaction
        Returns:
        204 no content if status retrieved, 410 gone if transaction doesn't exist.
      • refreshTransaction

        @POST
        @Path("{transactionId}")
        public javax.ws.rs.core.Response refreshTransaction​(@PathParam("transactionId")
                                                            String txId)
        Refresh an existing transaction
        Parameters:
        txId - id of the transaction
        Returns:
        204 no content if successfully refreshed, 410 gone if transaction doesn't exist.
      • createTransaction

        @POST
        public javax.ws.rs.core.Response createTransaction()
                                                    throws URISyntaxException
        Create a new transaction resource and add it to the registry
        Returns:
        201 with the transaction id and expiration date
        Throws:
        URISyntaxException - if URI syntax exception occurred
      • commit

        @PUT
        @Path("{transactionId}")
        public javax.ws.rs.core.Response commit​(@PathParam("transactionId")
                                                String txId)
        Commit a transaction resource
        Parameters:
        txId - the transaction id
        Returns:
        204
      • rollback

        @DELETE
        @Path("{transactionId}")
        public javax.ws.rs.core.Response rollback​(@PathParam("transactionId")
                                                  String txId)
        Rollback a transaction
        Parameters:
        txId - the transaction id
        Returns:
        204