001/* 002 * (C) Copyright 2006-2016 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 * 016 * Contributors: 017 * bstefanescu 018 */ 019package org.nuxeo.ecm.automation.client; 020 021/** 022 * @author <a href="mailto:bs@nuxeo.com">Bogdan Stefanescu</a> 023 */ 024public class Constants { 025 026 public static final String CTYPE_AUTOMATION = "application/json+nxautomation"; 027 028 public static final String CTYPE_ENTITY = "application/json+nxentity"; 029 030 public static final String CTYPE_MULTIPART_RELATED = "multipart/related"; // for 031 // blobs 032 // upload 033 034 public static final String CTYPE_MULTIPART_MIXED = "multipart/mixed"; // for 035 // blobs 036 // download 037 038 /** @since 8.4 */ 039 public static final String CTYPE_MULTIPART_EMPTY = "application/nuxeo-empty-list"; // for empty blobs 040 041 public static final String REQUEST_ACCEPT_HEADER = CTYPE_ENTITY + ", */*"; 042 043 public static final String CTYPE_REQUEST = "application/json+nxrequest; charset=UTF-8"; 044 045 public static final String CTYPE_REQUEST_NOCHARSET = "application/json+nxrequest"; 046 047 public static final String KEY_ENTITY_TYPE = "entity-type"; 048 049 /** 050 * Header to specify a comma separated list of schemas to be included in the returned doc. 051 * <p> 052 * If the header is not specified, the default properties are returned (the minimal document properties: common, 053 * dublincore, file). To specify all the schemas you can use the <code>*</code> as value. Example: 054 * 055 * <pre> 056 * X-NXDocumentProperties: * 057 * X-NXDocumentProperties: dublincore, file 058 * </pre> 059 */ 060 public static final String HEADER_NX_SCHEMAS = "X-NXDocumentProperties"; 061 062 /** 063 * Header to inform the server that no return entity is wanted. It must be <code>true</code> or <code>false</code>. 064 * If not specified, false will be used by default. 065 * <p> 066 * This can be used to avoid the server sending back the response entity to the client - the operation will be 067 * treated as a void operation. 068 * <p> 069 * For example the operation <code>Blob.Attach</code> returns back the attached blob. This may generate a lot of 070 * network traffic that is not needed by the client (sending back the same blob as the one sent by the client as the 071 * operation input). In such situation you should set this header to true. 072 */ 073 public static final String HEADER_NX_VOIDOP = "X-NXVoidOperation"; 074 075 076 private Constants() { 077 } 078 079}