本文整理汇总了Java中org.apache.tapestry5.ioc.Configuration类的典型用法代码示例。如果您正苦于以下问题:Java Configuration类的具体用法?Java Configuration怎么用?Java Configuration使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Configuration类属于org.apache.tapestry5.ioc包,在下文中一共展示了Configuration类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: contributeSecurityConfiguration
import org.apache.tapestry5.ioc.Configuration; //导入依赖的package包/类
public static void contributeSecurityConfiguration(Configuration<SecurityFilterChain> configuration, SecurityFilterChainFactory factory) {
// login page
configuration.add(factory.createChain("/signin").add(factory.anon()).build());
configuration.add(factory.createChain("/").add(factory.authc()).build());
// permissions for all pages
configuration.add(factory.createChain("/channelconfig/**").add(factory.perms(), "page:channelconfig").build());
configuration.add(factory.createChain("/channelmap/**").add(factory.perms(), "page:channelmap").build());
configuration.add(factory.createChain("/index/**").add(factory.perms(), "page:index").build());
configuration.add(factory.createChain("/programchannel/**").add(factory.perms(), "page:programchannel").build());
configuration.add(factory.createChain("/programday/**").add(factory.perms(), "page:programday").build());
configuration.add(factory.createChain("/programtime/**").add(factory.perms(), "page:programtime").build());
configuration.add(factory.createChain("/recordings/**").add(factory.perms(), "page:recordings").build());
configuration.add(factory.createChain("/searchtimer/**").add(factory.perms(), "page:searchtimer").build());
configuration.add(factory.createChain("/setup/**").add(factory.perms(), "page:setup").build());
configuration.add(factory.createChain("/svdrpconsole/**").add(factory.perms(), "page:svdrpconsole").build());
configuration.add(factory.createChain("/timer/**").add(factory.perms(), "page:timer").build());
configuration.add(factory.createChain("/useradmin/**").add(factory.perms(), "page:useradmin").build());
}
示例2: contributeCLIParser
import org.apache.tapestry5.ioc.Configuration; //导入依赖的package包/类
/**
* Define some sample contributions
*
* @param configuration
*/
public void contributeCLIParser(Configuration<CLIOption> configuration) {
configuration.add(new CLIOption("a", "alfa", 1, true,
"alfa-description"));
configuration.add(new CLIOption("b", "beta", 0, true,
"beta-description"));
configuration
.add(new CLIOption("g", "gamma", 1, false, "This is gamma"));
configuration.add(new CLIOption("v", "a-vector-options", 5, false,
"This is vector"));
configuration.add(new CLIOption("u", "the-URL", 1, true, "Mandatory"));
CLIOption delta = new CLIOption("d", "delta", 1, false, "");
delta.setDefaultValue("3");
configuration.add(delta);
CLIOption epsilon = new CLIOption("e", "epsilon", 1, false, "");
epsilon.setDefaultValue("12");
configuration.add(epsilon);
}
示例3: contributeIgnoredPathsFilter
import org.apache.tapestry5.ioc.Configuration; //导入依赖的package包/类
public static void contributeIgnoredPathsFilter(
@InjectService(InjectorModuleDef.INJECTOR_SERVICE_ID) Injector injector,
Configuration<String> configuration) {
TypeLiteral<Set<String>> ignoresType = new TypeLiteral<Set<String>>() {
};
Set<String> ignores = injector.getInstance(Key.get(ignoresType, IgnoredPaths.class));
ignores.forEach(configuration::add);
}
示例4: contributeComponentClassResolver
import org.apache.tapestry5.ioc.Configuration; //导入依赖的package包/类
public void contributeComponentClassResolver(
@InjectService(InjectorModuleDef.INJECTOR_SERVICE_ID) Injector injector,
Configuration<LibraryMapping> configuration) {
// register Tapestry component libraries.
TypeLiteral<Set<LibraryMapping>> libsType = new TypeLiteral<Set<LibraryMapping>>() {
};
injector.getInstance(Key.get(libsType)).forEach(configuration::add);
}
示例5: contributeApplication
import org.apache.tapestry5.ioc.Configuration; //导入依赖的package包/类
/**
* Contributions to the RESTeasy main Application, insert all your RESTeasy
* singleton services here.
* <p/>
*
*/
@Contribute(javax.ws.rs.core.Application.class)
public static void contributeApplication(Configuration<Object> singletons,
GraphmlServerRS restService) {
singletons.add(restService);
}
示例6: contributeCLIParser
import org.apache.tapestry5.ioc.Configuration; //导入依赖的package包/类
/**
* Note that those options are used with the one specified inside
* {@link TestModule}
*
* @param configuration
*/
public void contributeCLIParser(Configuration<CLIOption> configuration) {
configuration.add(new CLIOption("a", "alfa", 1, true,
"alfa-description"));
configuration.add(new CLIOption("b", "beta", 1, true,
"beta-description"));
configuration
.add(new CLIOption("g", "gamma", 1, false, "This is gamma"));
configuration.add(new CLIOption("d", "delta", 1, false, "A delta"));
configuration.add(new CLIOption("v", "vector", 3, false,
"Vector must have 3 elements !"));
configuration.add(new CLIOption("e", "epsilon", 1, false, "epsilon"));
configuration.add(new CLIOption("g", "gamma", 1, true,
"This is anothre definition of gamma"));
configuration.add(new CLIOption("su", "string-url", 1, false,
"string-url"));
configuration.add(new CLIOption("u", "an-url", 1, false,
"This is another URL"));
configuration.add(new CLIOption("o", "orsu", 1, false,
"This is another URL"));
configuration.add(new CLIOption("j", "jonny", 0, false,
"This is another URL"));
configuration.add(new CLIOption("t", "tommy", 1, false,
"This is another URL"));
}
示例7: contributeComponentClassResolver
import org.apache.tapestry5.ioc.Configuration; //导入依赖的package包/类
public static void contributeComponentClassResolver(Configuration<LibraryMapping> configuration)
{
configuration.add(new LibraryMapping("angular2","org.got5.tapestry5.angular2"));
}
示例8: contributeTypeCoercer
import org.apache.tapestry5.ioc.Configuration; //导入依赖的package包/类
public static void contributeTypeCoercer(Configuration<CoercionTuple> configuration)
{
add(configuration, A2Script.class);
}
示例9: add
import org.apache.tapestry5.ioc.Configuration; //导入依赖的package包/类
private static <T extends Enum> void add(Configuration<CoercionTuple> configuration, Class<T> enumType)
{
configuration.add(CoercionTuple.create(String.class, enumType, StringToEnumCoercion.create(enumType)));
}
示例10: contributeIgnoredPathsFilter
import org.apache.tapestry5.ioc.Configuration; //导入依赖的package包/类
public static void contributeIgnoredPathsFilter(Configuration<String> configuration)
{
configuration.add("/templates/*");
}
示例11: contributeWebSecurityManager
import org.apache.tapestry5.ioc.Configuration; //导入依赖的package包/类
public static void contributeWebSecurityManager(Configuration<Realm> configuration, AuthorizingRealm realm) {
configuration.add(realm);
}
示例12: contributeComponentClassResolver
import org.apache.tapestry5.ioc.Configuration; //导入依赖的package包/类
public static void contributeComponentClassResolver(Configuration<LibraryMapping> configuration) {
configuration.add(new LibraryMapping("talentroc", "com.talentroc.t5.bs.modal"));
}
示例13: addLibraryMapping
import org.apache.tapestry5.ioc.Configuration; //导入依赖的package包/类
@Contribute(ComponentClassResolver.class)
public static void addLibraryMapping(final Configuration<LibraryMapping> configuration) {
configuration.add(new LibraryMapping("react", "de.eddyson.tapestry.react"));
}
示例14: addPackages
import org.apache.tapestry5.ioc.Configuration; //导入依赖的package包/类
@Contribute(JpaEntityPackageManager.class)
public static void addPackages(Configuration<String> configuration)
{
configuration.add(JpaTestModule.class.getPackage().getName());
}
示例15: contributeApplication1
import org.apache.tapestry5.ioc.Configuration; //导入依赖的package包/类
@Contribute(FederatedEventGraphServer.class)
public static void contributeApplication1(
Configuration<EventGraphBuilder> singletons,
@InjectService("Event") EventGraphBuilder pgb) {
singletons.add(pgb);
}