当前位置: 首页>>代码示例>>Java>>正文


Java Configuration类代码示例

本文整理汇总了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());
}
 
开发者ID:Zabrimus,项目名称:vdr-jonglisto,代码行数:20,代码来源:AppModule.java

示例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);
}
 
开发者ID:alessiogambi,项目名称:tapestry5-cli,代码行数:27,代码来源:TestModule.java

示例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);
}
 
开发者ID:bootique,项目名称:bootique-tapestry,代码行数:10,代码来源:GuiceTapestryModule.java

示例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);
}
 
开发者ID:bootique,项目名称:bootique-tapestry,代码行数:12,代码来源:GuiceTapestryModule.java

示例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);
}
 
开发者ID:Sotera,项目名称:graphene-walker,代码行数:13,代码来源:AppRestModule.java

示例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"));

}
 
开发者ID:alessiogambi,项目名称:tapestry5-cli,代码行数:42,代码来源:ComplexConstraintModule.java

示例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"));
}
 
开发者ID:ffacon,项目名称:tapestry5-angular2,代码行数:5,代码来源:Angular2Module.java

示例8: contributeTypeCoercer

import org.apache.tapestry5.ioc.Configuration; //导入依赖的package包/类
public static void contributeTypeCoercer(Configuration<CoercionTuple> configuration)
{
   add(configuration, A2Script.class);
}
 
开发者ID:ffacon,项目名称:tapestry5-angular2,代码行数:5,代码来源:Angular2Module.java

示例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)));
}
 
开发者ID:ffacon,项目名称:tapestry5-angular2,代码行数:5,代码来源:Angular2Module.java

示例10: contributeIgnoredPathsFilter

import org.apache.tapestry5.ioc.Configuration; //导入依赖的package包/类
public static void contributeIgnoredPathsFilter(Configuration<String> configuration)
{
       configuration.add("/templates/*");
}
 
开发者ID:ffacon,项目名称:tapestry5-angular2,代码行数:5,代码来源:AppModule.java

示例11: contributeWebSecurityManager

import org.apache.tapestry5.ioc.Configuration; //导入依赖的package包/类
public static void contributeWebSecurityManager(Configuration<Realm> configuration, AuthorizingRealm realm) {
    configuration.add(realm);
}
 
开发者ID:Zabrimus,项目名称:vdr-jonglisto,代码行数:4,代码来源:AppModule.java

示例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"));
}
 
开发者ID:talentroc,项目名称:t5-bs-modal,代码行数:4,代码来源:ModalModule.java

示例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"));
}
 
开发者ID:eddyson-de,项目名称:tapestry-react,代码行数:5,代码来源:ReactModule.java

示例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());
}
 
开发者ID:satago,项目名称:tapestry-jpa-transactions,代码行数:6,代码来源:JpaTestModule.java

示例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);
}
 
开发者ID:Sotera,项目名称:graphene-walker,代码行数:7,代码来源:GraphServerModule.java


注:本文中的org.apache.tapestry5.ioc.Configuration类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。