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/08/28 01:18:37 UTC

svn commit: r689655 - in /myfaces/core/branches/2_0_0/api: ./ src/main/java/javax/faces/application/ src/main/java/javax/faces/event/

Author: slessard
Date: Wed Aug 27 16:18:36 2008
New Revision: 689655

URL: http://svn.apache.org/viewvc?rev=689655&view=rev
Log:
Added missing classes

Added:
    myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/Resource.java
    myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/ResourceHandler.java
    myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/ResourceHandlerWrapper.java
    myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/ResourceWrapper.java
    myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/ComponentSystemEvent.java
    myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/ComponentSystemEventListener.java
    myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/ListenerFor.java
    myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/SystemEvent.java
    myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/SystemEventListener.java
    myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/SystemEventListenerHolder.java
Modified:
    myfaces/core/branches/2_0_0/api/pom.xml
    myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/AbortProcessingException.java
    myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/ActionEvent.java
    myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/FacesEvent.java
    myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/PhaseId.java

Modified: myfaces/core/branches/2_0_0/api/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/pom.xml?rev=689655&r1=689654&r2=689655&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/api/pom.xml (original)
+++ myfaces/core/branches/2_0_0/api/pom.xml Wed Aug 27 16:18:36 2008
@@ -11,7 +11,7 @@
   <description>
     The public API classes of the Apache MyFaces CORE JSF-2.0 project
   </description>
-  <url>http://myfaces.apache.org/core12/myfaces-api</url>
+  <url>http://myfaces.apache.org/core20/myfaces-api</url>
   <scm>
     <connection>scm:svn:http://svn.apache.org/repos/asf/myfaces/core/branches/2_0_0/api</connection>
     <developerConnection>scm:svn:https://svn.apache.org/repos/asf/myfaces/core/branches/2_0_0/api</developerConnection>
@@ -49,7 +49,7 @@
         <configuration>
           <typePrefix>javax.faces</typePrefix>
           <packageContains>javax.faces</packageContains>
-          <jsfVersion>1.2</jsfVersion>
+          <jsfVersion>2.0</jsfVersion>
           <force>true</force>
           <templateSourceDirectory>src/main/java-templates</templateSourceDirectory>
           <skipApiOrBaseClasses>false</skipApiOrBaseClasses>
@@ -163,7 +163,7 @@
          -->
        <groupId>org.apache.myfaces.core</groupId>
        <artifactId>myfaces-build</artifactId>
