01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: *
17: * $Header:$
18: */
19: package org.apache.beehive.netui.pageflow.internal;
20:
21: import org.apache.beehive.netui.pageflow.ActionResult;
22:
23: import java.io.PrintWriter;
24:
25: /**
26: * Encapsulation of the results returned by {@link org.apache.beehive.netui.pageflow.PageFlowUtils#strutsLookup}.
27: */
28: public class ActionResultImpl implements ActionResult {
29: private String _uri = null;
30: private boolean _isRedirect = false;
31: private int _statusCode = 0;
32: private String _statusMessage = null;
33: private boolean _isError = false;
34:
35: protected ActionResultImpl() {
36: }
37:
38: public ActionResultImpl(String uri, boolean redirect,
39: int statusCode, String statusMessage, boolean isError) {
40: _uri = uri;
41: _isRedirect = redirect;
42: _statusCode = statusCode;
43: _statusMessage = statusMessage;
44: _isError = isError;
45: }
46:
47: public String getURI() {
48: return _uri;
49: }
50:
51: public void setURI(String uri) {
52: _uri = uri;
53: }
54:
55: public boolean isRedirect() {
56: return _isRedirect;
57: }
58:
59: public void setRedirect(boolean redirect) {
60: _isRedirect = redirect;
61: }
62:
63: public boolean isError() {
64: return _isError;
65: }
66:
67: public void setError(boolean error) {
68: _isError = error;
69: }
70:
71: public int getStatusCode() {
72: return _statusCode;
73: }
74:
75: public void setStatusCode(int statusCode) {
76: _statusCode = statusCode;
77: }
78:
79: public String getStatusMessage() {
80: return _statusMessage;
81: }
82:
83: public void setStatusMessage(String statusMessage) {
84: _statusMessage = statusMessage;
85: }
86:
87: public boolean hadCompileErrors() {
88: return false;
89: }
90:
91: public void printCompileErrors(PrintWriter writer) {
92: }
93: }
|