View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  
20  package org.apache.myfaces.tobago.event;
21  
22  import javax.faces.component.UIComponent;
23  import javax.faces.event.FacesEvent;
24  import javax.faces.event.FacesListener;
25  import javax.faces.event.PhaseId;
26  
27  public class FacesEventWrapper extends FacesEvent {
28  
29    private static final long serialVersionUID = 1L;
30  
31    private FacesEvent wrappedFacesEvent;
32  
33    public FacesEventWrapper(FacesEvent facesEvent, UIComponent redirectComponent) {
34      super(redirectComponent);
35      wrappedFacesEvent = facesEvent;
36    }
37  
38    @Override
39    public PhaseId getPhaseId() {
40      return wrappedFacesEvent.getPhaseId();
41    }
42  
43    @Override
44    public void setPhaseId(PhaseId phaseId) {
45      wrappedFacesEvent.setPhaseId(phaseId);
46    }
47  
48    @Override
49    public void queue() {
50      wrappedFacesEvent.queue();
51    }
52  
53    @Override
54    public String toString() {
55      return wrappedFacesEvent.toString();
56    }
57  
58    @Override
59    public boolean isAppropriateListener(
60        FacesListener faceslistener) {
61      return wrappedFacesEvent.isAppropriateListener(faceslistener);
62    }
63  
64    @Override
65    public void processListener(FacesListener faceslistener) {
66      wrappedFacesEvent.processListener(faceslistener);
67    }
68  
69    public FacesEvent getWrappedFacesEvent() {
70      return wrappedFacesEvent;
71    }
72  }