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

org.zodiac.autoconfigure.template.velocity.VelocityTemplateAvailabilityProvider Maven / Gradle / Ivy

There is a newer version: 1.6.8
Show newest version
package org.zodiac.autoconfigure.template.velocity;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import org.springframework.boot.autoconfigure.template.PathBasedTemplateAvailabilityProvider;
import org.zodiac.template.velocity.constants.VelocityTemplateConstants;

public class VelocityTemplateAvailabilityProvider extends PathBasedTemplateAvailabilityProvider {

    public VelocityTemplateAvailabilityProvider() {
        super("org.apache.velocity.app.VelocityEngine", VelocityTemplateAvailabilityProperties.class,
            "spring.velocity");
    }

    static class VelocityTemplateAvailabilityProperties extends TemplateAvailabilityProperties {

        private List resourceLoaderPath =
            new ArrayList(Arrays.asList(VelocityTemplateConstants.DEFAULT_RESOURCE_LOADER_PATH));

        VelocityTemplateAvailabilityProperties() {
            super(VelocityTemplateConstants.DEFAULT_PREFIX, VelocityTemplateConstants.DEFAULT_SUFFIX);
        }

        @Override
        protected List getLoaderPath() {
            return this.resourceLoaderPath;
        }

        public List getResourceLoaderPath() {
            return this.resourceLoaderPath;
        }

        public void setResourceLoaderPath(List resourceLoaderPath) {
            this.resourceLoaderPath = resourceLoaderPath;
        }

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy