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 2008/12/04 03:31:01 UTC

svn commit: r723192 - in /myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application: DiscoveryHandler.java DiscoveryHandlerFactory.java DiscoveryHandlerWrapper.java

Author: lu4242
Date: Wed Dec  3 18:31:00 2008
New Revision: 723192

URL: http://svn.apache.org/viewvc?rev=723192&view=rev
Log:
MYFACES-2086 Add DiscoveryHandler class

Added:
    myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/DiscoveryHandler.java   (with props)
    myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/DiscoveryHandlerFactory.java   (with props)
    myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/DiscoveryHandlerWrapper.java   (with props)

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/DiscoveryHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/DiscoveryHandler.java?rev=723192&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/DiscoveryHandler.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/DiscoveryHandler.java Wed Dec  3 18:31:00 2008
@@ -0,0 +1,48 @@
+/*
+ * 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.application;
+
+import java.net.URL;
+import java.util.Set;
+
+import javax.faces.context.FacesContext;
+
+/**
+*
+* @since 2.0
+* @author Leonardo Uribe (latest modification by $Author$)
+* @version $Revision$ $Date$
+*/
+public abstract class DiscoveryHandler
+{
+
+    public DiscoveryHandler()
+    {
+
+    }
+
+    public abstract Set<String> getClassNamesWithFacesAnnotations(
+            FacesContext facesContext);
+
+    public abstract void processAnnotatedClasses(FacesContext facesContext,
+            Set<String> classNamesSet);
+    
+    public abstract Set<URL> getResourcePaths(String path);
+
+}

Propchange: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/DiscoveryHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/DiscoveryHandler.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/DiscoveryHandlerFactory.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/DiscoveryHandlerFactory.java?rev=723192&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/DiscoveryHandlerFactory.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/DiscoveryHandlerFactory.java Wed Dec  3 18:31:00 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.application;
+
+import javax.faces.FacesWrapper;
+
+/**
+ *
+ * @since 2.0
+ * @author Leonardo Uribe (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ */
+public abstract class DiscoveryHandlerFactory implements
+        FacesWrapper<DiscoveryHandlerFactory>
+{
+
+    public abstract DiscoveryHandler getDiscoveryHandler();
+
+    /**
+     * If this factory has been decorated, the implementation doing the decorating may override this method to 
+     * provide access to the implementation being wrapped. A default implementation is provided that returns 
+     * <code>null</code>.
+     * 
+     * @return the decorated <code>DiscoveryHandlerFactory</code> if this factory decorates another, 
+     *         or <code>null</code> otherwise
+     * 
+     * @since 2.0
+     */
+    public DiscoveryHandlerFactory getWrapped()
+    {
+        return null;
+    }
+
+}

Propchange: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/DiscoveryHandlerFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/DiscoveryHandlerFactory.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/DiscoveryHandlerWrapper.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/DiscoveryHandlerWrapper.java?rev=723192&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/DiscoveryHandlerWrapper.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/DiscoveryHandlerWrapper.java Wed Dec  3 18:31:00 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.application;
+
+import java.net.URL;
+import java.util.Set;
+
+import javax.faces.FacesWrapper;
+import javax.faces.context.FacesContext;
+
+/**
+*
+* @since 2.0
+* @author Leonardo Uribe (latest modification by $Author$)
+* @version $Revision$ $Date$
+*/
+public abstract class DiscoveryHandlerWrapper extends DiscoveryHandler
+        implements FacesWrapper<DiscoveryHandler>
+{
+    
+    @Override
+    public Set<String> getClassNamesWithFacesAnnotations(
+            FacesContext facesContext)
+    {
+        return getWrapped().getClassNamesWithFacesAnnotations(facesContext);
+    }
+
+    @Override
+    public Set<URL> getResourcePaths(String path)
+    {
+        return getWrapped().getResourcePaths(path);
+    }
+
+    @Override
+    public void processAnnotatedClasses(FacesContext facesContext,
+            Set<String> classNamesSet)
+    {
+        getWrapped().processAnnotatedClasses(facesContext, classNamesSet);
+    }
+    
+    public abstract DiscoveryHandler getWrapped();
+}

Propchange: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/DiscoveryHandlerWrapper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/DiscoveryHandlerWrapper.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL