/** * Service interface for initializing Tapestry for the application. The service is a {@linkplain * org.apache.tapestry5.ioc.services.PipelineBuilder pipeline}, into which {@linkplain * org.apache.tapestry5.services.ApplicationInitializerFilter filters} may be contributed. */ @UsesOrderedConfiguration(ApplicationInitializerFilter.class) public interface ApplicationInitializer { void initializeApplication(Context context); }
/** * Service interface for initializing a servlet application, as a {@linkplain org.apache.tapestry5.ioc.services.PipelineBuilder * pipeline}. The terminator hands off to the {@link org.apache.tapestry5.services.ApplicationInitializer} service. */ @UsesOrderedConfiguration(ServletApplicationInitializerFilter.class) public interface ServletApplicationInitializer { void initializeApplication(ServletContext context); }
/** * */ @UsesOrderedConfiguration(ServerAddress.class) public interface MongoDBSource { /** * @return the {@link MongoClient} database connection object. */ public MongoClient getMongo(); }
/** * Organizes the tabs on the {@link org.apache.tapestry5.corelib.pages.T5Dashboard} page. * * @since 5.4 */ @UsesOrderedConfiguration(DashboardTab.class) public interface DashboardManager { List<String> getTabNames(); Block getTabContent(String tabName); }
/** * Service interface for the RequestHandler {@linkplain org.apache.tapestry5.ioc.services.PipelineBuilder pipeline} * service. At the end of the pipeline, the service hands off to the {@linkplain org.apache.tapestry5.services.Dispatcher * master dispatcher service}. */ @UsesOrderedConfiguration(RequestFilter.class) public interface RequestHandler { /** * Returns true if the request has been handled, false otherwise. */ boolean service(Request request, Response response) throws IOException; }
/** * The first step in handing an incoming request to the {@linkplain org.apache.tapestry5.TapestryFilter servlet filter}, * this constructed as a {@linkplain org.apache.tapestry5.ioc.services.PipelineBuilder pipeline}. The main * implementation hands off to the {@link org.apache.tapestry5.services.RequestHandler} service. */ @UsesOrderedConfiguration(HttpServletRequestFilter.class) public interface HttpServletRequestHandler { /** * Returns true if the request was handled, false otherwise. */ boolean service(HttpServletRequest request, HttpServletResponse response) throws IOException; }
/** * Used by {@link org.apache.tapestry5.corelib.components.ExceptionDisplay} to characterize each stack frame that is * presented. Implemented as a chain-of-command service. * * @since 5.1.0.0 */ @UsesOrderedConfiguration(StackTraceElementAnalyzer.class) public interface StackTraceElementAnalyzer { /** * Returns the CSS class appropriate to the frame. * * @param frame stack trace element to be analyzed * @return the CSS class name, or null */ String classForFrame(StackTraceElement frame); }
/** * Chain-of-responsibility service which defines rules for blocking access to classpath resources * based on their paths. Access is blocked if any rule says it should be blocked. * * @see ComponentEventRequestHandler */ @UsesOrderedConfiguration(ClasspathAssetProtectionRule.class) public interface ClasspathAssetProtectionRule { /** * Tells whether the access to the resource with this path should be blocked or not. * If this rule doesn't concern the given path, it should return false. */ public boolean block(String path); }
/** * Service that provides information about component libraries. * * @since 5.4 * @see LibraryMapping * @see ComponentLibraryInfo */ @UsesOrderedConfiguration(ComponentLibraryInfoSource.class) public interface ComponentLibraryInfoSource { /** * Finds information about a component library. * @param libraryMapping the {@link LibraryMapping} that defined a component library. * @return a {@link ComponentLibraryInfo} or <code>null</code>. */ ComponentLibraryInfo find(LibraryMapping libraryMapping); }
/** * Handles a invocation related to rendering out a pages complete content. * * The PageRenderRequestHandler service is an extensible {@linkplain org.apache.tapestry5.ioc.services.PipelineBuilder * pipeline}. */ @UsesOrderedConfiguration(PageRenderRequestFilter.class) public interface PageRenderRequestHandler { /** * Invoked to activate and render a page. In certain cases, based on values returned when activating the page, a * {@link org.apache.tapestry5.services.ComponentEventResultProcessor} may be used to send an alternate response * (typically, a redirect). * * @param parameters defines the page name and activation context */ void handle(PageRenderRequestParameters parameters) throws IOException; }
/** * A bridge from Spring's approach to customizing the application context, over to Tapestry's approach. This is a * chain-of-command service. */ @UsesOrderedConfiguration(ApplicationContextCustomizer.class) public interface ApplicationContextCustomizer { /** * Allows the instantiated application context to be customized before it is initially {@linkplain * org.springframework.context.ConfigurableApplicationContext#refresh() refreshed}. * * @param servletContext * @param applicationContext */ void customizeApplicationContext(ServletContext servletContext, ConfigurableWebApplicationContext applicationContext); }
/** * A dispatcher is responsible for recognizing an incoming request. Dispatchers form an ordered chain of command, with * each dispatcher responsible for recognizing requests that it can process. This is the interface for the * MasterDispatcher service, which takes an ordered configuration of Dispatchers (that is, the chain of command * pattern). If no dispatcher processes the request, it will ultimately be passed off to the servlet container. */ @UsesOrderedConfiguration(Dispatcher.class) public interface Dispatcher { /** * Analyzes the incoming request and performs an appropriate operation for each. * * @return true if a response was delivered, false if the dispatcher did not handle the request (and a search for a * handler should continue) */ boolean dispatch(Request request, Response response) throws IOException; }
/** * Creates {@link javax.validation.ValidatorFactory}. * * @since 5.2.0.0 */ @UsesOrderedConfiguration(BeanValidatorConfigurer.class) public interface BeanValidatorSource { /** * Creates a new Validator. */ Validator create(); /** * Returns the ValidatorFactory from which Validators are created. */ ValidatorFactory getValidatorFactory(); }
/** * Analyzes the current request to see if it is on the whitelist (of clients with access to certain key pages). * This is implemented as a chain-of-command of {@link WhitelistAnalyzer}s. * * @see org.apache.tapestry5.annotations.WhitelistAccessOnly * @since 5.3 */ @UsesOrderedConfiguration(WhitelistAnalyzer.class) public interface ClientWhitelist { /** * Analyzes the current request, returning true if it is on the whitelist. * */ boolean isClientRequestOnWhitelist(); }
/** * Creates {@link javax.validation.ValidatorFactory}. * * @since 5.2.0.0 */ @UsesOrderedConfiguration(BeanValidatorConfigurer.class) public interface BeanValidatorSource { /** * Creates a new Validator. */ Validator create(); /** * Returns the ValidatorFactory from which Validators are created. */ ValidatorFactory getValidatorFactory(); }
/** * A bridge from Spring's approach to customizing the application context, over to Tapestry's approach. This is a * chain-of-command service. */ @UsesOrderedConfiguration(ApplicationContextCustomizer.class) public interface ApplicationContextCustomizer { /** * Allows the instantiated application context to be customized before it is initially {@linkplain * org.springframework.context.ConfigurableApplicationContext#refresh() refreshed}. * * @param servletContext * @param applicationContext */ void customizeApplicationContext(ServletContext servletContext, ConfigurableWebApplicationContext applicationContext); }
/** * An object which will perform rendering of a page (or portion of a page). This interface exists to be filtered via * {@link org.apache.tapestry5.services.MarkupRendererFilter}. * * The MarkupRenderer service takes an ordered configuration of {@link org.apache.tapestry5.services.MarkupRendererFilter}s, * which are used for ordinary page rendering (as opposed to {@linkplain org.apache.tapestry5.services.PartialMarkupRenderer * partial page rendering} for Ajax requests). The MarkupRenderer service may be selected using the * * @see org.apache.tapestry5.ioc.annotations.Primary */ @UsesOrderedConfiguration(MarkupRendererFilter.class) public interface MarkupRenderer { /** * Invoked to render some markup. * * @param writer to which markup should be written */ void renderMarkup(MarkupWriter writer); }
/** * Maps a method from a service interface to a fully-qualified Clojure function name, as a Clojure * {@link clojure.lang.Symbol}. This service is itself a chain of command, to support adding or overriding * the mapping. */ @UsesOrderedConfiguration(MethodToFunctionSymbolMapper.class) public interface MethodToFunctionSymbolMapper { /** * @param namespace * namespace for the service (from {@link Namespace} annotation) * @param method * method for which a function name is desired. * @return Symbol for this method, or null (to drop down to next mapper) */ Symbol mapMethod(String namespace, Method method); }
/** * Responsible for creating a Hibernate session as needed. Internally, is responsible for Hibernate {@link * Configuration}, resulting in a {@link SessionFactory}. * * The service's configuration is a {@linkplain org.apache.tapestry5.ioc.services.ChainBuilder chain of command} of * configurator objects. */ @UsesOrderedConfiguration(HibernateConfigurer.class) public interface HibernateSessionSource { /** * Creates a new session using the {@link #getSessionFactory() SessionFactory} created at service startup. */ Session create(); /** * Returns the SessionFactory from which Hibernate sessions are created. */ SessionFactory getSessionFactory(); /** * Returns the final configuration used to create the {@link SessionFactory}. The configuration is immutable. */ Configuration getConfiguration(); }
/** * Service that collects the {@link ServiceConfigurationListener}s. Don't use this service directly. */ @UsesOrderedConfiguration(ServiceConfigurationListener.class) final public class ServiceConfigurationListenerHub { final private List<ServiceConfigurationListener> listeners; public ServiceConfigurationListenerHub(List<ServiceConfigurationListener> listeners) { super(); this.listeners = Collections.unmodifiableList(listeners); } /** * Returns the list of service configuration listeners. */ public List<ServiceConfigurationListener> getListeners() { return listeners; } }