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


Java OrderedConfiguration类代码示例

本文整理汇总了Java中org.apache.tapestry5.ioc.OrderedConfiguration的典型用法代码示例。如果您正苦于以下问题:Java OrderedConfiguration类的具体用法?Java OrderedConfiguration怎么用?Java OrderedConfiguration使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


OrderedConfiguration类属于org.apache.tapestry5.ioc包,在下文中一共展示了OrderedConfiguration类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: warmMinifiedJavascriptCache

import org.apache.tapestry5.ioc.OrderedConfiguration; //导入依赖的package包/类
@Contribute(Runnable.class)
public static void warmMinifiedJavascriptCache(
    final MinificationCacheWarming minificationCacheWarming,
    @Symbol(MinificationCacheWarmingSymbols.ENABLE_MINIFICATION_CACHE_WARMING) final boolean minificationCacheWarmingEnabled,
    final OrderedConfiguration<Runnable> configuration) {

  if (minificationCacheWarmingEnabled) {
    configuration.add("MinificationCacheWarming", new Runnable() {

      @Override
      public void run() {
        try {
          minificationCacheWarming.warmMinificationCache();
        } catch (Exception e) {
          throw new RuntimeException("Error warming minification cache", e);
        }
        startupComplete = true;
      }
    });
  }
}
 
开发者ID:eddyson-de,项目名称:tapestry-minification-cache-warming,代码行数:22,代码来源:MinificationCacheWarmingModule.java

示例2: prepareHTMLPageOnRender

import org.apache.tapestry5.ioc.OrderedConfiguration; //导入依赖的package包/类
@Contribute(MarkupRenderer.class)
public static void prepareHTMLPageOnRender(final OrderedConfiguration<MarkupRendererFilter> configuration,
    final RequestGlobals requestGlobals, final PageRenderLinkSource pageRenderLinkSource) {
  configuration.add("AddPageName", new MarkupRendererFilter() {

    @Override
    public void renderMarkup(final MarkupWriter writer, final MarkupRenderer renderer) {

      renderer.renderMarkup(writer);
      Element html = writer.getDocument().find("html");
      if (html != null) {
        Link link = pageRenderLinkSource.createPageRenderLinkWithContext(requestGlobals.getActivePageName());
        for (String parameterName : link.getParameterNames()) {
          link = link.removeParameter(parameterName);
        }
        String url = link.toURI();
        html.attributes("data-page-base-url", url);
      }
    }
  });
}
 
开发者ID:eddyson-de,项目名称:tapestry-react,代码行数:22,代码来源:ReactModule.java

示例3: addDataCollectors

import org.apache.tapestry5.ioc.OrderedConfiguration; //导入依赖的package包/类
@Contribute(DataCollectionService.class)
public static void addDataCollectors(
		OrderedConfiguration<DataCollectionService> configuration,
		Logger logger, DatabaseManagerService databaseManagerService) {

	// We do not care about order constraints for the moment

	// USE AUTOBUILD - Note that Now the collector with all its' own logger
	// and not the DataCollectionService one
	configuration.addInstance("state-transitions",
			TransitionSequenceCollector.class);

	configuration.add("controller-results", new ControllerResultsCollector(
			logger, databaseManagerService));

	configuration.add("service-results", new ServiceResultsCollector(
			logger, databaseManagerService));

	configuration.add("clients-results", new ClientsResultsCollector(
			logger, databaseManagerService));
}
 
开发者ID:alessiogambi,项目名称:iter,代码行数:22,代码来源:DataCollectionModule.java

示例4: provideClassTransformWorkers

import org.apache.tapestry5.ioc.OrderedConfiguration; //导入依赖的package包/类
@Contribute(ComponentClassTransformWorker2.class)
public static void provideClassTransformWorkers(OrderedConfiguration<ComponentClassTransformWorker2> configuration)
{
    // Using TransactionalUnits for @CommitAfter gives few advantages:
    // 1. Ability to register callbacks: before commit & after successful commit
    // 2. Nested @CommitAfter annotations will be ignored,
    // i.e. transaction will only be committed around top-level annotation
    configuration.overrideInstance("JPACommitAfter", TransactionalUnitWorker.class, "after:Log");
}
 
开发者ID:satago,项目名称:tapestry-jpa-transactions,代码行数:10,代码来源:TransactionalUnitsModule.java

示例5: contributeRequestHandler

import org.apache.tapestry5.ioc.OrderedConfiguration; //导入依赖的package包/类
/**
 * This is a contribution to the RequestHandler service configuration. This
 * is how we extend Tapestry using the timing filter. A common use for this
 * kind of filter is transaction management or security. The @Local
 * annotation selects the desired service by type, but only from the same
 * module. Without @Local, there would be an error due to the other
 * service(s) that implement RequestFilter (defined in other modules).
 */
