public class TemplateRequestURLBuilder extends Object implements com.google.common.base.Function<net.shibboleth.utilities.java.support.resolver.CriteriaSet,String>
The entity ID will be replaced in the template string according to the template variable entityID,
e.g. "https://metadataservice.com/entity/${entityID}".
The value of the encodingStyle parameter determines whether and how the entity ID will be encoded prior
to substitution, and accepts an enum value from TemplateRequestURLBuilder.EncodingStyle.
Legacy deprecated constructors accept an encoded parameter, where true
means TemplateRequestURLBuilder.EncodingStyle.form and false means TemplateRequestURLBuilder.EncodingStyle.none.
| Modifier and Type | Class and Description |
|---|---|
static class |
TemplateRequestURLBuilder.EncodingStyle
EntityID Encoding style.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
CONTEXT_KEY_ENTITY_ID
The Velocity context variable name for the entity ID.
|
private TemplateRequestURLBuilder.EncodingStyle |
entityIDEncodingStyle
Enum value indicating whether and how to encode the entity ID value before substitution.
|
private Logger |
log
Logger.
|
private net.shibboleth.utilities.java.support.velocity.Template |
template
Velocity template instance used to render the request URL.
|
private String |
templateText
The template text, for logging purposes.
|
private com.google.common.base.Function<String,String> |
transformer
Function which transforms the entityID prior to substitution into the template.
|
| Constructor and Description |
|---|
TemplateRequestURLBuilder(VelocityEngine engine,
String templateString,
boolean encoded)
Deprecated.
Replacement is the variant which accepts an instance of
TemplateRequestURLBuilder.EncodingStyle |
TemplateRequestURLBuilder(VelocityEngine engine,
String templateString,
boolean encoded,
com.google.common.base.Function<String,String> transform)
Deprecated.
Replacement is the variant which accepts an instance of
TemplateRequestURLBuilder.EncodingStyle |
TemplateRequestURLBuilder(VelocityEngine engine,
String templateString,
boolean encoded,
com.google.common.base.Function<String,String> transform,
Charset charSet)
Deprecated.
Replacement is the variant which accepts an instance of
TemplateRequestURLBuilder.EncodingStyle |
TemplateRequestURLBuilder(VelocityEngine engine,
String templateString,
TemplateRequestURLBuilder.EncodingStyle encodingStyle)
Constructor.
|
TemplateRequestURLBuilder(VelocityEngine engine,
String templateString,
TemplateRequestURLBuilder.EncodingStyle encodingStyle,
com.google.common.base.Function<String,String> transform)
Constructor.
|
TemplateRequestURLBuilder(VelocityEngine engine,
String templateString,
TemplateRequestURLBuilder.EncodingStyle encodingStyle,
com.google.common.base.Function<String,String> transform,
Charset charSet)
Constructor.
|
public static final String CONTEXT_KEY_ENTITY_ID
private final Logger log
private net.shibboleth.utilities.java.support.velocity.Template template
private String templateText
private com.google.common.base.Function<String,String> transformer
private TemplateRequestURLBuilder.EncodingStyle entityIDEncodingStyle
@Deprecated public TemplateRequestURLBuilder(@Nonnull VelocityEngine engine, @Nonnull@NotEmpty String templateString, boolean encoded)
TemplateRequestURLBuilder.EncodingStyleThe template character set will be US ASCII.
engine - the VelocityEngine instance to usetemplateString - the Velocity template stringencoded - true if entity ID should be URL form-encoded prior to substitution, false otherwise@Deprecated public TemplateRequestURLBuilder(@Nonnull VelocityEngine engine, @Nonnull@NotEmpty String templateString, boolean encoded, @Nullable com.google.common.base.Function<String,String> transform)
TemplateRequestURLBuilder.EncodingStyleThe template character set will be US ASCII.
engine - the VelocityEngine instance to usetemplateString - the Velocity template stringtransform - function which transforms the entityID prior to substitution, may be nullencoded - true if entity ID should be URL form-encoded prior to substitution, false otherwise@Deprecated public TemplateRequestURLBuilder(@Nonnull VelocityEngine engine, @Nonnull@NotEmpty String templateString, boolean encoded, @Nullable com.google.common.base.Function<String,String> transform, @Nullable Charset charSet)
TemplateRequestURLBuilder.EncodingStyleengine - the VelocityEngine instance to usetemplateString - the Velocity template stringencoded - true if entity ID should be URL form-encoded prior to substitution, false otherwisetransform - function which transforms the entityID prior to substitution, may be nullcharSet - character set of the template, may be nullpublic TemplateRequestURLBuilder(@Nonnull VelocityEngine engine, @Nonnull@NotEmpty String templateString, @Nullable TemplateRequestURLBuilder.EncodingStyle encodingStyle)
The template character set will be US ASCII.
engine - the VelocityEngine instance to usetemplateString - the Velocity template stringencodingStyle - the style for encoding the entity ID prior to substitution,
null means TemplateRequestURLBuilder.EncodingStyle.nonepublic TemplateRequestURLBuilder(@Nonnull VelocityEngine engine, @Nonnull@NotEmpty String templateString, @Nullable TemplateRequestURLBuilder.EncodingStyle encodingStyle, @Nullable com.google.common.base.Function<String,String> transform)
The template character set will be US ASCII.
engine - the VelocityEngine instance to usetemplateString - the Velocity template stringtransform - function which transforms the entityID prior to substitution, may be nullencodingStyle - the style for encoding the entity ID prior to substitution,
null means TemplateRequestURLBuilder.EncodingStyle.nonepublic TemplateRequestURLBuilder(@Nonnull VelocityEngine engine, @Nonnull@NotEmpty String templateString, TemplateRequestURLBuilder.EncodingStyle encodingStyle, @Nullable com.google.common.base.Function<String,String> transform, @Nullable Charset charSet)
engine - the VelocityEngine instance to usetemplateString - the Velocity template stringencodingStyle - the style for encoding the entity ID prior to substitution,
null means TemplateRequestURLBuilder.EncodingStyle.nonetransform - function which transforms the entityID prior to substitution, may be nullcharSet - character set of the template, may be nullCopyright © 1999–2020 Shibboleth Consortium. All rights reserved.