    001    package org.apache.tapestry5.beanvalidator;
    002
    003    import org.apache.tapestry5.Asset;
    004    import org.apache.tapestry5.ioc.services.ThreadLocale;
    005    import org.apache.tapestry5.services.AssetSource;
    006    import org.apache.tapestry5.services.javascript.JavaScriptStack;
    007    import org.apache.tapestry5.services.javascript.StylesheetLink;
    008
    009    import java.util.Arrays;
    010    import java.util.Collections;
    011    import java.util.List;
    012
    013    public class BeanValidatorStack implements JavaScriptStack
    014    {
    015        public static final String STACK_ID = "BeanValidatorStack";
    016
    017        private final List<Asset> javaScriptStack;
    018
    019        public BeanValidatorStack(final AssetSource assetSource, final ThreadLocale threadLocale)
    020        {
    021            javaScriptStack = Arrays.asList(assetSource.getAsset(null,
    022                    "org/apache/tapestry5/beanvalidator/tapestry-beanvalidator.js", threadLocale.getLocale()));
    023        }
    024
    025        public List<String> getStacks()
    026        {
    027            return Collections.emptyList();
    028        }
    029
    030        public List<Asset> getJavaScriptLibraries()
    031        {
    032
    033            return javaScriptStack;
    034        }
    035
    036        public List<StylesheetLink> getStylesheets()
    037        {
    038
    039            return Collections.emptyList();
    040        }
    041
    042        public String getInitialization()
    043        {
    044            return null;
    045        }
    046    }