-       <version>1.2.4-SNAPSHOT</version>
+       <version>2.0.0-SNAPSHOT</version>
        <scope>provided</scope>
     </dependency>
     <dependency>

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/Resource.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/Resource.java?rev=689655&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/Resource.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/Resource.java Wed Aug 27 16:18:36 2008
@@ -0,0 +1,81 @@
+/*
+ * 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.io.InputStream;
+import java.net.URL;
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+
+/**
+ * 
+ */
+public abstract class Resource
+{
+    private String _contentType;
+    private String _libraryName;
+    private String _resourceName;
+
+    public String getContentType()
+    {
+        return _contentType;
+    }
+    
+    public abstract InputStream getInputStream();
+
+    public String getLibraryName()
+    {
+        return _libraryName;
+    }
+    
+    public abstract String getRequestPath();
+
+    public String getResourceName()
+    {
+        return _resourceName;
+    }
+    
+    public abstract Map<String, String> getResponseHeaders();
+    
+    public abstract URL getURL();
+
+    public void setContentType(String contentType)
+    {
+        _contentType = contentType;
+    }
+
+    public void setLibraryName(String libraryName)
+    {
+        _libraryName = libraryName;
+    }
+
+    public void setResourceName(String resourceName)
+    {
+        _resourceName = resourceName;
+    }
+    
+    @Override
+    public String toString()
+    {
+        return getRequestPath();
+    }
+    
+    public abstract boolean userAgentNeedsUpdate(FacesContext context);
+}

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/ResourceHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/ResourceHandler.java?rev=689655&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/ResourceHandler.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/ResourceHandler.java Wed Aug 27 16:18:36 2008
@@ -0,0 +1,44 @@
+/*
+ * 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.context.FacesContext;
+
+/**
+ * 
+ */
+public abstract class ResourceHandler
+{
+    public static final String LOCALE_PREFIX = "javax.faces.resource.localePrefix";
+    public static final String RESOURCE_EXCLUDES_DEFAULT_VALUE = ".class .jsp .jspx .properties .xhtml";
+    public static final String RESOURCE_EXCLUDES_PARAM_NAME = "javax.faces.RESOURCE_EXLCUDES";
+    public static final String RESOURCE_IDENTIFIER = "/javax.faces.resource";
+    
+    public abstract Resource createResource(String resourceName);
+    
+    public abstract Resource createResource(String resourceName, String libraryName);
+    
+    public abstract Resource createResource(String resourceName, String libraryName, String contentType);
+    
+    public abstract String getRendererTypeForResourceName(String resourceName);
+    
+    public abstract void handleResourceRequest(FacesContext context);
+    
+    public abstract boolean isResourceRequest(FacesContext context);
+}

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/ResourceHandlerWrapper.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/ResourceHandlerWrapper.java?rev=689655&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/ResourceHandlerWrapper.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/ResourceHandlerWrapper.java Wed Aug 27 16:18:36 2008
@@ -0,0 +1,65 @@
+/*
+ * 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.context.FacesContext;
+
+/**
+ * 
+ */
+public abstract class ResourceHandlerWrapper extends ResourceHandler
+{
+    @Override
+    public Resource createResource(String resourceName)
+    {
+        return getWrapped().createResource(resourceName);
+    }
+    
+    @Override
+    public Resource createResource(String resourceName, String libraryName)
+    {
+        return getWrapped().createResource(resourceName, libraryName);
+    }
+    
+    @Override
+    public Resource createResource(String resourceName, String libraryName, String contentType)
+    {
+        return getWrapped().createResource(resourceName, libraryName, contentType);
+    }
+    
+    @Override
+    public String getRendererTypeForResourceName(String resourceName)
+    {
+        return getWrapped().getRendererTypeForResourceName(resourceName);
+    }
+    
+    @Override
+    public void handleResourceRequest(FacesContext context)
+    {
+        getWrapped().handleResourceRequest(context);
+    }
+    
+    @Override
+    public boolean isResourceRequest(FacesContext context)
+    {
+        return getWrapped().isResourceRequest(context);
+    }
+    
+    protected abstract ResourceHandler getWrapped();
+}

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/ResourceWrapper.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/ResourceWrapper.java?rev=689655&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/ResourceWrapper.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/ResourceWrapper.java Wed Aug 27 16:18:36 2008
@@ -0,0 +1,63 @@
+/*
+ * 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.io.InputStream;
+import java.net.URL;
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+
+/**
+ * 
+ */
+public abstract class ResourceWrapper extends Resource
+{
+    @Override
+    public InputStream getInputStream()
+    {
+        return getWrapped().getInputStream();
+    }
+
+    @Override
+    public String getRequestPath()
+    {
+        return getWrapped().getRequestPath();
+    }
+
+    @Override
+    public Map<String, String> getResponseHeaders()
+    {
+        return getWrapped().getResponseHeaders();
+    }
+
+    @Override
+    public URL getURL()
+    {
+        return getWrapped().getURL();
+    }
+
+    @Override
+    public boolean userAgentNeedsUpdate(FacesContext context)
+    {
+        return getWrapped().userAgentNeedsUpdate(context);
+    }
+    
+    protected abstract Resource getWrapped();
+}