public void contributeRequestHandler(OrderedConfiguration<RequestFilter> configuration, @Local RequestFilter filter) {
    // Each contribution to an ordered configuration has a name, When
    // necessary, you may
    // set constraints to precisely control the invocation order of the
    // contributed filter
    // within the pipeline.

    configuration.add("Timing", filter);
}
 
开发者ID:beargiles,项目名称:project-student,代码行数:18,代码来源:AppModule.java

示例6: contributeHibernateSessionSource

import org.apache.tapestry5.ioc.OrderedConfiguration; //导入依赖的package包/类
public void contributeHibernateSessionSource(OrderedConfiguration<HibernateConfigurer> configurer) {

		String path = globals.getServletContext().getInitParameter(AppConstants.IPNLEDGERPATH);
		// WARNING: This is here for the benefit of developers so they can switch
		// ledgers without having to use the StandaloneServer. WAR deployments
		// should be configured through the web.xml file and not a system property.
		// System properties apply to the whole servlet container, making it
		// impossible to serve multiple ledgers at once.
		path = System.getProperty("app.ledger", path);
		File dbdir = new File(System.getProperty("user.dir"));
		if (path != null) {
			dbdir = new File(path);
		}
		configurer.add("hibernate-session-source", new LedgerConfigurer(dbdir));
	}
 
开发者ID:onyxbits,项目名称:TradeTrax,代码行数:16,代码来源:AppModule.java

示例7: contributeMarkupRenderer

import org.apache.tapestry5.ioc.OrderedConfiguration; //导入依赖的package包/类
public void contributeMarkupRenderer(OrderedConfiguration<MarkupRendererFilter> configuration,
                                     final Environment environment) {
    MarkupRendererFilter bootstrapValidationDecorator = new MarkupRendererFilter() {

        public void renderMarkup(MarkupWriter writer, MarkupRenderer renderer) {
            environment.push(ValidationDecorator.class, new BootstrapValidationDecorator(environment, writer));
            renderer.renderMarkup(writer);
            environment.pop(ValidationDecorator.class);
        }
    };

    configuration.override("ValidationDecorator", bootstrapValidationDecorator);

}
 
开发者ID:dlwhitehurst,项目名称:musicrecital,代码行数:15,代码来源:AppModule.java

示例8: contributeRequestHandler

import org.apache.tapestry5.ioc.OrderedConfiguration; //导入依赖的package包/类
/**
 * Use to allow PageTester to run with spring and spring-security.
 *
 * @param config
 * @param requestGlobals
 */
public static void contributeRequestHandler(OrderedConfiguration<RequestFilter> config,
                                            final RequestGlobals requestGlobals) {
    RequestFilter filter = new RequestFilter() {
        public boolean service(Request request, Response response, RequestHandler handler)
                throws IOException {
            requestGlobals.storeServletRequestResponse(
                    new MockHttpServletRequest(),
                    new MockHttpServletResponse());

            return handler.service(request, response);
        }
    };
    config.add("SpringMockHttpRequestAndResponse", filter, "after:CheckForUpdates","before:URLRewriter");
}
 
开发者ID:dlwhitehurst,项目名称:musicrecital,代码行数:21,代码来源:AppTestModule.java

示例9: contributePropertiesFileAsSymbols

import org.apache.tapestry5.ioc.OrderedConfiguration; //导入依赖的package包/类
@Contribute(SymbolSource.class)
public void contributePropertiesFileAsSymbols(
		OrderedConfiguration<SymbolProvider> configuration) {
	configuration.add("DatabaseConfiguration",
			new ClasspathResourceSymbolProvider("database.properties"),
			"after:SystemProperties", "before:ApplicationDefaults");
}
 
开发者ID:Sotera,项目名称:graphene-walker,代码行数:8,代码来源:DTOGenerationModule.java

示例10: contributeRequestHandler

import org.apache.tapestry5.ioc.OrderedConfiguration; //导入依赖的package包/类
/**
 * This is a contribution to the RequestHandler service configuration. This is how we extend
 * Tapestry using the timing filter. A common use for this kind of filter is transaction
 * management or security. The @Local annotation selects the desired service by type, but only
 * from the same module.  Without @Local, there would be an error due to the other service(s)
 * that implement RequestFilter (defined in other modules).
 */
public void contributeRequestHandler(OrderedConfiguration<RequestFilter> configuration,
        @Local
        RequestFilter filter)
{
    // Each contribution to an ordered configuration has a name, When necessary, you may
    // set constraints to precisely control the invocation order of the contributed filter
    // within the pipeline.
    
    configuration.add("Timing", filter);
}
 
