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 */
018public class Constants {
019
020   //-----------------------------------------------------------------------------------------------------------------
021   // CollectionFormat
022   //-----------------------------------------------------------------------------------------------------------------
023
024   /**
025    * Comma-separated values (e.g. <js>"foo,bar"</js>).
026    */
027   public static final String CF_CSV = "csv";
028
029   /**
030    * Space-separated values (e.g. <js>"foo bar"</js>).
031    */
032   public static final String CF_SSV = "ssv";
033
034   /**
035    * Tab-separated values (e.g. <js>"foo\tbar"</js>).
036    */
037   public static final String CF_TSV = "tsv";
038
039   /**
040    * Pipe-separated values (e.g. <js>"foo|bar"</js>).
041    */
042   public static final String CF_PIPES = "pipes";
043
044   /**
045    * Corresponds to multiple parameter instances instead of multiple values for a single instance (e.g. <js>"foo=bar&amp;foo=baz"</js>).
046    */
047   public static final String CF_MULTI = "multi";
048
049   /**
050    * UON notation (e.g. <js>"@(foo,bar)"</js>).
051    */
052   public static final String CF_UON = "uon";
053
054   //-----------------------------------------------------------------------------------------------------------------
055   // Type
056   //-----------------------------------------------------------------------------------------------------------------
057
058   /**
059    * String.
060    */
061   public static final String TYPE_STRING = "string";
062
063   /**
064    * Floating point number.
065    */
066   public static final String TYPE_NUMBER = "number";
067
068   /**
069    * Decimal number.
070    */
071   public static final String TYPE_INTEGER = "integer";
072
073   /**
074    * Boolean.
075    */
076   public static final String TYPE_BOOLEAN = "boolean";
077
078   /**
079    * Array or collection.
080    */
081   public static final String TYPE_ARRAY = "array";
082
083   /**
084    * Map or bean.
085    */
086   public static final String TYPE_OBJECT = "object";
087
088   /**
089    * File.
090    */
091   public static final String TYPE_FILE = "file";
092
093   //-----------------------------------------------------------------------------------------------------------------
094   // Format
095   //-----------------------------------------------------------------------------------------------------------------
096
097   /**
098    * Signed 32 bits.
099    */
100   public static final String FORMAT_INT32 = "int32";
101
102   /**
103    * Signed 64 bits.
104    */
105   public static final String FORMAT_INT64 = "int64";
106
107   /**
108    * 32-bit floating point number.
109    */
110   public static final String FORMAT_FLOAT = "float";
111
112   /**
113    * 64-bit floating point number.
114    */
115   public static final String FORMAT_DOUBLE = "double";
116
117   /**
118    * BASE-64 encoded characters.
119    */
120   public static final String FORMAT_BYTE = "byte";
121
122   /**
123    * Hexadecimal encoded octets (e.g. <js>"00FF"</js>).
124    */
125   public static final String FORMAT_BINARY = "binary";
126
127   /**
128    * Spaced-separated hexadecimal encoded octets (e.g. <js>"00 FF"</js>).
129    */
130   public static final String FORMAT_BINARY_SPACED = "binary-spaced";
131
132   /**
133    * An <a href='http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14'>RFC3339 full-date</a>.
134    */
135   public static final String FORMAT_DATE = "date";
136
137   /**
138    *  An <a href='http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14'>RFC3339 date-time</a>.
139    */
140   public static final String FORMAT_DATE_TIME = "date-time";
141
142   /**
143    * Used to hint UIs the input needs to be obscured.
144    */
145   public static final String FORMAT_PASSWORD = "password";
146
147   /**
148    * UON notation (e.g. <js>"(foo=bar,baz=@(qux,123))"</js>).
149    */
150   public static final String FORMAT_UON = "uon";
151}