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