001/*
002 * The contents of this file are subject to the license and copyright
003 * detailed in the LICENSE and NOTICE files at the root of the source
004 * tree.
005 */
006package org.fcrepo.http.commons.session;
007
008import static java.time.format.DateTimeFormatter.RFC_1123_DATE_TIME;
009import static org.fcrepo.kernel.api.FedoraTypes.FCR_TX;
010
011import java.time.ZoneId;
012import java.time.format.DateTimeFormatter;
013
014/**
015 * Constants related to transactions in HTTP requests
016 *
017 * @author bbpennel
018 */
019public class TransactionConstants {
020
021    /**
022     * Private constructor
023     */
024    private TransactionConstants() {
025    }
026
027    public static final String ATOMIC_ID_HEADER = "Atomic-ID";
028
029    public static final String ATOMIC_EXPIRES_HEADER = "Atomic-Expires";
030
031    public static final String TX_PREFIX = FCR_TX + "/";
032
033    public static final String TX_NS = "http://fedora.info/definitions/v4/transaction#";
034
035    public static final String TX_ENDPOINT_REL = TX_NS + "endpoint";
036
037    public static final String TX_COMMIT_REL = TX_NS + "commitEndpoint";
038
039    public static final DateTimeFormatter EXPIRES_RFC_1123_FORMATTER = RFC_1123_DATE_TIME.withZone(ZoneId.of("UTC"));
040}