本文整理汇总了Java中org.apache.tapestry5.internal.InternalConstants类的典型用法代码示例。如果您正苦于以下问题:Java InternalConstants类的具体用法?Java InternalConstants怎么用?Java InternalConstants使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
InternalConstants类属于org.apache.tapestry5.internal包,在下文中一共展示了InternalConstants类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createSymbolProvider
import org.apache.tapestry5.internal.InternalConstants; //导入依赖的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);
}
示例2: defaultsSymbols
import org.apache.tapestry5.internal.InternalConstants; //导入依赖的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");
}
示例3: getTransformedContentType
import org.apache.tapestry5.internal.InternalConstants; //导入依赖的package包/类
public ContentType getTransformedContentType() {
return InternalConstants.JAVASCRIPT_CONTENT_TYPE;
}
示例4: getTransformedContentType
import org.apache.tapestry5.internal.InternalConstants; //导入依赖的package包/类
@Override
public ContentType getTransformedContentType() {
return InternalConstants.JAVASCRIPT_CONTENT_TYPE;
}
示例5: getContentType
import org.apache.tapestry5.internal.InternalConstants; //导入依赖的package包/类
public ContentType getContentType() {
String type = response.getHeader(InternalConstants.CONTENT_TYPE_ATTRIBUTE_NAME);
return new ContentType(type);
}