You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2013/11/01 02:15:37 UTC
svn commit: r1537798 [1/2] - in /myfaces/core/trunk/impl/src:
main/java/org/apache/myfaces/config/
main/java/org/apache/myfaces/config/element/
main/java/org/apache/myfaces/config/element/facelets/
main/java/org/apache/myfaces/config/impl/digester/ mai...
Author: lu4242
Date: Fri Nov 1 01:15:36 2013
New Revision: 1537798
URL: http://svn.apache.org/r1537798
Log:
MYFACES-3812 Cleanup Facelets Initialization Code and decouple facelets taglibrary config parsing
Added:
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletBehaviorTag.java (with props)
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletComponentTag.java (with props)
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletConverterTag.java (with props)
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletFunction.java (with props)
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletHandlerTag.java (with props)
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletSourceTag.java (with props)
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletTag.java (with props)
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletTagDefinition.java (with props)
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletTagLibrary.java (with props)
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletValidatorTag.java (with props)
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/ (with props)
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletBehaviorTagImpl.java (with props)
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletComponentTagImpl.java (with props)
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletConverterTagImpl.java (with props)
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletFunctionImpl.java (with props)
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletHandlerTagImpl.java (with props)
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletSourceTagImpl.java (with props)
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletTagImpl.java (with props)
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletTagLibraryImpl.java (with props)
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletValidatorTagImpl.java (with props)
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/FaceletsCompilerSupport.java (with props)
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/TagLibraryConfigUnmarshallerImpl.java (with props)
Removed:
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewHandler.java
Modified:
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/DefaultFacesConfigurationMerger.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/DefaultFacesConfigurationProvider.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/RuntimeConfig.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/FacesConfig.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/FacesConfigData.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/DigesterFacesConfigDispenserImpl.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/FacesConfig.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/spi/FacesConfigurationProvider.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/spi/FacesConfigurationProviderWrapper.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletsVDLUtils.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/Compiler.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/TagLibraryConfig.java
myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/view/facelets/FaceletMultipleRequestsTestCase.java
myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/view/facelets/FaceletTestCase.java
myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/view/facelets/compiler/TagLibraryTestCase.java
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/DefaultFacesConfigurationMerger.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/DefaultFacesConfigurationMerger.java?rev=1537798&r1=1537797&r2=1537798&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/DefaultFacesConfigurationMerger.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/DefaultFacesConfigurationMerger.java Fri Nov 1 01:15:36 2013
@@ -112,6 +112,19 @@ public class DefaultFacesConfigurationMe
// apply the ordering and sorting algorithm
orderAndFeedArtifacts(dispenser, appConfigResources, webAppFacesConfig);
+
+ List<FacesConfig> faceletTagLibFacesConfig =
+ facesConfigProvider.getFaceletTaglibFacesConfig(externalContext);
+
+ // at last feed facelet taglib faces config. These ones does not need
+ // to be included in the ordering algorithm.
+ if (faceletTagLibFacesConfig != null && !faceletTagLibFacesConfig.isEmpty())
+ {
+ for (FacesConfig fc : faceletTagLibFacesConfig)
+ {
+ dispenser.feed(fc);
+ }
+ }
LogMetaInfUtils.logMetaInf();
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/DefaultFacesConfigurationProvider.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/DefaultFacesConfigurationProvider.java?rev=1537798&r1=1537797&r2=1537798&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/DefaultFacesConfigurationProvider.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/DefaultFacesConfigurationProvider.java Fri Nov 1 01:15:36 2013
@@ -18,6 +18,7 @@
*/
package org.apache.myfaces.config;
+import java.io.FileNotFoundException;
import org.apache.myfaces.config.annotation.AnnotationConfigurator;
import org.apache.myfaces.config.element.FacesConfig;
import org.apache.myfaces.config.impl.digester.DigesterFacesConfigUnmarshallerImpl;
@@ -51,6 +52,7 @@ import java.util.StringTokenizer;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.faces.application.ApplicationConfigurationPopulator;
+import javax.faces.application.ViewHandler;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
@@ -61,11 +63,17 @@ import javax.xml.transform.TransformerEx
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
+import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFWebConfigParam;
+import org.apache.myfaces.config.element.facelets.FaceletTagLibrary;
import org.apache.myfaces.config.impl.digester.elements.FacesFlowDefinitionImpl;
import org.apache.myfaces.config.impl.digester.elements.FacesFlowReturnImpl;
import org.apache.myfaces.config.impl.digester.elements.NavigationCase;
import org.apache.myfaces.shared.util.FastWriter;
+import org.apache.myfaces.shared.util.WebConfigParamUtils;
+import org.apache.myfaces.spi.FaceletConfigResourceProvider;
+import org.apache.myfaces.spi.FaceletConfigResourceProviderFactory;
import org.apache.myfaces.spi.ServiceProviderFinder;
+import org.apache.myfaces.view.facelets.compiler.TagLibraryConfigUnmarshallerImpl;
import org.w3c.dom.DOMImplementation;
import org.w3c.dom.Document;
@@ -96,6 +104,17 @@ public class DefaultFacesConfigurationPr
FACTORY_NAMES.add(FactoryFinder.VISIT_CONTEXT_FACTORY);
FACTORY_NAMES.add(FactoryFinder.VIEW_DECLARATION_LANGUAGE_FACTORY);
}
+
+ /**
+ * Set of .taglib.xml files, separated by ';' that should be loaded by facelet engine.
+ */
+ @JSFWebConfigParam(since = "2.0",
+ desc = "Set of .taglib.xml files, separated by ';' that should be loaded by facelet engine.",
+ deprecated = true)
+ private final static String PARAM_LIBRARIES_DEPRECATED = "facelets.LIBRARIES";
+
+ private final static String[] PARAMS_LIBRARIES = {ViewHandler.FACELETS_LIBRARIES_PARAM_NAME,
+ PARAM_LIBRARIES_DEPRECATED};
private static final Logger log = Logger.getLogger(DefaultFacesConfigurationProvider.class.getName());
@@ -720,4 +739,80 @@ public class DefaultFacesConfigurationPr
}
}
}
-}
+
+ @Override
+ public List<FacesConfig> getFaceletTaglibFacesConfig(ExternalContext externalContext)
+ {
+ List<FacesConfig> facesConfigFilesList = new ArrayList<FacesConfig>();
+
+ String param = WebConfigParamUtils.getStringInitParameter(externalContext, PARAMS_LIBRARIES);
+ if (param != null)
+ {
+ for (String library : param.split(";"))
+ {
+ try
+ {
+ URL src = externalContext.getResource(library.trim());
+ if (src == null)
+ {
+ throw new FileNotFoundException(library);
+ }
+
+ FaceletTagLibrary tl = TagLibraryConfigUnmarshallerImpl.create(externalContext, src);
+ if (tl != null)
+ {
+ org.apache.myfaces.config.impl.digester.elements.FacesConfig config =
+ new org.apache.myfaces.config.impl.digester.elements.FacesConfig();
+ config.addFaceletTagLibrary(tl);
+ facesConfigFilesList.add(config);
+ }
+ if (log.isLoggable(Level.FINE))
+ {
+ log.fine("Successfully loaded library: " + library);
+ }
+ }
+ catch (IOException e)
+ {
+ log.log(Level.SEVERE, "Error Loading library: " + library, e);
+ }
+ }
+ }
+
+ try
+ {
+ FaceletConfigResourceProvider provider = FaceletConfigResourceProviderFactory.
+ getFacesConfigResourceProviderFactory(externalContext).
+ createFaceletConfigResourceProvider(externalContext);
+ Collection<URL> urls = provider.getFaceletTagLibConfigurationResources(externalContext);
+ for (URL url : urls)
+ {
+ try
+ {
+ FaceletTagLibrary tl = TagLibraryConfigUnmarshallerImpl.create(externalContext, url);
+ if (tl != null)
+ {
+ org.apache.myfaces.config.impl.digester.elements.FacesConfig config =
+ new org.apache.myfaces.config.impl.digester.elements.FacesConfig();
+ config.addFaceletTagLibrary(tl);
+ facesConfigFilesList.add(config);
+ }
+ if (log.isLoggable(Level.FINE))
+ {
+ //log.fine("Added Library from: " + urls[i]);
+ log.fine("Added Library from: " + url);
+ }
+ }
+ catch (Exception e)
+ {
+ //log.log(Level.SEVERE, "Error Loading Library: " + urls[i], e);
+ log.log(Level.SEVERE, "Error Loading Library: " + url, e);
+ }
+ }
+ }
+ catch (IOException e)
+ {
+ log.log(Level.SEVERE, "Compiler Initialization Error", e);
+ }
+ return facesConfigFilesList;
+ }
+}
\ No newline at end of file
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java?rev=1537798&r1=1537797&r2=1537798&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java Fri Nov 1 01:15:36 2013
@@ -133,6 +133,7 @@ import org.apache.myfaces.shared.util.We
import org.apache.myfaces.shared_impl.util.serial.DefaultSerialFactory;
import org.apache.myfaces.shared_impl.util.serial.SerialFactory;
import org.apache.myfaces.cdi.dependent.BeanEntry;
+import org.apache.myfaces.config.element.facelets.FaceletTagLibrary;
import org.apache.myfaces.spi.FacesConfigurationMerger;
import org.apache.myfaces.spi.FacesConfigurationMergerFactory;
import org.apache.myfaces.spi.InjectionProvider;
@@ -1045,6 +1046,11 @@ public class FacesConfigurator
{
runtimeConfig.addResourceResolver(resourceResolver);
}
+
+ for (FaceletTagLibrary faceletTagLibrary : dispenser.getTagLibraries())
+ {
+ runtimeConfig.addFaceletTagLibrary(faceletTagLibrary);
+ }
}
private void removePurgedBeansFromSessionAndApplication(RuntimeConfig runtimeConfig)
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/RuntimeConfig.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/RuntimeConfig.java?rev=1537798&r1=1537797&r2=1537798&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/RuntimeConfig.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/RuntimeConfig.java Fri Nov 1 01:15:36 2013
@@ -43,6 +43,7 @@ import org.apache.myfaces.config.element
import org.apache.myfaces.config.element.ManagedBean;
import org.apache.myfaces.config.element.NavigationRule;
import org.apache.myfaces.config.element.ResourceBundle;
+import org.apache.myfaces.config.element.facelets.FaceletTagLibrary;
/**
* Holds all configuration information (from the faces-config xml files) that is needed later during runtime. The config
@@ -112,6 +113,8 @@ public class RuntimeConfig
private List<String> _resourceResolvers = new ArrayList<String>();
private List<Object> _injectedObjects = new ArrayList<Object>();
+
+ private List<FaceletTagLibrary> _faceletTagLibraries = new ArrayList<FaceletTagLibrary>();
public static RuntimeConfig getCurrentInstance(ExternalContext externalContext)
{
@@ -137,6 +140,7 @@ public class RuntimeConfig
_classLoaderResourceLibraryContracts.clear();
_resourceLibraryContracts.clear();
_injectedObjects.clear();
+ _faceletTagLibraries.clear();
}
/**
@@ -200,6 +204,16 @@ public class RuntimeConfig
return Collections.unmodifiableList(_componentTagDeclarations);
}
+ public void addFaceletTagLibrary(FaceletTagLibrary library)
+ {
+ _faceletTagLibraries.add(library);
+ }
+
+ public List<FaceletTagLibrary> getFaceletTagLibraries()
+ {
+ return Collections.unmodifiableList(_faceletTagLibraries);
+ }
+
public final void addConverterConfiguration(final String converterClassName,
final org.apache.myfaces.config.element.Converter configuration)
{
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/FacesConfig.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/FacesConfig.java?rev=1537798&r1=1537797&r2=1537798&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/FacesConfig.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/FacesConfig.java Fri Nov 1 01:15:36 2013
@@ -22,6 +22,7 @@ import java.io.Serializable;
import java.util.Collections;
import java.util.List;
import java.util.Map;
+import org.apache.myfaces.config.element.facelets.FaceletTagLibrary;
/**
* @author <a href="mailto:oliver@rossmueller.com">Oliver Rossmueller</a>
@@ -107,4 +108,13 @@ public abstract class FacesConfig implem
{
return Collections.emptyList();
}
+
+ /**
+ * @since 2.2.0
+ * @return
+ */
+ public List<FaceletTagLibrary> getFaceletTagLibraryList()
+ {
+ return Collections.emptyList();
+ }
}
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/FacesConfigData.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/FacesConfigData.java?rev=1537798&r1=1537797&r2=1537798&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/FacesConfigData.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/FacesConfigData.java Fri Nov 1 01:15:36 2013
@@ -21,6 +21,7 @@ package org.apache.myfaces.config.elemen
import java.io.Serializable;
import java.util.Collection;
import java.util.Collections;
+import org.apache.myfaces.config.element.facelets.FaceletTagLibrary;
@@ -279,4 +280,9 @@ public abstract class FacesConfigData im
{
return Collections.emptyList();
}
+
+ public Collection<FaceletTagLibrary> getTagLibraries()
+ {
+ return Collections.emptyList();
+ }
}
Added: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletBehaviorTag.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletBehaviorTag.java?rev=1537798&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletBehaviorTag.java (added)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletBehaviorTag.java Fri Nov 1 01:15:36 2013
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.config.element.facelets;
+
+import java.io.Serializable;
+
+/**
+ *
+ */
+public abstract class FaceletBehaviorTag extends FaceletTagDefinition implements Serializable
+{
+ public abstract String getBehaviorId();
+
+ public abstract String getHandlerClass();
+}
Propchange: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletBehaviorTag.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletComponentTag.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletComponentTag.java?rev=1537798&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletComponentTag.java (added)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletComponentTag.java Fri Nov 1 01:15:36 2013
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.config.element.facelets;
+
+import java.io.Serializable;
+
+/**
+ *
+ */
+public abstract class FaceletComponentTag extends FaceletTagDefinition implements Serializable
+{
+ public abstract String getComponentType();
+
+ public abstract String getResourceId();
+
+ public abstract String getHandlerClass();
+
+ public abstract String getRendererType();
+
+}
Propchange: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletComponentTag.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletConverterTag.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletConverterTag.java?rev=1537798&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletConverterTag.java (added)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletConverterTag.java Fri Nov 1 01:15:36 2013
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.config.element.facelets;
+
+import java.io.Serializable;
+
+/**
+ *
+ */
+public abstract class FaceletConverterTag extends FaceletTagDefinition implements Serializable
+{
+ public abstract String getConverterId();
+
+ public abstract String getHandlerClass();
+
+}
Propchange: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletConverterTag.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletFunction.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletFunction.java?rev=1537798&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletFunction.java (added)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletFunction.java Fri Nov 1 01:15:36 2013
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.config.element.facelets;
+
+import java.io.Serializable;
+
+/**
+ *
+ */
+public abstract class FaceletFunction implements Serializable
+{
+ public abstract String getFunctionName();
+
+ public abstract String getFunctionClass();
+
+ public abstract String getFunctionSignature();
+}
Propchange: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletFunction.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletHandlerTag.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletHandlerTag.java?rev=1537798&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletHandlerTag.java (added)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletHandlerTag.java Fri Nov 1 01:15:36 2013
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.config.element.facelets;
+
+import java.io.Serializable;
+
+/**
+ *
+ */
+public abstract class FaceletHandlerTag extends FaceletTagDefinition implements Serializable
+{
+ public abstract String getHandlerClass();
+}
Propchange: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletHandlerTag.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletSourceTag.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletSourceTag.java?rev=1537798&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletSourceTag.java (added)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletSourceTag.java Fri Nov 1 01:15:36 2013
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.config.element.facelets;
+
+import java.io.Serializable;
+
+/**
+ *
+ */
+public abstract class FaceletSourceTag extends FaceletTagDefinition implements Serializable
+{
+ public abstract String getSource();
+}
Propchange: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletSourceTag.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletTag.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletTag.java?rev=1537798&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletTag.java (added)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletTag.java Fri Nov 1 01:15:36 2013
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.config.element.facelets;
+
+import java.io.Serializable;
+
+/**
+ *
+ */
+public abstract class FaceletTag implements Serializable
+{
+ public abstract String getName();
+
+ public abstract FaceletTagDefinition getTagDefinition();
+
+ public final boolean isComponentTag()
+ {
+ return getTagDefinition() instanceof FaceletComponentTag;
+ }
+
+ public final boolean isBehaviorTag()
+ {
+ return getTagDefinition() instanceof FaceletBehaviorTag;
+ }
+
+ public final boolean isConverterTag()
+ {
+ return getTagDefinition() instanceof FaceletConverterTag;
+ }
+
+ public final boolean isValidatorTag()
+ {
+ return getTagDefinition() instanceof FaceletValidatorTag;
+ }
+
+ public final boolean isHandlerTag()
+ {
+ return getTagDefinition() instanceof FaceletHandlerTag;
+ }
+
+ public final boolean isSourceTag()
+ {
+ return getTagDefinition() instanceof FaceletSourceTag;
+ }
+
+}
Propchange: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletTag.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletTagDefinition.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletTagDefinition.java?rev=1537798&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletTagDefinition.java (added)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletTagDefinition.java Fri Nov 1 01:15:36 2013
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.config.element.facelets;
+
+import java.io.Serializable;
+
+/**
+ *
+ */
+public abstract class FaceletTagDefinition implements Serializable
+{
+
+}
Propchange: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletTagDefinition.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletTagLibrary.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletTagLibrary.java?rev=1537798&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletTagLibrary.java (added)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletTagLibrary.java Fri Nov 1 01:15:36 2013
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.config.element.facelets;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ *
+ */
+public abstract class FaceletTagLibrary implements Serializable
+{
+
+ public abstract String getNamespace();
+
+ public abstract String getShortName();
+
+ public abstract String getCompositeLibraryName();
+
+ public abstract String getLibraryClass();
+
+ public abstract List<FaceletTag> getTags();
+
+ public abstract List<FaceletFunction> getFunctions();
+}
Propchange: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletTagLibrary.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletValidatorTag.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletValidatorTag.java?rev=1537798&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletValidatorTag.java (added)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletValidatorTag.java Fri Nov 1 01:15:36 2013
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.config.element.facelets;
+
+import java.io.Serializable;
+
+/**
+ *
+ */
+public abstract class FaceletValidatorTag extends FaceletTagDefinition implements Serializable
+{
+ public abstract String getValidatorId();
+
+ public abstract String getHandlerClass();
+
+}
Propchange: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletValidatorTag.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/DigesterFacesConfigDispenserImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/DigesterFacesConfigDispenserImpl.java?rev=1537798&r1=1537797&r2=1537798&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/DigesterFacesConfigDispenserImpl.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/DigesterFacesConfigDispenserImpl.java Fri Nov 1 01:15:36 2013
@@ -48,6 +48,7 @@ import org.apache.myfaces.config.element
import org.apache.myfaces.config.element.RenderKit;
import org.apache.myfaces.config.element.ResourceBundle;
import org.apache.myfaces.config.element.SystemEventListener;
+import org.apache.myfaces.config.element.facelets.FaceletTagLibrary;
/**
* @author <a href="mailto:oliver@rossmueller.com">Oliver Rossmueller</a>
@@ -122,6 +123,7 @@ public class DigesterFacesConfigDispense
private List<ContractMapping> resourceLibraryContractMappings = new ArrayList<ContractMapping>();
private List<ComponentTagDeclaration> componentTagDeclarations = new ArrayList<ComponentTagDeclaration>();
+ private List<FaceletTagLibrary> faceletTagLibraries = new ArrayList<FaceletTagLibrary>();
private List <String> resourceResolvers = new ArrayList<String>();
@@ -270,6 +272,8 @@ public class DigesterFacesConfigDispense
{
componentTagDeclarations.add(declaration);
}
+
+ faceletTagLibraries.addAll(config.getFaceletTagLibraryList());
lifecyclePhaseListeners.addAll(config.getLifecyclePhaseListener());
managedBeans.addAll(config.getManagedBeans());
@@ -782,4 +786,11 @@ public class DigesterFacesConfigDispense
{
return resourceResolvers;
}
+
+ @Override
+ public Collection<FaceletTagLibrary> getTagLibraries()
+ {
+ return faceletTagLibraries;
+ }
+
}
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/FacesConfig.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/FacesConfig.java?rev=1537798&r1=1537797&r2=1537798&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/FacesConfig.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/FacesConfig.java Fri Nov 1 01:15:36 2013
@@ -20,11 +20,13 @@ package org.apache.myfaces.config.impl.d
import java.io.Serializable;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.myfaces.config.element.ComponentTagDeclaration;
import org.apache.myfaces.config.element.FacesFlowDefinition;
+import org.apache.myfaces.config.element.facelets.FaceletTagLibrary;
/**
* @author <a href="mailto:oliver@rossmueller.com">Oliver Rossmueller</a>
@@ -63,6 +65,8 @@ public class FacesConfig extends org.apa
private List <String> protectedViewsUrlPatternList
= new ArrayList<String>();
private List <String> resourceResolvers = new ArrayList<String>();
+ private List<FaceletTagLibrary> faceletTagLibraryList;
+ private transient List<FaceletTagLibrary> unmodifiableFaceletTagLibraryList;
private String metadataComplete;
private String version;
@@ -302,4 +306,27 @@ public class FacesConfig extends org.apa
resourceResolvers.add(resourceResolverClass);
}
+ @Override
+ public List<FaceletTagLibrary> getFaceletTagLibraryList()
+ {
+ if (faceletTagLibraryList == null)
+ {
+ return Collections.emptyList();
+ }
+ if (unmodifiableFaceletTagLibraryList == null)
+ {
+ unmodifiableFaceletTagLibraryList =
+ Collections.unmodifiableList(faceletTagLibraryList);
+ }
+ return unmodifiableFaceletTagLibraryList;
+ }
+
+ public void addFaceletTagLibrary(FaceletTagLibrary library)
+ {
+ if (faceletTagLibraryList == null)
+ {
+ faceletTagLibraryList = new ArrayList<FaceletTagLibrary>();
+ }
+ faceletTagLibraryList.add(library);
+ }
}
Propchange: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/
------------------------------------------------------------------------------
bugtraq:number = true
Added: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletBehaviorTagImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletBehaviorTagImpl.java?rev=1537798&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletBehaviorTagImpl.java (added)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletBehaviorTagImpl.java Fri Nov 1 01:15:36 2013
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.config.impl.digester.elements.facelets;
+
+import java.io.Serializable;
+import org.apache.myfaces.config.element.facelets.FaceletBehaviorTag;
+
+/**
+ *
+ */
+public class FaceletBehaviorTagImpl extends FaceletBehaviorTag implements Serializable
+{
+ private String behaviorId;
+ private String handlerClass;
+
+ public FaceletBehaviorTagImpl()
+ {
+ }
+
+ public FaceletBehaviorTagImpl(String behaviorId)
+ {
+ this.behaviorId = behaviorId;
+ }
+
+ public FaceletBehaviorTagImpl(String behaviorId, String handlerClass)
+ {
+ this.behaviorId = behaviorId;
+ this.handlerClass = handlerClass;
+ }
+
+ public String getBehaviorId()
+ {
+ return behaviorId;
+ }
+
+ public void setBehaviorId(String behaviorId)
+ {
+ this.behaviorId = behaviorId;
+ }
+
+ public String getHandlerClass()
+ {
+ return handlerClass;
+ }
+
+ public void setHandlerClass(String handlerClass)
+ {
+ this.handlerClass = handlerClass;
+ }
+}
Propchange: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletBehaviorTagImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletComponentTagImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletComponentTagImpl.java?rev=1537798&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletComponentTagImpl.java (added)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletComponentTagImpl.java Fri Nov 1 01:15:36 2013
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.config.impl.digester.elements.facelets;
+
+import java.io.Serializable;
+import org.apache.myfaces.config.element.facelets.FaceletComponentTag;
+
+/**
+ *
+ */
+public class FaceletComponentTagImpl extends FaceletComponentTag implements Serializable
+{
+ private String componentType;
+ private String rendererType;
+ private String handlerClass;
+ private String resourceId;
+
+ public FaceletComponentTagImpl()
+ {
+ }
+
+ public FaceletComponentTagImpl(String componentType, String rendererType, String handlerClass, String resourceId)
+ {
+ this.componentType = componentType;
+ this.rendererType = rendererType;
+ this.handlerClass = handlerClass;
+ this.resourceId = resourceId;
+ }
+
+ public String getComponentType()
+ {
+ return componentType;
+ }
+
+ public void setComponentType(String componentType)
+ {
+ this.componentType = componentType;
+ }
+
+ public String getResourceId()
+ {
+ return resourceId;
+ }
+
+ public void setResourceId(String resourceId)
+ {
+ this.resourceId = resourceId;
+ }
+
+ public String getHandlerClass()
+ {
+ return handlerClass;
+ }
+
+ public void setHandlerClass(String handlerClass)
+ {
+ this.handlerClass = handlerClass;
+ }
+
+ public String getRendererType()
+ {
+ return rendererType;
+ }
+
+ public void setRendererType(String rendererType)
+ {
+ this.rendererType = rendererType;
+ }
+
+}
Propchange: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletComponentTagImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletConverterTagImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletConverterTagImpl.java?rev=1537798&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletConverterTagImpl.java (added)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletConverterTagImpl.java Fri Nov 1 01:15:36 2013
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.config.impl.digester.elements.facelets;
+
+import java.io.Serializable;
+import org.apache.myfaces.config.element.facelets.FaceletConverterTag;
+
+/**
+ *
+ */
+public class FaceletConverterTagImpl extends FaceletConverterTag implements Serializable
+{
+ private String converterId;
+ private String handlerClass;
+
+ public FaceletConverterTagImpl()
+ {
+ }
+
+ public FaceletConverterTagImpl(String converterId)
+ {
+ this.converterId = converterId;
+ }
+
+ public FaceletConverterTagImpl(String converterId, String handlerClass)
+ {
+ this.converterId = converterId;
+ this.handlerClass = handlerClass;
+ }
+
+ public String getConverterId()
+ {
+ return converterId;
+ }
+
+ public void setConverterId(String converterId)
+ {
+ this.converterId = converterId;
+ }
+
+ public String getHandlerClass()
+ {
+ return handlerClass;
+ }
+
+ public void setHandlerClass(String handlerClass)
+ {
+ this.handlerClass = handlerClass;
+ }
+
+}
Propchange: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletConverterTagImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletFunctionImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletFunctionImpl.java?rev=1537798&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletFunctionImpl.java (added)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletFunctionImpl.java Fri Nov 1 01:15:36 2013
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.config.impl.digester.elements.facelets;
+
+import java.io.Serializable;
+import org.apache.myfaces.config.element.facelets.FaceletFunction;
+
+/**
+ *
+ */
+public class FaceletFunctionImpl extends FaceletFunction implements Serializable
+{
+ private String functionName;
+ private String functionClass;
+ private String functionSignature;
+
+ public FaceletFunctionImpl()
+ {
+ }
+
+ public FaceletFunctionImpl(String functionName, String functionClass, String functionSignature)
+ {
+ this.functionName = functionName;
+ this.functionClass = functionClass;
+ this.functionSignature = functionSignature;
+ }
+
+ public String getFunctionName()
+ {
+ return functionName;
+ }
+
+ public void setFunctionName(String functionName)
+ {
+ this.functionName = functionName;
+ }
+
+ public String getFunctionClass()
+ {
+ return functionClass;
+ }
+
+ public void setFunctionClass(String functionClass)
+ {
+ this.functionClass = functionClass;
+ }
+
+ public String getFunctionSignature()
+ {
+ return functionSignature;
+ }
+
+ public void setFunctionSignature(String functionSignature)
+ {
+ this.functionSignature = functionSignature;
+ }
+
+}
Propchange: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletFunctionImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletHandlerTagImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletHandlerTagImpl.java?rev=1537798&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletHandlerTagImpl.java (added)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletHandlerTagImpl.java Fri Nov 1 01:15:36 2013
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.config.impl.digester.elements.facelets;
+
+import java.io.Serializable;
+import org.apache.myfaces.config.element.facelets.FaceletHandlerTag;
+
+/**
+ *
+ */
+public class FaceletHandlerTagImpl extends FaceletHandlerTag implements Serializable
+{
+ private String handlerClass;
+
+ public FaceletHandlerTagImpl()
+ {
+ }
+
+ public FaceletHandlerTagImpl(String handlerClass)
+ {
+ this.handlerClass = handlerClass;
+ }
+
+ public String getHandlerClass()
+ {
+ return handlerClass;
+ }
+
+ public void setHandlerClass(String handlerClass)
+ {
+ this.handlerClass = handlerClass;
+ }
+}
Propchange: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletHandlerTagImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletSourceTagImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletSourceTagImpl.java?rev=1537798&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletSourceTagImpl.java (added)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletSourceTagImpl.java Fri Nov 1 01:15:36 2013
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.config.impl.digester.elements.facelets;
+
+import java.io.Serializable;
+import org.apache.myfaces.config.element.facelets.FaceletSourceTag;
+
+/**
+ *
+ */
+public class FaceletSourceTagImpl extends FaceletSourceTag implements Serializable
+{
+ private String source;
+
+ public FaceletSourceTagImpl()
+ {
+ }
+
+ public FaceletSourceTagImpl(String source)
+ {
+ this.source = source;
+ }
+
+ public String getSource()
+ {
+ return source;
+ }
+
+ public void setSource(String source)
+ {
+ this.source = source;
+ }
+}
Propchange: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletSourceTagImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletTagImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletTagImpl.java?rev=1537798&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletTagImpl.java (added)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletTagImpl.java Fri Nov 1 01:15:36 2013
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.config.impl.digester.elements.facelets;
+
+import java.io.Serializable;
+import org.apache.myfaces.config.element.facelets.FaceletTag;
+import org.apache.myfaces.config.element.facelets.FaceletTagDefinition;
+
+/**
+ *
+ */
+public class FaceletTagImpl extends FaceletTag implements Serializable
+{
+ private String name;
+
+ private FaceletTagDefinition tagDefinition;
+
+ public FaceletTagImpl()
+ {
+ }
+
+ public FaceletTagImpl(String name, FaceletTagDefinition tagDefinition)
+ {
+ this.name = name;
+ this.tagDefinition = tagDefinition;
+ }
+
+ public FaceletTagImpl(String name)
+ {
+ this.name = name;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public FaceletTagDefinition getTagDefinition()
+ {
+ return tagDefinition;
+ }
+
+ public void setTagDefinition(FaceletTagDefinition tagDefinition)
+ {
+ this.tagDefinition = tagDefinition;
+ }
+
+}
Propchange: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletTagImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletTagLibraryImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletTagLibraryImpl.java?rev=1537798&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletTagLibraryImpl.java (added)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletTagLibraryImpl.java Fri Nov 1 01:15:36 2013
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.config.impl.digester.elements.facelets;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.myfaces.config.element.facelets.FaceletFunction;
+import org.apache.myfaces.config.element.facelets.FaceletTag;
+import org.apache.myfaces.config.element.facelets.FaceletTagLibrary;
+
+/**
+ *
+ */
+public class FaceletTagLibraryImpl extends FaceletTagLibrary implements Serializable
+{
+ private String namespace;
+ private String shortName;
+ private String compositeLibraryName;
+ private String libraryClass;
+ private List<FaceletTag> tags = new ArrayList<FaceletTag>();
+ private List<FaceletFunction> functions = new ArrayList<FaceletFunction>();
+
+ public FaceletTagLibraryImpl()
+ {
+ }
+
+ public String getNamespace()
+ {
+ return namespace;
+ }
+
+ public void setNamespace(String namespace)
+ {
+ this.namespace = namespace;
+ }
+
+ public String getShortName()
+ {
+ return shortName;
+ }
+
+ public void setShortName(String shortName)
+ {
+ this.shortName = shortName;
+ }
+
+ public String getCompositeLibraryName()
+ {
+ return compositeLibraryName;
+ }
+
+ public void setCompositeLibraryName(String compositeLibraryName)
+ {
+ this.compositeLibraryName = compositeLibraryName;
+ }
+
+ public String getLibraryClass()
+ {
+ return libraryClass;
+ }
+
+ public void setLibraryClass(String libraryClass)
+ {
+ this.libraryClass = libraryClass;
+ }
+
+ public List<FaceletTag> getTags()
+ {
+ return tags;
+ }
+
+ public void addTag(FaceletTag tag)
+ {
+ this.tags.add(tag);
+ }
+
+ @Override
+ public List<FaceletFunction> getFunctions()
+ {
+ return this.functions;
+ }
+
+ public void addFunction(FaceletFunction function)
+ {
+ this.functions.add(function);
+ }
+
+}
Propchange: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletTagLibraryImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletValidatorTagImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletValidatorTagImpl.java?rev=1537798&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletValidatorTagImpl.java (added)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletValidatorTagImpl.java Fri Nov 1 01:15:36 2013
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.config.impl.digester.elements.facelets;
+
+import java.io.Serializable;
+import org.apache.myfaces.config.element.facelets.FaceletValidatorTag;
+
+/**
+ *
+ */
+public class FaceletValidatorTagImpl extends FaceletValidatorTag implements Serializable
+{
+ private String validatorId;
+ private String handlerClass;
+
+ public FaceletValidatorTagImpl()
+ {
+ }
+
+ public FaceletValidatorTagImpl(String validatorId)
+ {
+ this.validatorId = validatorId;
+ }
+
+ public FaceletValidatorTagImpl(String validatorId, String handlerClass)
+ {
+ this.validatorId = validatorId;
+ this.handlerClass = handlerClass;
+ }
+
+ public String getValidatorId()
+ {
+ return validatorId;
+ }
+
+ public void setValidatorId(String validatorId)
+ {
+ this.validatorId = validatorId;
+ }
+
+ public String getHandlerClass()
+ {
+ return handlerClass;
+ }
+
+ public void setHandlerClass(String handlerClass)
+ {
+ this.handlerClass = handlerClass;
+ }
+
+}
Propchange: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/facelets/FaceletValidatorTagImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/spi/FacesConfigurationProvider.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/spi/FacesConfigurationProvider.java?rev=1537798&r1=1537797&r2=1537798&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/spi/FacesConfigurationProvider.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/spi/FacesConfigurationProvider.java Fri Nov 1 01:15:36 2013
@@ -107,4 +107,10 @@ public abstract class FacesConfiguration
*/
public abstract List<FacesConfig>
getApplicationConfigurationResourceDocumentPopulatorFacesConfig(ExternalContext ectx);
+
+ /**
+ * Return the FacesConfig object model retrieved from parsing .taglib.xml files according
+ * to spec rules.
+ */
+ public abstract List<FacesConfig> getFaceletTaglibFacesConfig(ExternalContext ectx);
}
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/spi/FacesConfigurationProviderWrapper.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/spi/FacesConfigurationProviderWrapper.java?rev=1537798&r1=1537797&r2=1537798&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/spi/FacesConfigurationProviderWrapper.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/spi/FacesConfigurationProviderWrapper.java Fri Nov 1 01:15:36 2013
@@ -84,4 +84,8 @@ public abstract class FacesConfiguration
return getWrapped().getApplicationConfigurationResourceDocumentPopulatorFacesConfig(ectx);
}
+ public List<FacesConfig> getFaceletTaglibFacesConfig(ExternalContext ectx)
+ {
+ return getWrapped().getFaceletTaglibFacesConfig(ectx);
+ }
}
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java?rev=1537798&r1=1537797&r2=1537798&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java Fri Nov 1 01:15:36 2013
@@ -24,7 +24,6 @@ import java.beans.PropertyDescriptor;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.Writer;
-import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -93,12 +92,10 @@ import javax.faces.view.ViewMetadata;
import javax.faces.view.facelets.Facelet;
import javax.faces.view.facelets.FaceletContext;
import javax.faces.view.facelets.ResourceResolver;
-import javax.faces.view.facelets.TagDecorator;
import javax.servlet.http.HttpServletResponse;
import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFWebConfigParam;
import org.apache.myfaces.config.RuntimeConfig;
-import org.apache.myfaces.config.element.ComponentTagDeclaration;
import org.apache.myfaces.shared.application.DefaultViewHandlerSupport;
import org.apache.myfaces.shared.application.ViewHandlerSupport;
import org.apache.myfaces.shared.config.MyfacesConfig;
@@ -107,10 +104,8 @@ import org.apache.myfaces.shared.util.St
import org.apache.myfaces.shared.util.WebConfigParamUtils;
import org.apache.myfaces.view.ViewDeclarationLanguageStrategy;
import org.apache.myfaces.view.ViewMetadataBase;
-import org.apache.myfaces.view.facelets.FaceletViewHandler.NullWriter;
import org.apache.myfaces.view.facelets.compiler.Compiler;
import org.apache.myfaces.view.facelets.compiler.SAXCompiler;
-import org.apache.myfaces.view.facelets.compiler.TagLibraryConfig;
import org.apache.myfaces.view.facelets.el.CompositeComponentELUtils;
import org.apache.myfaces.view.facelets.el.LocationMethodExpression;
import org.apache.myfaces.view.facelets.el.LocationValueExpression;
@@ -122,32 +117,21 @@ import org.apache.myfaces.view.facelets.
import org.apache.myfaces.view.facelets.el.VariableMapperWrapper;
import org.apache.myfaces.view.facelets.impl.DefaultFaceletFactory;
import org.apache.myfaces.view.facelets.impl.DefaultResourceResolver;
-import org.apache.myfaces.view.facelets.tag.TagLibrary;
import org.apache.myfaces.view.facelets.tag.composite.ClientBehaviorAttachedObjectTarget;
import org.apache.myfaces.view.facelets.tag.composite.ClientBehaviorRedirectBehaviorAttachedObjectHandlerWrapper;
import org.apache.myfaces.view.facelets.tag.composite.ClientBehaviorRedirectEventComponentWrapper;
-import org.apache.myfaces.view.facelets.tag.composite.CompositeLibrary;
-import org.apache.myfaces.view.facelets.tag.composite.CompositeResourceLibrary;
import org.apache.myfaces.view.facelets.tag.jsf.ComponentSupport;
import org.apache.myfaces.view.facelets.tag.jsf.core.AjaxHandler;
-import org.apache.myfaces.view.facelets.tag.jsf.core.CoreLibrary;
-import org.apache.myfaces.view.facelets.tag.jsf.html.HtmlLibrary;
-import org.apache.myfaces.view.facelets.tag.jstl.core.JstlCoreLibrary;
-import org.apache.myfaces.view.facelets.tag.jstl.fn.JstlFnLibrary;
import org.apache.myfaces.view.facelets.tag.ui.UIDebug;
-import org.apache.myfaces.view.facelets.tag.ui.UILibrary;
-import org.apache.myfaces.view.facelets.util.ReflectionUtil;
import static org.apache.myfaces.view.facelets.DefaultFaceletsStateManagementStrategy.*;
+import org.apache.myfaces.view.facelets.compiler.FaceletsCompilerSupport;
import org.apache.myfaces.view.facelets.compiler.RefreshDynamicComponentListener;
import org.apache.myfaces.view.facelets.impl.SectionUniqueIdCounter;
-import org.apache.myfaces.view.facelets.tag.ComponentTagDeclarationLibrary;
import org.apache.myfaces.view.facelets.tag.composite.CreateDynamicCompositeComponentListener;
-import org.apache.myfaces.view.facelets.tag.jsf.JsfLibrary;
import org.apache.myfaces.view.facelets.tag.jsf.PartialMethodExpressionActionListener;
import org.apache.myfaces.view.facelets.tag.jsf.PartialMethodExpressionValidator;
import org.apache.myfaces.view.facelets.tag.jsf.PartialMethodExpressionValueChangeListener;
-import org.apache.myfaces.view.facelets.tag.jsf.PassThroughLibrary;
import org.apache.myfaces.view.facelets.util.FaceletsViewDeclarationLanguageUtils;
/**
@@ -192,33 +176,12 @@ public class FaceletViewDeclarationLangu
//private final static String PARAM_BUILD_BEFORE_RESTORE = "facelets.BUILD_BEFORE_RESTORE";
/**
- * Set of class names, separated by ';', implementing TagDecorator interface, used to transform
- * a view definition in a facelet abstract syntax tree, that is used later to generate a component tree.
- */
- @JSFWebConfigParam(since = "2.0", deprecated = true)
- private final static String PARAM_DECORATORS_DEPRECATED = "facelets.DECORATORS";
-
- private final static String[] PARAMS_DECORATORS = {ViewHandler.FACELETS_DECORATORS_PARAM_NAME,
- PARAM_DECORATORS_DEPRECATED};
-
- /**
* Constant used by EncodingHandler to indicate the current encoding of the page being built,
* and indicate which one is the response encoding on getResponseEncoding(FacesContext, String) method.
*/
public final static String PARAM_ENCODING = "facelets.Encoding";
/**
- * Set of .taglib.xml files, separated by ';' that should be loaded by facelet engine.
- */
- @JSFWebConfigParam(since = "2.0",
- desc = "Set of .taglib.xml files, separated by ';' that should be loaded by facelet engine.",
- deprecated = true)
- private final static String PARAM_LIBRARIES_DEPRECATED = "facelets.LIBRARIES";
-
- private final static String[] PARAMS_LIBRARIES = {ViewHandler.FACELETS_LIBRARIES_PARAM_NAME,
- PARAM_LIBRARIES_DEPRECATED};
-
- /**
* Define the period used to refresh the facelet abstract syntax tree from the view definition file.
*
* <p>By default is infinite (no active).</p>
@@ -244,19 +207,10 @@ public class FaceletViewDeclarationLangu
private final static String[] PARAMS_RESOURCE_RESOLVER
= {PARAM_RESOURCE_RESOLVER, PARAM_RESOURCE_RESOLVER_DEPRECATED};
- /**
- * Skip comments found on a facelet file.
- */
- @JSFWebConfigParam(since = "2.0", deprecated = true)
- private final static String PARAM_SKIP_COMMENTS_DEPRECATED = "facelets.SKIP_COMMENTS";
-
@JSFWebConfigParam(since = "2.1", defaultValue = "false", expectedValues = "true, false", tags = "performance")
private final static String PARAM_MARK_INITIAL_STATE_WHEN_APPLY_BUILD_VIEW
= "org.apache.myfaces.MARK_INITIAL_STATE_WHEN_APPLY_BUILD_VIEW";
- private final static String[] PARAMS_SKIP_COMMENTS = {ViewHandler.FACELETS_SKIP_COMMENTS_PARAM_NAME,
- PARAM_SKIP_COMMENTS_DEPRECATED};
-
public final static String FILLED_VIEW = "org.apache.myfaces.FILLED_VIEW";
//BEGIN CONSTANTS SET ON BUILD VIEW
@@ -330,6 +284,8 @@ public class FaceletViewDeclarationLangu
private Map<String, List<String>> _contractMappings;
private List<String> _prefixWildcardKeys;
+
+ private FaceletsCompilerSupport _faceletsCompilerSupport;
/**
*
@@ -2122,10 +2078,6 @@ public class FaceletViewDeclarationLangu
loadDecorators(context, compiler);
loadOptions(context, compiler);
- compiler.setFaceletsProcessingConfigurations(
- RuntimeConfig.getCurrentInstance(
- context.getExternalContext()).getFaceletProcessingConfigurations());
-
return compiler;
}
@@ -2208,7 +2160,8 @@ public class FaceletViewDeclarationLangu
// -= Leonardo Uribe =- Add */* to the contentType is a fix done from FaceletViewHandler
// to make old RI versions work, but since this is for JSF 2.0 it is not necessary that code.
- ResponseWriter writer = renderKit.createResponseWriter(NullWriter.INSTANCE, contentType, encoding);
+ ResponseWriter writer = renderKit.createResponseWriter(FaceletsVDLUtils.NullWriter.INSTANCE,
+ contentType, encoding);
//ResponseWriter writer;
// append */* to the contentType so createResponseWriter will succeed no matter
@@ -2447,25 +2400,21 @@ public class FaceletViewDeclarationLangu
*/
protected void loadDecorators(FacesContext context, Compiler compiler)
{
- String param = WebConfigParamUtils.getStringInitParameter(context.getExternalContext(), PARAMS_DECORATORS);
- if (param != null)
+ getFaceletsCompilerSupport().loadDecorators(context, compiler);
+ }
+
+ protected FaceletsCompilerSupport getFaceletsCompilerSupport()
+ {
+ if (_faceletsCompilerSupport == null)
{
- for (String decorator : param.split(";"))
- {
- try
- {
- compiler.addTagDecorator((TagDecorator) ReflectionUtil.forName(decorator).newInstance());
- if (log.isLoggable(Level.FINE))
- {
- log.fine("Successfully loaded decorator: " + decorator);
- }
- }
- catch (Exception e)
- {
- log.log(Level.SEVERE, "Error Loading decorator: " + decorator, e);
- }
- }
+ _faceletsCompilerSupport = new FaceletsCompilerSupport();
}
+ return _faceletsCompilerSupport;
+ }
+
+ public void setFaceletsCompilerSupport(FaceletsCompilerSupport support)
+ {
+ _faceletsCompilerSupport = support;
}
/**
@@ -2478,71 +2427,7 @@ public class FaceletViewDeclarationLangu
*/
protected void loadLibraries(FacesContext context, Compiler compiler)
{
- ExternalContext eContext = context.getExternalContext();
-
- compiler.addTagLibrary(new CoreLibrary());
- compiler.addTagLibrary(new HtmlLibrary());
- compiler.addTagLibrary(new UILibrary());
- compiler.addTagLibrary(new JstlCoreLibrary());
- compiler.addTagLibrary(new JstlCoreLibrary(JstlCoreLibrary.ALTERNATIVE_NAMESPACE));
- compiler.addTagLibrary(new JstlFnLibrary());
- compiler.addTagLibrary(new CompositeLibrary());
- compiler.addTagLibrary(new CompositeResourceLibrary(context,
- CompositeResourceLibrary.NAMESPACE_PREFIX));
- compiler.addTagLibrary(new CompositeResourceLibrary(context,
- CompositeResourceLibrary.ALIAS_NAMESPACE_PREFIX));
- compiler.addTagLibrary(new JsfLibrary());
- compiler.addTagLibrary(new PassThroughLibrary());
-
- RuntimeConfig runtimeConfig = RuntimeConfig.getCurrentInstance(eContext);
- if (!runtimeConfig.getComponentTagDeclarations().isEmpty())
- {
- ComponentTagDeclarationLibrary componentTagDeclarationLibrary = new ComponentTagDeclarationLibrary();
- for (ComponentTagDeclaration declaration : runtimeConfig.getComponentTagDeclarations())
- {
- // We have here probably an inconsistency, because the annotation does not
- // have a default renderer type. Let the renderer type be null will cause problems
- // later, because application.createComponent() may not scan the renderer class if
- // a rendererType is not provided. The easy way to overcome this situation is create
- // a dummy instance and check its rendererType. If is set the renderer if any will be
- // scanned for annotations, if not it just do things as usual. It is unlikely to create
- // a component and does not set a default renderer type if is required.
- UIComponent component = context.getApplication().createComponent(declaration.getComponentType());
- componentTagDeclarationLibrary.addComponent(declaration.getNamespace(),
- declaration.getTagName(), declaration.getComponentType(), component.getRendererType());
- }
- compiler.addTagLibrary(componentTagDeclarationLibrary);
- }
-
- String param = WebConfigParamUtils.getStringInitParameter(eContext, PARAMS_LIBRARIES);
- if (param != null)
- {
- for (String library : param.split(";"))
- {
- try
- {
- URL src = eContext.getResource(library.trim());
- if (src == null)
- {
- throw new FileNotFoundException(library);
- }
-
- TagLibrary tl = TagLibraryConfig.create(context, src);
- if (tl != null)
- {
- compiler.addTagLibrary(tl);
- }
- if (log.isLoggable(Level.FINE))
- {
- log.fine("Successfully loaded library: " + library);
- }
- }
- catch (IOException e)
- {
- log.log(Level.SEVERE, "Error Loading library: " + library, e);
- }
- }
- }
+ getFaceletsCompilerSupport().loadLibraries(context, compiler);
}
/**
@@ -2555,11 +2440,7 @@ public class FaceletViewDeclarationLangu
*/
protected void loadOptions(FacesContext context, Compiler compiler)
{
- ExternalContext eContext = context.getExternalContext();
-
- // skip comments?
- compiler.setTrimmingComments(WebConfigParamUtils.getBooleanInitParameter(
- eContext, PARAMS_SKIP_COMMENTS, false));
+ getFaceletsCompilerSupport().loadOptions(context, compiler);
}
/**
@@ -2618,7 +2499,6 @@ public class FaceletViewDeclarationLangu
}
}
-
private void _initializeBuffer(ExternalContext context)
{
_bufferSize = WebConfigParamUtils.getIntegerInitParameter(context, PARAMS_BUFFER_SIZE, 1024);
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletsVDLUtils.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletsVDLUtils.java?rev=1537798&r1=1537797&r2=1537798&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletsVDLUtils.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletsVDLUtils.java Fri Nov 1 01:15:36 2013
@@ -18,6 +18,7 @@
*/
package org.apache.myfaces.view.facelets;
+import java.io.Writer;
import java.util.Comparator;
/**
@@ -96,4 +97,38 @@ public class FaceletsVDLUtils
return -s1.compareTo(s2);
}
}
+
+ public static class NullWriter extends Writer
+ {
+
+ static final NullWriter INSTANCE = new NullWriter();
+
+ public void write(char[] buffer)
+ {
+ }
+
+ public void write(char[] buffer, int off, int len)
+ {
+ }
+
+ public void write(String str)
+ {
+ }
+
+ public void write(int c)
+ {
+ }
+
+ public void write(String str, int off, int len)
+ {
+ }
+
+ public void close()
+ {
+ }
+
+ public void flush()
+ {
+ }
+ }
}