All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ftl.rest.client.$$RestClientPathBuilderTemplateftl Maven / Gradle / Ivy

The newest version!
<#include "../../common-lib.javaftl">
<#-- -------------------------------------------------------------------------------------------------------- -->
public final class ${JAVA_MODEL_CLASS.pathBuilderImplSimpleClassName} extends PathBuilder<${JAVA_MODEL_CLASS.javaSimpleClassName}> {

    @Override
    public String build(final String key,
                        final String urlTemplate,
                        final ${JAVA_MODEL_CLASS.javaSimpleClassName} model) {
        <#if SINGLE??>
        // ${SINGLE.key.originalUrl}
        return format(urlTemplate, ${SINGLE.value?join(", ")});
        <#else>
        <#list URL_TEMPLATES as ITEM>
        if ("${ITEM.key.originalUrl}".equals(key)) {
            return format(urlTemplate, ${ITEM.value?join(", ")});
        }
        
        throw new UnsupportedOperationException("Unsupported url template: " + urlTemplate);
        
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy