Search in sources :

Example 1 with CorePredicates

use of com.squarespace.template.plugins.CorePredicates in project template-compiler by Squarespace.

the class TemplateC method compiler.

protected Compiler compiler() {
    FormatterTable formatterTable = new FormatterTable();
    PredicateTable predicateTable = new PredicateTable();
    // core
    formatterTable.register(new CoreFormatters());
    predicateTable.register(new CorePredicates());
    // TODO: dynamic classpath scan and registration of plugin jars.
    // squarespace
    formatterTable.register(new CommerceFormatters());
    formatterTable.register(new ContentFormatters());
    formatterTable.register(new SocialFormatters());
    formatterTable.register(new InternationalFormatters());
    predicateTable.register(new CommercePredicates());
    predicateTable.register(new ContentPredicates());
    predicateTable.register(new SlidePredicates());
    predicateTable.register(new SocialPredicates());
    predicateTable.register(new InternationalPredicates());
    return new Compiler(formatterTable, predicateTable);
}
Also used : InternationalFormatters(com.squarespace.template.plugins.platform.i18n.InternationalFormatters) Compiler(com.squarespace.template.Compiler) PredicateTable(com.squarespace.template.PredicateTable) InternationalPredicates(com.squarespace.template.plugins.platform.i18n.InternationalPredicates) CorePredicates(com.squarespace.template.plugins.CorePredicates) ContentFormatters(com.squarespace.template.plugins.platform.ContentFormatters) CommercePredicates(com.squarespace.template.plugins.platform.CommercePredicates) CommerceFormatters(com.squarespace.template.plugins.platform.CommerceFormatters) SocialPredicates(com.squarespace.template.plugins.platform.SocialPredicates) ContentPredicates(com.squarespace.template.plugins.platform.ContentPredicates) CoreFormatters(com.squarespace.template.plugins.CoreFormatters) SlidePredicates(com.squarespace.template.plugins.platform.SlidePredicates) FormatterTable(com.squarespace.template.FormatterTable) SocialFormatters(com.squarespace.template.plugins.platform.SocialFormatters)

Example 2 with CorePredicates

use of com.squarespace.template.plugins.CorePredicates in project template-compiler by Squarespace.

the class UnitTestBase method predicateTable.

public PredicateTable predicateTable() {
    PredicateTable table = new PredicateTable();
    table.register(new CorePredicates());
    table.register(new UnitTestPredicates());
    return table;
}
Also used : CorePredicates(com.squarespace.template.plugins.CorePredicates)

Example 3 with CorePredicates

use of com.squarespace.template.plugins.CorePredicates in project template-compiler by Squarespace.

the class TemplateC method predicateTable.

protected static PredicateTable predicateTable() {
    PredicateTable t = new PredicateTable();
    t.register(new CorePredicates());
    t.register(new CommercePredicates());
    t.register(new ContentPredicates());
    t.register(new SlidePredicates());
    t.register(new SocialPredicates());
    t.register(new InternationalPredicates());
    return t;
}
Also used : PredicateTable(com.squarespace.template.PredicateTable) CommercePredicates(com.squarespace.template.plugins.platform.CommercePredicates) InternationalPredicates(com.squarespace.template.plugins.platform.i18n.InternationalPredicates) SocialPredicates(com.squarespace.template.plugins.platform.SocialPredicates) ContentPredicates(com.squarespace.template.plugins.platform.ContentPredicates) CorePredicates(com.squarespace.template.plugins.CorePredicates) SlidePredicates(com.squarespace.template.plugins.platform.SlidePredicates)

Aggregations

CorePredicates (com.squarespace.template.plugins.CorePredicates)3 PredicateTable (com.squarespace.template.PredicateTable)2 CommercePredicates (com.squarespace.template.plugins.platform.CommercePredicates)2 ContentPredicates (com.squarespace.template.plugins.platform.ContentPredicates)2 SlidePredicates (com.squarespace.template.plugins.platform.SlidePredicates)2 SocialPredicates (com.squarespace.template.plugins.platform.SocialPredicates)2 InternationalPredicates (com.squarespace.template.plugins.platform.i18n.InternationalPredicates)2 Compiler (com.squarespace.template.Compiler)1 FormatterTable (com.squarespace.template.FormatterTable)1 CoreFormatters (com.squarespace.template.plugins.CoreFormatters)1 CommerceFormatters (com.squarespace.template.plugins.platform.CommerceFormatters)1 ContentFormatters (com.squarespace.template.plugins.platform.ContentFormatters)1 SocialFormatters (com.squarespace.template.plugins.platform.SocialFormatters)1 InternationalFormatters (com.squarespace.template.plugins.platform.i18n.InternationalFormatters)1