001: /*
002: * Copyright (c) 1998-2008 Caucho Technology -- all rights reserved
003: *
004: * This file is part of Resin(R) Open Source
005: *
006: * Each copy or derived work must preserve the copyright notice and this
007: * notice unmodified.
008: *
009: * Resin Open Source is free software; you can redistribute it and/or modify
010: * it under the terms of the GNU General Public License version 2
011: * as published by the Free Software Foundation.
012: *
013: * Resin Open Source is distributed in the hope that it will be useful,
014: * but WITHOUT ANY WARRANTY; without even the implied warranty of
015: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
016: * of NON-INFRINGEMENT. See the GNU General Public License for more
017: * details.
018: *
019: * You should have received a copy of the GNU General Public License
020: * along with Resin Open Source; if not, write to the
021: *
022: * Free Software Foundation, Inc.
023: * 59 Temple Place, Suite 330
024: * Boston, MA 02111-1307 USA
025: *
026: * @author Scott Ferguson
027: */
028:
029: package com.caucho.jsf.cfg;
030:
031: import java.util.*;
032:
033: import javax.el.*;
034:
035: import javax.faces.*;
036: import javax.faces.application.*;
037: import javax.faces.context.*;
038: import javax.faces.component.*;
039: import javax.faces.render.*;
040:
041: import javax.servlet.*;
042: import javax.servlet.http.*;
043:
044: public class DummyFacesContext extends FacesContext {
045: DummyFacesContext() {
046: }
047:
048: public Application getApplication() {
049: throw new UnsupportedOperationException();
050: }
051:
052: public ExternalContext getExternalContext() {
053: throw new UnsupportedOperationException();
054: }
055:
056: public RenderKit getRenderKit() {
057: throw new UnsupportedOperationException();
058: }
059:
060: public ResponseStream getResponseStream() {
061: throw new UnsupportedOperationException();
062: }
063:
064: public void setResponseStream(ResponseStream responseStream) {
065: throw new UnsupportedOperationException();
066: }
067:
068: public ResponseWriter getResponseWriter() {
069: throw new UnsupportedOperationException();
070: }
071:
072: public void setResponseWriter(ResponseWriter writer) {
073: throw new UnsupportedOperationException();
074: }
075:
076: /**
077: * Returns the root of the UI component tree.
078: */
079: public UIViewRoot getViewRoot() {
080: throw new UnsupportedOperationException();
081: }
082:
083: /**
084: * Sets the root of the UI component tree.
085: */
086: public void setViewRoot(UIViewRoot root) {
087: throw new UnsupportedOperationException();
088: }
089:
090: /**
091: * If true the facelet will skip to the render phase.
092: */
093: @Override
094: public boolean getRenderResponse() {
095: throw new UnsupportedOperationException();
096: }
097:
098: /**
099: * Ask the lifecycle to skip to the render phase.
100: */
101: @Override
102: public void renderResponse() {
103: throw new UnsupportedOperationException();
104: }
105:
106: /**
107: * Return true if the lifecycle should skip the response phase.
108: */
109: @Override
110: public boolean getResponseComplete() {
111: throw new UnsupportedOperationException();
112: }
113:
114: /**
115: * Ask the lifecycle to skip the response phase.
116: */
117: @Override
118: public void responseComplete() {
119: throw new UnsupportedOperationException();
120: }
121:
122: public void addMessage(String clientId, FacesMessage message) {
123: throw new UnsupportedOperationException();
124: }
125:
126: public Iterator<String> getClientIdsWithMessages() {
127: throw new UnsupportedOperationException();
128: }
129:
130: public FacesMessage.Severity getMaximumSeverity() {
131: throw new UnsupportedOperationException();
132: }
133:
134: public Iterator<FacesMessage> getMessages() {
135: throw new UnsupportedOperationException();
136: }
137:
138: public Iterator<FacesMessage> getMessages(String clientId) {
139: throw new UnsupportedOperationException();
140: }
141:
142: /**
143: * @Since 1.2
144: */
145: @Override
146: public ELContext getELContext() {
147: throw new UnsupportedOperationException();
148: }
149:
150: public void release() {
151: throw new UnsupportedOperationException();
152: }
153:
154: public String toString() {
155: return "DummyFacesContext[]";
156: }
157: }
|