001/* 002 * Copyright (c) 2006-2011 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the Eclipse Public License v1.0 006 * which accompanies this distribution, and is available at 007 * http://www.eclipse.org/legal/epl-v10.html 008 * 009 * Contributors: 010 * bstefanescu 011 */ 012package org.nuxeo.ecm.automation.client; 013 014/** 015 * @author <a href="mailto:bs@nuxeo.com">Bogdan Stefanescu</a> 016 */ 017public class Constants { 018 019 public static final String CTYPE_AUTOMATION = "application/json+nxautomation"; 020 021 public static final String CTYPE_ENTITY = "application/json+nxentity"; 022 023 public static final String CTYPE_MULTIPART_RELATED = "multipart/related"; // for 024 // blobs 025 // upload 026 027 public static final String CTYPE_MULTIPART_MIXED = "multipart/mixed"; // for 028 // blobs 029 // download 030 031 public static final String REQUEST_ACCEPT_HEADER = CTYPE_ENTITY + ", */*"; 032 033 public static final String CTYPE_REQUEST = "application/json+nxrequest; charset=UTF-8"; 034 035 public static final String CTYPE_REQUEST_NOCHARSET = "application/json+nxrequest"; 036 037 public static final String KEY_ENTITY_TYPE = "entity-type"; 038 039 /** 040 * Header to specify a comma separated list of schemas to be included in the returned doc. 041 * <p> 042 * If the header is not specified, the default properties are returned (the minimal document properties: common, 043 * dublincore, file). To specify all the schemas you can use the <code>*</code> as value. Example: 044 * 045 * <pre> 046 * X-NXDocumentProperties: * 047 * X-NXDocumentProperties: dublincore, file 048 * </pre> 049 */ 050 public static final String HEADER_NX_SCHEMAS = "X-NXDocumentProperties"; 051 052 /** 053 * Header to inform the server that no return entity is wanted. It must be <code>true</code> or <code>false</code>. 054 * If not specified, false will be used by default. 055 * <p> 056 * This can be used to avoid the server sending back the response entity to the client - the operation will be 057 * treated as a void operation. 058 * <p> 059 * For example the operation <code>Blob.Attach</code> returns back the attached blob. This may generate a lot of 060 * network traffic that is not needed by the client (sending back the same blob as the one sent by the client as the 061 * operation input). In such situation you should set this header to true. 062 */ 063 public static final String HEADER_NX_VOIDOP = "X-NXVoidOperation"; 064 065 private Constants() { 066 } 067 068}