Examples of DefinitionsFactory


Examples of org.apache.tiles.definition.DefinitionsFactory

                if (param != null) {
                    initParams.put(BasicTilesContainer.DEFINITIONS_CONFIG,
                            param);
                }

                DefinitionsFactory defsFactory =
                    (DefinitionsFactory) createFactory(config,
                            DEFINITIONS_FACTORY_INIT_PARAM);
                ((KeyedDefinitionsFactoryTilesContainer) container)
                        .setDefinitionsFactory(keys[i], defsFactory,
                                initParams);
View Full Code Here

Examples of org.apache.tiles.definition.DefinitionsFactory

                                              BasicTilesContainer container) throws TilesException {
        TilesContextFactory contextFactory =
            (TilesContextFactory) createFactory(configuration,
                CONTEXT_FACTORY_INIT_PARAM);

        DefinitionsFactory defsFactory =
            (DefinitionsFactory) createFactory(configuration,
                DEFINITIONS_FACTORY_INIT_PARAM);

        PreparerFactory prepFactory =
            (PreparerFactory) createFactory(configuration,
View Full Code Here

Examples of org.apache.tiles.definition.DefinitionsFactory

     * @return the definitions factory used by this container. If the key is not
     * valid, the default factory will be returned.
     * @param key The key of the needed definitions factory.
     */
    public DefinitionsFactory getDefinitionsFactory(String key) {
      DefinitionsFactory retValue = null;
     
      if (key != null) {
        retValue = key2definitionsFactory.get(key);
      }
      if (retValue == null) {
View Full Code Here

Examples of org.apache.tiles.definition.DefinitionsFactory

     * @return the definitions factory used by this container. If the key is not
     * valid, <code>null</code> will be returned.
     * @param key The key of the needed definitions factory.
     */
    public DefinitionsFactory getProperDefinitionsFactory(String key) {
        DefinitionsFactory retValue = null;
       
        if (key != null) {
            retValue = key2definitionsFactory.get(key);
        }
       
View Full Code Here

Examples of org.apache.tiles.definition.DefinitionsFactory

    protected ComponentDefinition getDefinition(String definitionName,
            TilesRequestContext request) throws DefinitionsFactoryException {
        ComponentDefinition retValue = null;
        String key = getDefinitionsFactoryKey(request);
        if (key != null) {
            DefinitionsFactory definitionsFactory =
                key2definitionsFactory.get(key);
            if (definitionsFactory != null) {
                retValue = definitionsFactory.getDefinition(definitionName,
                        request);
            }
        }
        if (retValue == null) {
            retValue = super.getDefinition(definitionName, request);
View Full Code Here

Examples of org.apache.tiles.definition.DefinitionsFactory

     * @return the definitions factory used by this container. If the key is not
     * valid, the default factory will be returned.
     * @param key The key of the needed definitions factory.
     */
    public DefinitionsFactory getDefinitionsFactory(String key) {
        DefinitionsFactory retValue = null;

        if (key != null) {
            retValue = key2definitionsFactory.get(key);
        }
        if (retValue == null) {
View Full Code Here

Examples of org.apache.tiles.definition.DefinitionsFactory

     * @return the definitions factory used by this container. If the key is not
     * valid, <code>null</code> will be returned.
     * @param key The key of the needed definitions factory.
     */
    public DefinitionsFactory getProperDefinitionsFactory(String key) {
        DefinitionsFactory retValue = null;

        if (key != null) {
            retValue = key2definitionsFactory.get(key);
        }

View Full Code Here

Examples of org.apache.tiles.definition.DefinitionsFactory

    protected Definition getDefinition(String definitionName,
            TilesRequestContext request) {
        Definition retValue = null;
        String key = getDefinitionsFactoryKey(request);
        if (key != null) {
            DefinitionsFactory definitionsFactory =
                key2definitionsFactory.get(key);
            if (definitionsFactory != null) {
                retValue = definitionsFactory.getDefinition(definitionName,
                        request);
            }
        }
        if (retValue == null) {
            retValue = super.getDefinition(definitionName, request);
View Full Code Here

Examples of org.apache.tiles.definition.DefinitionsFactory

        assertNull(container.getProperDefinitionsFactory("two"));

        initParams = new HashMap<String, String>();
        initParams.put(DefinitionsFactory.DEFINITIONS_CONFIG,
                "/WEB-INF/tiles-one.xml");
        DefinitionsFactory defsFactory = factory.createDefinitionsFactory(context);
        defsFactory.init(initParams);
        container.setDefinitionsFactory("one", defsFactory);
        initParams.put(DefinitionsFactory.DEFINITIONS_CONFIG,
                "/WEB-INF/tiles-two.xml");
        defsFactory = factory.createDefinitionsFactory(context);
        defsFactory.init(initParams);
        container.setDefinitionsFactory("two", defsFactory);
        assertNotNull(container.getProperDefinitionsFactory("one"));
        assertNotNull(container.getProperDefinitionsFactory("two"));
    }
View Full Code Here

Examples of org.apache.tiles.definition.DefinitionsFactory

    public void testCreateDefinitionsFactory() {
        TilesRequestContextFactory requestContextFactory = factory
                .createRequestContextFactory(applicationContext);
        LocaleResolver resolver = factory.createLocaleResolver(applicationContext,
                requestContextFactory);
        DefinitionsFactory defsFactory = factory.createDefinitionsFactory(
                applicationContext, requestContextFactory, resolver);
        assertTrue("The class of the definitions factory is not correct",
                defsFactory instanceof UrlDefinitionsFactory);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.