Modified: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/AbortProcessingException.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/AbortProcessingException.java?rev=689655&r1=689654&r2=689655&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/AbortProcessingException.java (original)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/AbortProcessingException.java Wed Aug 27 16:18:36 2008
@@ -21,17 +21,15 @@
 import javax.faces.FacesException;
 
 /**
- * see Javadoc of <a href="http://java.sun.com/javaee/javaserverfaces/1.2/docs/api/index.html">JSF Specification</a>
- *
+ * see Javadoc of <a href="http://java.sun.com/javaee/javaserverfaces/2.0/docs/api/index.html">JSF Specification</a>
+ * 
  * @author Thomas Spiegl (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
 public class AbortProcessingException extends FacesException
 {
-  private static final long serialVersionUID = 612682812558934753L;
-    // FIELDS
+    private static final long serialVersionUID = 612682812558934753L;
 
-  // CONSTRUCTORS
     public AbortProcessingException()
     {
         super();
@@ -46,7 +44,7 @@
     {
         super(message, cause);
     }
-    
+
     public AbortProcessingException(Throwable cause)
     {
         super(cause);

Modified: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/ActionEvent.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/ActionEvent.java?rev=689655&r1=689654&r2=689655&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/ActionEvent.java (original)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/ActionEvent.java Wed Aug 27 16:18:36 2008
@@ -22,25 +22,23 @@
 
 /**
  * see Javadoc of <a href="http://java.sun.com/javaee/javaserverfaces/1.2/docs/api/index.html">JSF Specification</a>
- *
+ * 
  * @author Thomas Spiegl (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
 public class ActionEvent extends FacesEvent
 {
-  private static final long serialVersionUID = 3693030212414392259L;
+    private static final long serialVersionUID = 3693030212414392259L;
 
-    // FIELDS
-
-
-  // CONSTRUCTORS
     public ActionEvent(UIComponent uiComponent)
     {
         super(uiComponent);
-        if (uiComponent == null) throw new IllegalArgumentException("uiComponent");
+        if (uiComponent == null)
+        {
+            throw new IllegalArgumentException("uiComponent");
+        }
     }
 
-    // METHODS
     public boolean isAppropriateListener(FacesListener facesListeners)
     {
         return facesListeners instanceof ActionListener;
@@ -48,7 +46,7 @@
 
     public void processListener(FacesListener facesListeners)
     {
-        ((ActionListener)facesListeners).processAction(this);
+        ((ActionListener) facesListeners).processAction(this);
     }
 
 }

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/ComponentSystemEvent.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/ComponentSystemEvent.java?rev=689655&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/ComponentSystemEvent.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/ComponentSystemEvent.java Wed Aug 27 16:18:36 2008
@@ -0,0 +1,37 @@
+/*
+ * 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.event;
+
+import javax.faces.component.UIComponent;
+
+/**
+ * 
+ */
+public abstract class ComponentSystemEvent extends SystemEvent
+{
+    public ComponentSystemEvent(UIComponent component)
+    {
+        super(component);
+    }
+    
+    public UIComponent getComponent()
+    {
+        return (UIComponent)getSource();
+    }
+}

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/ComponentSystemEventListener.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/ComponentSystemEventListener.java?rev=689655&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/ComponentSystemEventListener.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/ComponentSystemEventListener.java Wed Aug 27 16:18:36 2008
@@ -0,0 +1,27 @@
+/*
+ * 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.event;
+
+/**
+ * 
+ */
+public interface ComponentSystemEventListener
+{
+    public void processEvent(ComponentSystemEvent event);
+}

