本文整理汇总了Java中org.apache.tapestry5.ioc.services.SymbolProvider类的典型用法代码示例。如果您正苦于以下问题:Java SymbolProvider类的具体用法?Java SymbolProvider怎么用?Java SymbolProvider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SymbolProvider类属于org.apache.tapestry5.ioc.services包,在下文中一共展示了SymbolProvider类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setupEnvironment
import org.apache.tapestry5.ioc.services.SymbolProvider; //导入依赖的package包/类
@Contribute(SymbolProvider.class)
@ApplicationDefaults
public static void setupEnvironment(MappedConfiguration<String, Object> configuration) {
configuration.add(SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER, "jquery");
configuration.add(SymbolConstants.BOOTSTRAP_ROOT, "context:jbootstrap");
configuration.add(SymbolConstants.HMAC_PASSPHRASE, new SecureRandomNumberGenerator().getSecureRandom().toString());
configuration.add(SymbolConstants.MINIFICATION_ENABLED, true);
configuration.add(SymbolConstants.ENABLE_HTML5_SUPPORT, true);
configuration.add(SymbolConstants.ENABLE_PAGELOADING_MASK, true);
configuration.add(SymbolConstants.SUPPORTED_LOCALES, "de,en");
configuration.add(SymbolConstants.CLUSTERED_SESSIONS, false);
configuration.add(SymbolConstants.COMBINE_SCRIPTS, true);
configuration.add(SymbolConstants.COMPACT_JSON, true);
configuration.add(SymbolConstants.COMPRESS_WHITESPACE, true);
configuration.add(SymbolConstants.GZIP_COMPRESSION_ENABLED, true);
configuration.add(SymbolConstants.PRELOADER_MODE, PreloaderMode.ALWAYS);
configuration.add("tapestry.closure-compiler-level", "SIMPLE_OPTIMIZATIONS");
// INFO:
// only in production 1 to 5 minutes
// configuration.add(SymbolConstants.FILE_CHECK_INTERVAL, 60);
}
示例2: collect
import org.apache.tapestry5.ioc.services.SymbolProvider; //导入依赖的package包/类
@Test
public void collect() {
List<SymbolProvider> providers = new ArrayList<SymbolProvider>();
providers.add(new SystemPropertiesSymbolProvider());
TransitionSequenceCollector collector = new TransitionSequenceCollector(
LoggerFactory.getLogger(TransitionSequenceCollector.class),
"ale", "ale");
at.ac.tuwien.iter.data.Test test = at.ac.tuwien.iter.data.Test
.newInstance(
"http://www.inf.usi.ch/phd/gambi/attachments/autocles/doodle-clients.jmx",
"http://www.inf.usi.ch/phd/gambi/attachments/autocles/doodle-manifest.xml",
"http://128.130.172.198:8081/memcached/autocles-experiment283277176241747--c8d9ec00-73cf-40dc-a10b-824f39549d13",
"TriangleLoadGenerator", 189.55, 61.0);
double[] transitions = collector
.loadSeriesFromDBAndDropDB(
"http://128.130.172.198:8081/memcached/autocles-experiment511579257018216-controllerResults",
test);
System.out.println("TransitionSequenceCollectorTest.collect() "
+ Arrays.toString(transitions));
}
示例3: configureSymbolDefaults
import org.apache.tapestry5.ioc.services.SymbolProvider; //导入依赖的package包/类
@Contribute(SymbolProvider.class)
@FactoryDefaults
public static void configureSymbolDefaults(final MappedConfiguration<String, Object> configuration) {
configuration.add(ReactSelectSymbols.CONTRIBUTE_CLASSNAMES_MODULE, true);
configuration.add(ReactSelectSymbols.CONTRIBUTE_REACT_INPUT_AUTOSIZE_MODULE, true);
}
示例4: createSymbolProvider
import org.apache.tapestry5.ioc.services.SymbolProvider; //导入依赖的package包/类
protected SymbolProvider createSymbolProvider(Map<String, String> diSymbols) {
Map<String, String> params = new HashMap<>(diSymbols);
// override DI symbols if set explicitly in the factory
if (productionMode != null) {
params.put(SymbolConstants.PRODUCTION_MODE, Boolean.toString(productionMode));
}
if (executionModes != null) {
params.put(SymbolConstants.EXECUTION_MODE, executionModes);
}
if (charset != null) {
params.put(SymbolConstants.CHARSET, charset);
}
if (appPackage != null) {
params.put(InternalConstants.TAPESTRY_APP_PACKAGE_PARAM, appPackage);
} else {
// sanity check
if (!params.containsKey(InternalConstants.TAPESTRY_APP_PACKAGE_PARAM)) {
throw new IllegalStateException("Tapestry app package is not defined. Use 'tapestry.appPackage' config " +
"or inject 'tapestry.app-package' symbol with this value.");
}
}
if (supportedLocales != null) {
params.put(SymbolConstants.SUPPORTED_LOCALES, supportedLocales);
}
// provide default values for symbols if not defined in DI
if (!params.containsKey(SymbolConstants.GZIP_COMPRESSION_ENABLED)) {
// compression should be configured at the Jetty level
params.put(SymbolConstants.GZIP_COMPRESSION_ENABLED, "false");
}
return new MapSymbolProvider(params);
}
示例5: createSymbolProvider
import org.apache.tapestry5.ioc.services.SymbolProvider; //导入依赖的package包/类
protected SymbolProvider createSymbolProvider(ServletContext context) {
// merge upstream provider with defaults from ServletContext
return new DelegatingSymbolProvider(
baseSymbolProvider,
new SingleKeySymbolProvider(SymbolConstants.CONTEXT_PATH, context.getContextPath())
);
}
示例6: addDefaultConfiguration
import org.apache.tapestry5.ioc.services.SymbolProvider; //导入依赖的package包/类
@Contribute(SymbolProvider.class)
@FactoryDefaults
public static void addDefaultConfiguration(final MappedConfiguration<String, Object> configuration) {
configuration.add(MinificationCacheWarmingSymbols.ENABLE_MINIFICATION_CACHE_WARMING, "${"
+ SymbolConstants.MINIFICATION_ENABLED + "}");
configuration.add(MinificationCacheWarmingSymbols.LOG_SLOW_MINIFICATION, Boolean.TRUE);
}
开发者ID:eddyson-de,项目名称:tapestry-minification-cache-warming,代码行数:8,代码来源:MinificationCacheWarmingModule.java
示例7: setupDefaultConfiguration
import org.apache.tapestry5.ioc.services.SymbolProvider; //导入依赖的package包/类
@FactoryDefaults
@Contribute(SymbolProvider.class)
public static void setupDefaultConfiguration(final MappedConfiguration<String, Object> configuration) {
configuration.add(ReactSymbols.USE_COLORED_BABEL_OUTPUT, true);
configuration.add(ReactSymbols.USE_NODE_IF_AVAILABLE, true);
configuration.add(ReactSymbols.ENABLE_STAGE_3_TRANSFORMATIONS, false);
}
示例8: setupDefaultConfiguration
import org.apache.tapestry5.ioc.services.SymbolProvider; //导入依赖的package包/类
@FactoryDefaults
@Contribute(SymbolProvider.class)
public static void setupDefaultConfiguration(final MappedConfiguration<String, Object> configuration) {
configuration.add(ReactSymbols.REACT_ASSET_PATH,
"classpath:de/eddyson/tapestry/react/services/react.development.js");
configuration.add(ReactSymbols.REACT_ASSET_PATH_PRODUCTION,
"classpath:de/eddyson/tapestry/react/services/react.production.min.js");
configuration.add(ReactSymbols.REACT_DOM_ASSET_PATH,
"classpath:de/eddyson/tapestry/react/services/react-dom.development.js");
configuration.add(ReactSymbols.REACT_DOM_ASSET_PATH_PRODUCTION,
"classpath:de/eddyson/tapestry/react/services/react-dom.production.min.js");
configuration.add(ReactSymbols.PROP_TYPES_ASSET_PATH, "classpath:de/eddyson/tapestry/react/services/prop-types.js");
configuration.add(ReactSymbols.PROP_TYPES_ASSET_PATH_PRODUCTION,
"classpath:de/eddyson/tapestry/react/services/prop-types.min.js");
}
示例9: defaultsSymbols
import org.apache.tapestry5.ioc.services.SymbolProvider; //导入依赖的package包/类
@Contribute(SymbolProvider.class)
@ApplicationDefaults
public static void defaultsSymbols(MappedConfiguration<String, Object> configuration)
{
configuration.add(InternalConstants.TAPESTRY_APP_PACKAGE_PARAM, JpaTestModule.class.getPackage().getName());
// configuration.add(InternalSymbols.APP_PACKAGE_PATH, "org/tynamo/model/jpa");
}
示例10: provideSymbols
import org.apache.tapestry5.ioc.services.SymbolProvider; //导入依赖的package包/类
@Contribute(SymbolProvider.class)
@ApplicationDefaults
public static void provideSymbols(
MappedConfiguration<String, String> configuration) {
configuration.add(ResteasySymbols.MAPPING_PREFIX, "/rest");
// This disables the autoscanning of graphene.walker.web.rest
configuration.add(ResteasySymbols.AUTOSCAN_REST_PACKAGE, "false");
}
示例11: contributePropertiesFileAsSymbols
import org.apache.tapestry5.ioc.services.SymbolProvider; //导入依赖的package包/类
@Contribute(SymbolSource.class)
public void contributePropertiesFileAsSymbols(
OrderedConfiguration<SymbolProvider> configuration) {
configuration.add("DatabaseConfiguration",
new ClasspathResourceSymbolProvider("database.properties"),
"after:SystemProperties", "before:ApplicationDefaults");
}
示例12: configureApplicationDefaults
import org.apache.tapestry5.ioc.services.SymbolProvider; //导入依赖的package包/类
@Contribute(SymbolProvider.class)
@ApplicationDefaults
public static void configureApplicationDefaults(final MappedConfiguration<String, Object> configuration) {
configuration.add(SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER, "jquery");
}
示例13: factoryDefaults
import org.apache.tapestry5.ioc.services.SymbolProvider; //导入依赖的package包/类
@Contribute(SymbolProvider.class)
@FactoryDefaults
public void factoryDefaults(MappedConfiguration<String, String> configuration) {
configuration.add("welcome-message", "Hello World!");
}
示例14: createTapestryFilter
import org.apache.tapestry5.ioc.services.SymbolProvider; //导入依赖的package包/类
public MappedFilter<BQTapestryFilter> createTapestryFilter(Injector injector, Map<String, String> diSymbols, Set<Class<?>> customModules) {
SymbolProvider symbolProvider = createSymbolProvider(diSymbols);
BQTapestryFilter filter = new BQTapestryFilter(name, symbolProvider, toModuleArray(customModules), extraModuleDefs(injector));
return new MappedFilter(filter, Collections.singleton(urlPattern), name, filterOrder);
}
示例15: BQTapestryFilter
import org.apache.tapestry5.ioc.services.SymbolProvider; //导入依赖的package包/类
public BQTapestryFilter(String name, SymbolProvider baseSymbolProvider, Class[] extraModules, ModuleDef[] extraModuleDefs) {
this.name = name;
this.baseSymbolProvider = baseSymbolProvider;
this.extraModules = extraModules;
this.extraModuleDefs = extraModuleDefs;
}