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 015import org.apache.juneau.*; 016import org.apache.juneau.oapi.*; 017import org.apache.juneau.uon.*; 018 019/** 020 * @deprecated Use {@link OpenApiSerializer} 021 */ 022@Deprecated 023public class SimpleUonPartSerializer extends UonPartSerializer { 024 025 //------------------------------------------------------------------------------------------------------------------- 026 // Predefined instances 027 //------------------------------------------------------------------------------------------------------------------- 028 029 /** Reusable instance of {@link SimpleUonPartSerializer}, all default settings. */ 030 public static final SimpleUonPartSerializer DEFAULT = new SimpleUonPartSerializer(PropertyStore.DEFAULT); 031 032 033 //------------------------------------------------------------------------------------------------------------------- 034 // Instance 035 //------------------------------------------------------------------------------------------------------------------- 036 037 /** 038 * Constructor. 039 * 040 * @param ps 041 * The property store containing all the settings for this object. 042 */ 043 public SimpleUonPartSerializer(PropertyStore ps) { 044 super( 045 ps.builder() 046 .set(UON_paramFormat, ParamFormat.PLAINTEXT) 047 .build() 048 ); 049 } 050 051 @Override /* Context */ 052 public SimpleUonPartSerializerBuilder builder() { 053 return new SimpleUonPartSerializerBuilder(getPropertyStore()); 054 } 055 056 /** 057 * Instantiates a new clean-slate {@link SimpleUonPartSerializerBuilder} object. 058 * 059 * <p> 060 * Note that this method creates a builder initialized to all default settings, whereas {@link #builder()} copies 061 * the settings of the object called on. 062 * 063 * @return A new {@link UonPartSerializerBuilder} object. 064 */ 065 public static SimpleUonPartSerializerBuilder create() { 066 return new SimpleUonPartSerializerBuilder(); 067 } 068}