KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > pluto > om > servlet > ServletDefinition


1 /*
2  * Copyright 2003,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 /*
17
18  */

19
20 package org.apache.pluto.om.servlet;
21
22 import java.util.Locale JavaDoc;
23
24 import javax.servlet.RequestDispatcher JavaDoc;
25 import javax.servlet.ServletContext JavaDoc;
26
27 import org.apache.pluto.om.common.Description;
28 import org.apache.pluto.om.common.DisplayName;
29 import org.apache.pluto.om.common.ParameterSet;
30
31 /**
32  * <P>
33  * This interface provides access to a servlet and its attributes.
34  * A servlet is defined in the web.xml of a portlet application archive
35  * file. Portlet information defined in the portlet.xml is also accessible
36  * in this interface when the information is bound to the application code.<br>
37  * Additionaly, this interface allows to retrieve all containing elements such
38  * as content types.
39  * </P>
40  * <P>
41  * This interface defines the model as known from the MVC pattern.
42  * Its purpose is to provide read access to the data stored in the model.
43  * </P>
44  */

45 public interface ServletDefinition extends org.apache.pluto.om.Model
46 {
47
48
49     /**
50      * Returns the identifier of this servlet
51      * The return value cannot be NULL.
52      *
53      * @return the identifier
54      */

55     public org.apache.pluto.om.common.ObjectID getId();
56
57     /**
58      * Returns the servlet name
59      * The return value cannot be NULL.
60      *
61      * @return the servlet name
62      */

63     public String JavaDoc getServletName();
64
65     /**
66      * Returns the display name for the given locale of this servlet.
67      * The return value may be NULL.
68      *
69      * @return the localized display name
70      */

71     public DisplayName getDisplayName(Locale JavaDoc locale);
72
73     /**
74      * Returns the description for the given locale
75      * The return value may be NULL.
76      *
77      * @return the description
78      */

79     public Description getDescription(Locale JavaDoc locale);
80
81     /**
82      * Returns the class name of this servlet
83      * The return value may be NULL.
84      *
85      * @return the class name
86      */

87     public String JavaDoc getServletClass();
88
89     /**
90      * Returns all parameters of this portlet
91      * The return value cannot be NULL.
92      *
93      * @return the parameter set
94      */

95     public ParameterSet getInitParameterSet();
96
97     /**
98      * Returns the WebApplication object in which this servlet resides
99      * The return value cannot be NULL.
100      *
101      * @return the WebApplication object of this servlet
102      */

103     public WebApplicationDefinition getWebApplicationDefinition();
104
105     /**
106      * Returns the request dispatcher pointing to this servlet
107      *
108      * @param servletContext
109      * a servlet context
110      * @return the request dispatcher of this portlet
111      */

112     public RequestDispatcher JavaDoc getRequestDispatcher(ServletContext JavaDoc servletContext);
113
114     /**
115      * Returns the available date/time for this servlet, in milliseconds since
116      * the epoch. If this date/time is in the future the servlet is unavailable.
117      * If it is zero, the servlet is currently available. A value equal to Long.MAX_VALUE
118      * is considered to mean that unavailability is permanent.
119      *
120      * @return the available date/time for this servlet
121      */

122     public long getAvailable();
123     
124     /**
125      * Returns if this servlet is currently unavailable.
126      *
127      * @return <code>true</code> if this servlet is unavailable
128      */

129     public boolean isUnavailable();
130 }
131
Popular Tags