Modified: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/FacesEvent.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/FacesEvent.java?rev=689655&r1=689654&r2=689655&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/FacesEvent.java (original)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/FacesEvent.java Wed Aug 27 16:18:36 2008
@@ -25,36 +25,37 @@
 
 /**
  * see Javadoc of <a href="http://java.sun.com/javaee/javaserverfaces/1.2/docs/api/index.html">JSF Specification</a>
- *
+ * 
  * @author Thomas Spiegl (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
 public abstract class FacesEvent extends EventObject
 {
-    // FIELDS
     private PhaseId _phaseId;
 
-    // CONSTRUCTORS
     public FacesEvent(UIComponent uiComponent)
     {
         super(uiComponent);
-        if (uiComponent == null) throw new IllegalArgumentException("uiComponent");
+        if (uiComponent == null)
+        {
+            throw new IllegalArgumentException("uiComponent");
+        }
+
         _phaseId = PhaseId.ANY_PHASE;
     }
 
-    // METHODS
     public abstract boolean isAppropriateListener(FacesListener faceslistener);
 
     public abstract void processListener(FacesListener faceslistener);
 
     public UIComponent getComponent()
     {
-        return (UIComponent)getSource();
+        return (UIComponent) getSource();
     }
 
     public void queue()
     {
-        ((UIComponent)getSource()).queueEvent(this);
+        ((UIComponent) getSource()).queueEvent(this);
     }
 
     public PhaseId getPhaseId()

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/ListenerFor.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/ListenerFor.java?rev=689655&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/ListenerFor.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/ListenerFor.java Wed Aug 27 16:18:36 2008
@@ -0,0 +1,37 @@
+/*
+ * 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.event;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * 
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface ListenerFor
+{
+    public Class<? extends SystemEvent> systemEventClass();
+    
+    // FIXME: Spec is not Java 5 compliant, specified signature is Class sourceClass()
+    public Class<?> sourceClass();
+}

Modified: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/PhaseId.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/PhaseId.java?rev=689655&r1=689654&r2=689655&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/PhaseId.java (original)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/PhaseId.java Wed Aug 27 16:18:36 2008
@@ -23,12 +23,12 @@
 
 /**
  * see Javadoc of <a href="http://java.sun.com/javaee/javaserverfaces/1.2/docs/api/index.html">JSF Specification</a>
- *
+ * 
  * @author Thomas Spiegl (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-public class PhaseId implements Comparable{
-
+public class PhaseId implements Comparable
+{
     // FIELDS
     public static final javax.faces.event.PhaseId ANY_PHASE;
     public static final javax.faces.event.PhaseId APPLY_REQUEST_VALUES;
@@ -44,24 +44,23 @@
         int i = 0;
         ArrayList<PhaseId> list = new ArrayList<PhaseId>(6);
 
-        ANY_PHASE = new PhaseId("ANY_PHASE",i++);
+        ANY_PHASE = new PhaseId("ANY_PHASE", i++);
         list.add(ANY_PHASE);
-        RESTORE_VIEW = new PhaseId("RESTORE_VIEW",i++);
+        RESTORE_VIEW = new PhaseId("RESTORE_VIEW", i++);
         list.add(RESTORE_VIEW);
-        APPLY_REQUEST_VALUES = new PhaseId("APPLY_REQUEST_VALUES",i++);
+        APPLY_REQUEST_VALUES = new PhaseId("APPLY_REQUEST_VALUES", i++);
         list.add(APPLY_REQUEST_VALUES);
-        PROCESS_VALIDATIONS = new PhaseId("PROCESS_VALIDATIONS",i++);
+        PROCESS_VALIDATIONS = new PhaseId("PROCESS_VALIDATIONS", i++);
         list.add(PROCESS_VALIDATIONS);
-        UPDATE_MODEL_VALUES = new PhaseId("UPDATE_MODEL_VALUES",i++);
+        UPDATE_MODEL_VALUES = new PhaseId("UPDATE_MODEL_VALUES", i++);
         list.add(UPDATE_MODEL_VALUES);
-        INVOKE_APPLICATION = new PhaseId("INVOKE_APPLICATION",i++);
+        INVOKE_APPLICATION = new PhaseId("INVOKE_APPLICATION", i++);
         list.add(INVOKE_APPLICATION);
-        RENDER_RESPONSE = new PhaseId("RENDER_RESPONSE",i++);
+        RENDER_RESPONSE = new PhaseId("RENDER_RESPONSE", i++);
         list.add(RENDER_RESPONSE);
         VALUES = Collections.unmodifiableList(list);
     }
 
-
     private final String _name;
     private final int _ordinal;
 
@@ -75,7 +74,7 @@
     // METHODS
     public int compareTo(Object other)
     {
-        return _ordinal - ((PhaseId)other)._ordinal;
+        return _ordinal - ((PhaseId) other)._ordinal;
     }
 
     public int getOrdinal()

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/SystemEvent.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/SystemEvent.java?rev=689655&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/SystemEvent.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/SystemEvent.java Wed Aug 27 16:18:36 2008
@@ -0,0 +1,42 @@
+/*
+ * 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.event;
+
+import java.util.EventObject;
+
+/**
+ * 
+ */
+public abstract class SystemEvent extends EventObject
+{
+    public SystemEvent(Object source)
+    {
+        super(source);
+    }
+    
+    public boolean isAppropriateListener(FacesListener listener)
+    {
+        return listener instanceof SystemEventListener;
+    }
+    
+    public void processListener(FacesListener listener)
+    {
+        ((SystemEventListener)listener).processEvent(this);
+    }
+}

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/SystemEventListener.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/SystemEventListener.java?rev=689655&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/SystemEventListener.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/SystemEventListener.java Wed Aug 27 16:18:36 2008
@@ -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 javax.faces.event;
+
+/**
+ * 
+ */
+public interface SystemEventListener extends FacesListener
+{
+    public boolean isListenerForSource(Object source);
+    
+    public void processEvent(SystemEvent event);
+}

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/SystemEventListenerHolder.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/SystemEventListenerHolder.java?rev=689655&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/SystemEventListenerHolder.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/event/SystemEventListenerHolder.java Wed Aug 27 16:18:36 2008
@@ -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 javax.faces.event;
+
+import java.util.List;
+
+/**
+ * 
+ */
+public interface SystemEventListenerHolder
+{
+    public List<SystemEventListener> getListenersForEventClass(Class<? extends SystemEvent> facesEventClass);
+}