001: /**
002: * Copyright (c) 2007, Aberystwyth University
003: *
004: * All rights reserved.
005: *
006: * Redistribution and use in source and binary forms, with or without
007: * modification, are permitted provided that the following conditions
008: * are met:
009: *
010: * - Redistributions of source code must retain the above
011: * copyright notice, this list of conditions and the
012: * following disclaimer.
013: *
014: * - Redistributions in binary form must reproduce the above copyright
015: * notice, this list of conditions and the following disclaimer in
016: * the documentation and/or other materials provided with the
017: * distribution.
018: *
019: * - Neither the name of the Centre for Advanced Software and
020: * Intelligent Systems (CASIS) nor the names of its
021: * contributors may be used to endorse or promote products derived
022: * from this software without specific prior written permission.
023: *
024: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
025: * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
026: * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
027: * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
028: * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
029: * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
030: * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
031: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
032: * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
033: * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
034: * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
035: * SUCH DAMAGE.
036: */package org.purl.sword.base;
037:
038: import javax.servlet.http.HttpServletResponse;
039:
040: /**
041: * Definition of the additional HTTP Header tags that will be used in
042: * the SWORD protocol.
043: *
044: * @author Neil Taylor
045: *
046: */
047: public interface HttpHeaders {
048: /**
049: * The HTTP Header label that specifies the MD5 label.
050: */
051: public static final String CONTENT_MD5 = "Content-MD5";
052:
053: /**
054: * The HTTP Header label that specifies the MD5 label.
055: */
056: public static final String CONTENT_LENGTH = "Content-Length";
057:
058: /**
059: * The HTTP Header label that specifies the On Behalf Of information.
060: */
061: public static final String X_ON_BEHALF_OF = "X-On-Behalf-Of";
062:
063: /**
064: * The HTTP Header label that specifies the Format Namespace information.
065: */
066: public static final String X_FORMAT_NAMESPACE = "X-Format-Namespace";
067:
068: /**
069: * The HTTP Header label that specifies the desired Verbose status.
070: */
071: public static final String X_VERBOSE = "X-Verbose";
072:
073: /**
074: * The HTTP Header label that specifies the desired NoOp status.
075: */
076: public static final String X_NO_OP = "X-No-Op";
077:
078: /**
079: * The HTTP Header that specifies the error code information.
080: */
081: public static final String X_ERROR_CODE = "X-Error-Code";
082:
083: /**
084: * The Slug header.
085: */
086: public static final String SLUG = "Slug";
087:
088: /**
089: * Submission created
090: */
091: public static final int CREATED = HttpServletResponse.SC_CREATED;
092:
093: /**
094: * Submission accepted.
095: */
096: public static final int ACCEPTED = HttpServletResponse.SC_ACCEPTED;
097:
098: /**
099: * The HTTP Header that specifies the content disposition item. This is
100: * used by the SWORD profile to identify the name for the deposit.
101: */
102: public static final String CONTENT_DISPOSITION = "Content-Disposition";
103: }
|