You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sl...@apache.org on 2008/12/11 00:49:59 UTC

svn commit: r725491 - in /myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/webapp/pdl/facelets: FaceletContext.java FaceletException.java FaceletHandler.java

Author: slessard
Date: Wed Dec 10 15:49:58 2008
New Revision: 725491

URL: http://svn.apache.org/viewvc?rev=725491&view=rev
Log:
MYFACES-2123 - Add javax.faces.webapp.pdl.facelets.* API classes

Added:
    myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/webapp/pdl/facelets/FaceletContext.java
    myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/webapp/pdl/facelets/FaceletException.java
    myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/webapp/pdl/facelets/FaceletHandler.java

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/webapp/pdl/facelets/FaceletContext.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/webapp/pdl/facelets/FaceletContext.java?rev=725491&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/webapp/pdl/facelets/FaceletContext.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/webapp/pdl/facelets/FaceletContext.java Wed Dec 10 15:49:58 2008
@@ -0,0 +1,58 @@
+/*
+ * 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 javax.faces.webapp.pdl.facelets;
+
+import java.io.IOException;
+import java.net.URL;
+
+import javax.el.ELContext;
+import javax.el.FunctionMapper;
+import javax.el.VariableMapper;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+/**
+ * @author Simon Lessard (latest modification by $Author: slessard $)
+ * @version $Revision: 696523 $ $Date: 2008-12-10 18:39:00 -0400 (mer., 17 sept. 2008) $
+ *
+ * @since 2.0
+ */
+public abstract class FaceletContext extends ELContext
+{
+    // TODO: Report that aberration to the EG
+    public static final String FACELET_CONTEXT_KEY = "com.sun.faces.facelets.FACELET_CONTEXT";
+    
+    public abstract String generateUniqueId(String base);
+    
+    public abstract Object getAttribute(String name);
+    
+    public abstract javax.el.ExpressionFactory getExpressionFactory();
+    
+    public abstract FacesContext getFacesContext();
+    
+    public abstract void includeFacelet(UIComponent parent, String relativePath) throws IOException;
+    
+    public abstract void includeFacelet(UIComponent parent, URL absolutePath) throws IOException;
+    
+    public abstract void setAttribute(String name, Object value);
+    
+    public abstract void setFunctionMapper(FunctionMapper mapper);
+    
+    public abstract void setVariableMapper(VariableMapper mapper);
+}

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/webapp/pdl/facelets/FaceletException.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/webapp/pdl/facelets/FaceletException.java?rev=725491&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/webapp/pdl/facelets/FaceletException.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/webapp/pdl/facelets/FaceletException.java Wed Dec 10 15:49:58 2008
@@ -0,0 +1,50 @@
+/*
+ * 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 javax.faces.webapp.pdl.facelets;
+
+import javax.faces.FacesException;
+
+/**
+ * @author Simon Lessard (latest modification by $Author: slessard $)
+ * @version $Revision: 696523 $ $Date: 2008-12-10 18:42:41 -0400 (mer., 17 sept. 2008) $
+ *
+ * @since 2.0
+ */
+public class FaceletException extends FacesException
+{
+    public FaceletException()
+    {
+        
+    }
+
+    public FaceletException(Throwable cause)
+    {
+        super(cause);
+    }
+
+    public FaceletException(String message)
+    {
+        super(message);
+    }
+
+    public FaceletException(String message, Throwable cause)
+    {
+        super(message, cause);
+    }
+}

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/webapp/pdl/facelets/FaceletHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/webapp/pdl/facelets/FaceletHandler.java?rev=725491&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/webapp/pdl/facelets/FaceletHandler.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/webapp/pdl/facelets/FaceletHandler.java Wed Dec 10 15:49:58 2008
@@ -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 javax.faces.webapp.pdl.facelets;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+/**
+ * @author Simon Lessard (latest modification by $Author: slessard $)
+ * @version $Revision: 696523 $ $Date: 2008-12-10 18:36:19 -0400 (mer., 17 sept. 2008) $
+ *
+ * @since 2.0
+ */
+public interface FaceletHandler
+{
+    public void apply(FacesContext ctx, UIComponent parent);
+}