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