KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > beehive > netui > pageflow > internal > ActionResultImpl


1 /*
2  * Copyright 2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  * $Header:$
17  */

18 package org.apache.beehive.netui.pageflow.internal;
19
20 import org.apache.beehive.netui.pageflow.ActionResult;
21
22 import java.io.PrintWriter JavaDoc;
23
24 /**
25  * Encapsulation of the results returned by {@link org.apache.beehive.netui.pageflow.PageFlowUtils#strutsLookup}.
26  */

27 public class ActionResultImpl implements ActionResult
28 {
29     private String JavaDoc _uri = null;
30     private boolean _isRedirect = false;
31     private int _statusCode = 0;
32     private String JavaDoc _statusMessage = null;
33     private boolean _isError = false;
34
35     
36     protected ActionResultImpl()
37     {
38     }
39     
40     public ActionResultImpl( String JavaDoc uri, boolean redirect, int statusCode, String JavaDoc statusMessage, boolean isError )
41     {
42         _uri = uri;
43         _isRedirect = redirect;
44         _statusCode = statusCode;
45         _statusMessage = statusMessage;
46         _isError = isError;
47     }
48
49     public String JavaDoc getURI()
50     {
51         return _uri;
52     }
53
54     public void setURI( String JavaDoc uri )
55     {
56         _uri = uri;
57     }
58
59     public boolean isRedirect()
60     {
61         return _isRedirect;
62     }
63
64     public void setRedirect( boolean redirect )
65     {
66         _isRedirect = redirect;
67     }
68
69     public boolean isError()
70     {
71         return _isError;
72     }
73
74     public void setError( boolean error )
75     {
76         _isError = error;
77     }
78
79     public int getStatusCode()
80     {
81         return _statusCode;
82     }
83
84     public void setStatusCode( int statusCode )
85     {
86         _statusCode = statusCode;
87     }
88
89     public String JavaDoc getStatusMessage()
90     {
91         return _statusMessage;
92     }
93
94     public void setStatusMessage( String JavaDoc statusMessage )
95     {
96         _statusMessage = statusMessage;
97     }
98
99     public boolean hadCompileErrors()
100     {
101         return false;
102     }
103     
104     public void printCompileErrors( PrintWriter JavaDoc writer )
105     {
106     }
107 }
108
Popular Tags