开发者ID:wso2as-developer,项目名称:tapestry-samples,代码行数:18,代码来源:AppModule.java

示例11: contributeRequestHandler

import org.apache.tapestry5.ioc.OrderedConfiguration; //导入依赖的package包/类
/**
 * This is a contribution to the RequestHandler service configuration. This is how we extend
 * Tapestry using the timing filter. A common use for this kind of filter is transaction
 * management or security. The @Local annotation selects the desired service by type, but only
 * from the same module.  Without @Local, there would be an error due to the other service(s)
 * that implement RequestFilter (defined in other modules).
 */
public void contributeRequestHandler(OrderedConfiguration<RequestFilter> configuration,
                                     @Local
                                     RequestFilter filter)
{
    // Each contribution to an ordered configuration has a name, When necessary, you may
    // set constraints to precisely control the invocation order of the contributed filter
    // within the pipeline.

    configuration.add("Timing", filter);
}
 
开发者ID:wso2as-developer,项目名称:tapestry-samples,代码行数:18,代码来源:AppModule.java

示例12: addAssertions

import org.apache.tapestry5.ioc.OrderedConfiguration; //导入依赖的package包/类
@Contribute(AssertionService.class)
public static void addAssertions(
		OrderedConfiguration<AssertionService> configuration,
		Logger logger, MathEngineDao dao, DatabaseManagerService dbService) {

	// Assertions over the Clients Requests ! Note that those require the
	// output being a valid JMeter XML !
	configuration.add("NoFailedRequests", new FailedRequestAssertion(
			logger, dbService));
	// QoS Related - thresholds can be read as well by file. TODO
	// NOTE THAT THIS IS SPECIFIC OF THE APPLICATION, SO WE MUST DEAL WITH
	// THIS IN A DIFFERENT WAY IN THE FUTURE
	double avgCreatePollMillis = 2000.0;
	double avgDeletePollMillis = 1500.0;
	double avgGetAllPollsMillis = 2000.0;
	double avgGetPollMillis = 500.0;
	double avgVotePollMillis = 1000.0;

	// THE ORDER HERE IS IMPORTATN !!!
	double[] thresholds = new double[] { avgCreatePollMillis,
			avgDeletePollMillis, avgGetAllPollsMillis, avgGetPollMillis,
			avgVotePollMillis };
	configuration.add("AvgRT",
			new DoodleWebServiceAvgResponseTimeAssertion(logger, dbService,
					thresholds));

}
 
开发者ID:alessiogambi,项目名称:iter,代码行数:28,代码来源:TestAssertions.java

示例13: addLinkTransformers

import org.apache.tapestry5.ioc.OrderedConfiguration; //导入依赖的package包/类
/**
 * Contributes the link transformers.
 * @param configuration an {@link OrderedConfiguration}.
 */
@Contribute(PageRenderLinkTransformer.class)
@Primary
public static void addLinkTransformers(OrderedConfiguration<PageRenderLinkTransformer> configuration) {
	configuration.addInstance("SubdomainTag", SubdomainTagLinkTransformer.class);
	configuration.addInstance("SubdomainPage", SubdomainPageLinkTransformer.class, "before:SubdomainTag");
}
 
开发者ID:thiagohp,项目名称:eloquentia,代码行数:11,代码来源:AppModule.java

示例14: provideTransformWorkers

import org.apache.tapestry5.ioc.OrderedConfiguration; //导入依赖的package包/类
@Contribute(ComponentClassTransformWorker2.class)
public static void provideTransformWorkers(
        OrderedConfiguration<ComponentClassTransformWorker2> configuration)
{
    configuration.addInstance("IncludeStylesheet", IncludeStylesheetWorker.class);
    configuration.addInstance("IncludeJavaScriptLibrary", IncludeJavaScriptLibraryWorker.class);
}
 
开发者ID:pubfactory,项目名称:tapestry-compat,代码行数:8,代码来源:CompatModule.java

示例15: setupObjectProviders

import org.apache.tapestry5.ioc.OrderedConfiguration; //导入依赖的package包/类
/**
 * Contribute the CLIOption/CLIInput injection services
 * 
 * @param configuration
 * 
 * @category UserContributions MasterObjectProvider
 */
@Contribute(MasterObjectProvider.class)
public static void setupObjectProviders(
		OrderedConfiguration<ObjectProvider> configuration) {

	configuration.addInstance("CLIOption", CLIOptionObjectProvider.class,
			"before:AnnotationBasedContributions");

	configuration.addInstance("CLIInput", CLIInputObjectProvider.class,
			"before:AnnotationBasedContributions");
}
 
开发者ID:alessiogambi,项目名称:tapestry5-cli,代码行数:18,代码来源:CLIModule.java


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