ftl.rest.client.$$RestClientPathBuilderTemplateftl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rxmicro-annotation-processor-rest-client Show documentation
Show all versions of rxmicro-annotation-processor-rest-client Show documentation
The RxMicro Annotation Processor internal module that generates REST client components.
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(", ")});
}
#list>
throw new UnsupportedOperationException("Unsupported url template: " + urlTemplate);
#if>
}
}