![JAR search and dependency download from the Maven repository](/logo.png)
org.apache.juneau.rest.httppart.RequestPathParam Maven / Gradle / Ivy
// ***************************************************************************************************************************
// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
// * with the License. You may obtain a copy of the License at *
// * *
// * http://www.apache.org/licenses/LICENSE-2.0 *
// * *
// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
// * specific language governing permissions and limitations under the License. *
// ***************************************************************************************************************************
package org.apache.juneau.rest.httppart;
import static org.apache.juneau.httppart.HttpPartType.*;
import java.lang.reflect.*;
import java.util.regex.*;
import org.apache.http.*;
import org.apache.juneau.*;
import org.apache.juneau.httppart.*;
import org.apache.juneau.rest.*;
/**
* Represents a single path parameter on an HTTP request.
*
*
* Typically accessed through the {@link RequestPathParams} class.
*
*
* Some important methods on this class are:
*
*
* - {@link RequestPathParam}
*
* - Methods for retrieving simple string values:
*
* - {@link RequestPathParam#asString() asString()}
*
- {@link RequestPathParam#get() get()}
*
- {@link RequestPathParam#isPresent() isPresent()}
*
- {@link RequestPathParam#orElse(String) orElse(String)}
*
* - Methods for retrieving as other common types:
*
* - {@link RequestPathParam#asBoolean() asBoolean()}
*
- {@link RequestPathParam#asBooleanPart() asBooleanPart()}
*
- {@link RequestPathParam#asCsvArray() asCsvArray()}
*
- {@link RequestPathParam#asCsvArrayPart() asCsvArrayPart)}
*
- {@link RequestPathParam#asDate() asDate()}
*
- {@link RequestPathParam#asDatePart() asDatePart()}
*
- {@link RequestPathParam#asInteger() asInteger()}
*
- {@link RequestPathParam#asIntegerPart() asIntegerPart()}
*
- {@link RequestPathParam#asLong() asLong()}
*
- {@link RequestPathParam#asLongPart() asLongPart()}
*
- {@link RequestPathParam#asMatcher(Pattern) asMatcher(Pattern)}
*
- {@link RequestPathParam#asMatcher(String) asMatcher(String)}
*
- {@link RequestPathParam#asMatcher(String,int) asMatcher(String,int)}
*
- {@link RequestPathParam#asStringPart() asStringPart()}
*
- {@link RequestPathParam#asUriPart() asUriPart()}
*
* - Methods for retrieving as custom types:
*
* - {@link RequestPathParam#as(Class) as(Class)}
*
- {@link RequestPathParam#as(ClassMeta) as(ClassMeta)}
*
- {@link RequestPathParam#as(Type,Type...) as(Type,Type...)}
*
- {@link RequestPathParam#parser(HttpPartParserSession) parser(HttpPartParserSession)}
*
- {@link RequestPathParam#schema(HttpPartSchema) schema(HttpPartSchema)}
*
* - Methods for performing assertion checks:
*
* - {@link RequestPathParam#assertCsvArray() assertCsvArray()}
*
- {@link RequestPathParam#assertDate() assertDate()}
*
- {@link RequestPathParam#assertInteger() assertInteger()}
*
- {@link RequestPathParam#assertLong() assertLong()}
*
- {@link RequestPathParam#assertString() assertString()}
*
* - Other methods:
*
* - {@link RequestPathParam#getName() getName()}
*
- {@link RequestPathParam#getValue() getValue()}
*
*
*
* See Also:
* - HTTP Parts
*
*/
public class RequestPathParam extends RequestHttpPart implements NameValuePair {
/**
* Constructor.
*
* @param request The request object.
* @param name The parameter name.
* @param value The parameter value.
*/
public RequestPathParam(RestRequest request, String name, String value) {
super(PATH, request, name, value);
this.value = value;
}
//
@Override /* GENERATED */
public RequestPathParam schema(HttpPartSchema value) {
super.schema(value);
return this;
}
@Override /* GENERATED */
public RequestPathParam parser(HttpPartParserSession value) {
super.parser(value);
return this;
}
//
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy