001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.apache.juneau.httppart; 018 019/** 020 * HTTP-Part constants. 021 * 022 * <h5 class='section'>See Also:</h5><ul> 023 * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/HttpPartSerializersParsers">HTTP Part Serializers and Parsers</a> 024 * </ul> 025 */ 026public class Constants { 027 028 //----------------------------------------------------------------------------------------------------------------- 029 // CollectionFormat 030 //----------------------------------------------------------------------------------------------------------------- 031 032 /** 033 * Comma-separated values (e.g. <js>"foo,bar"</js>). 034 */ 035 public static final String CF_CSV = "csv"; 036 037 /** 038 * Space-separated values (e.g. <js>"foo bar"</js>). 039 */ 040 public static final String CF_SSV = "ssv"; 041 042 /** 043 * Tab-separated values (e.g. <js>"foo\tbar"</js>). 044 */ 045 public static final String CF_TSV = "tsv"; 046 047 /** 048 * Pipe-separated values (e.g. <js>"foo|bar"</js>). 049 */ 050 public static final String CF_PIPES = "pipes"; 051 052 /** 053 * Corresponds to multiple parameter instances instead of multiple values for a single instance (e.g. <js>"foo=bar&foo=baz"</js>). 054 */ 055 public static final String CF_MULTI = "multi"; 056 057 /** 058 * UON notation (e.g. <js>"@(foo,bar)"</js>). 059 */ 060 public static final String CF_UON = "uon"; 061 062 //----------------------------------------------------------------------------------------------------------------- 063 // Type 064 //----------------------------------------------------------------------------------------------------------------- 065 066 /** 067 * String. 068 */ 069 public static final String TYPE_STRING = "string"; 070 071 /** 072 * Floating point number. 073 */ 074 public static final String TYPE_NUMBER = "number"; 075 076 /** 077 * Decimal number. 078 */ 079 public static final String TYPE_INTEGER = "integer"; 080 081 /** 082 * Boolean. 083 */ 084 public static final String TYPE_BOOLEAN = "boolean"; 085 086 /** 087 * Array or collection. 088 */ 089 public static final String TYPE_ARRAY = "array"; 090 091 /** 092 * Map or bean. 093 */ 094 public static final String TYPE_OBJECT = "object"; 095 096 /** 097 * File. 098 */ 099 public static final String TYPE_FILE = "file"; 100 101 //----------------------------------------------------------------------------------------------------------------- 102 // Format 103 //----------------------------------------------------------------------------------------------------------------- 104 105 /** 106 * Signed 32 bits. 107 */ 108 public static final String FORMAT_INT32 = "int32"; 109 110 /** 111 * Signed 64 bits. 112 */ 113 public static final String FORMAT_INT64 = "int64"; 114 115 /** 116 * 32-bit floating point number. 117 */ 118 public static final String FORMAT_FLOAT = "float"; 119 120 /** 121 * 64-bit floating point number. 122 */ 123 public static final String FORMAT_DOUBLE = "double"; 124 125 /** 126 * BASE-64 encoded characters. 127 */ 128 public static final String FORMAT_BYTE = "byte"; 129 130 /** 131 * Hexadecimal encoded octets (e.g. <js>"00FF"</js>). 132 */ 133 public static final String FORMAT_BINARY = "binary"; 134 135 /** 136 * Spaced-separated hexadecimal encoded octets (e.g. <js>"00 FF"</js>). 137 */ 138 public static final String FORMAT_BINARY_SPACED = "binary-spaced"; 139 140 /** 141 * An RFC3339 full-date. 142 */ 143 public static final String FORMAT_DATE = "date"; 144 145 /** 146 * An RFC3339 date-time. 147 */ 148 public static final String FORMAT_DATE_TIME = "date-time"; 149 150 /** 151 * Used to hint UIs the input needs to be obscured. 152 */ 153 public static final String FORMAT_PASSWORD = "password"; 154 155 /** 156 * UON notation (e.g. <js>"(foo=bar,baz=@(qux,123))"</js>). 157 */ 158 public static final String FORMAT_UON = "uon"; 159}