Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
blob: 8c43cd520a3247d8a4510dde958e9a9ebbddfda0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
/*******************************************************************************
 * Copyright (c) 2001, 2005 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 * IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jst.j2ee.webapplication;

import java.util.List;
import java.util.Properties;

import org.eclipse.emf.common.util.EList;
import org.eclipse.jem.java.JavaClass;
import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup;
import org.eclipse.jst.j2ee.common.RunAsSpecifiedIdentity;

/**
 * The servlet element contains the declarative data of a servlet. If a jsp-file is specified and the load-on-startup element is present, then the JSP should be precompiled and loaded.
 * @since 1.0
 */
public interface Servlet extends CompatibilityDescriptionGroup{


	/**
	 * Returns an unmodifiable list of the mappings that this
	 * servlet participates in.  Since servletMappings is not
	 * a bi-directional attribute, if you want to add or delete a
	 * mapping, this must be done in the web-app.
	 * @return java.util.List
	 */
	public List getMappings();
	
	/**
	 * Gets the Servlet parameters in  java.util.Properties
	 * @return java.util.Properties
	 */
	public Properties getParamsAsProperties() ;
	/**
	 * Fix the role-link on any contained role refs
	 * @param existingRoleName existing role name
	 * @param newRoleName new role name
	 */
	public void reSyncSecurityRoleRef(String existingRoleName, String newRoleName);
	/**
	 * @generated This field/method will be replaced during code generation 
	 * @return The value of the ServletName attribute
	 * The servlet-name element contains the canonical name of the servlet.
	 */
	String getServletName();

	/**
	 * @generated This field/method will be replaced during code generation 
	 * @param value The new value of the ServletName attribute
	 */
	void setServletName(String value);

	/**
	 * @generated This field/method will be replaced during code generation 
	 * @return The value of the LoadOnStartup attribute
	 * The load-on-startup element indicates that this servlet should be loaded on the 
	 * startup of the web application. The optional contents of these element must be
	 * a positive integer indicating the order in which the servlet should be loaded.
	 * Lower integers are loaded before higher integers. If no value is specified, or
	 * if the value specified is not a positive integer, the container is free to load 
	 * it at any time in the startup sequence.

	 */
	Integer getLoadOnStartup();

	/**
	 * Sets the value of the '{@link org.eclipse.jst.j2ee.webapplication.Servlet#getLoadOnStartup <em>Load On Startup</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @param value the new value of the '<em>Load On Startup</em>' attribute.
	 * @see #isSetLoadOnStartup()
	 * @see #unsetLoadOnStartup()
	 * @see #getLoadOnStartup()
	 * @generated
	 */
	void setLoadOnStartup(Integer value);

	/**
	 * Unsets the value of the '{@link org.eclipse.jst.j2ee.webapplication.Servlet#getLoadOnStartup <em>Load On Startup</em>}' attribute.
	 * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
	 * @see #isSetLoadOnStartup()
	 * @see #getLoadOnStartup()
	 * @see #setLoadOnStartup(Integer)
	 * @generated
	 */
  void unsetLoadOnStartup();

	/**
	 * Returns whether the value of the '{@link org.eclipse.jst.j2ee.webapplication.Servlet#getLoadOnStartup <em>Load On Startup</em>}' attribute is set.
	 * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
	 * @return whether the value of the '<em>Load On Startup</em>' attribute is set.
	 * @see #unsetLoadOnStartup()
	 * @see #getLoadOnStartup()
	 * @see #setLoadOnStartup(Integer)
	 * @generated
	 */
  boolean isSetLoadOnStartup();

	/**
	 * @generated This field/method will be replaced during code generation 
	 * @return The WebApp reference
	 */
	WebApp getWebApp();

	/**
	 * @generated This field/method will be replaced during code generation 
	 * @param value The new value of the WebApp reference
	 */
	void setWebApp(WebApp value);

	/**
	 * @generated This field/method will be replaced during code generation 
	 * @return The WebType reference
	 */
	WebType getWebType();

	/**
	 * @generated This field/method will be replaced during code generation 
	 * @param value The new value of the WebType reference
	 */
	void setWebType(WebType value);

	/**
	 * @generated This field/method will be replaced during code generation 
	 * @return The list of Params references
	 */
	EList getParams();

	/**
	 * @generated This field/method will be replaced during code generation 
	 * @return The list of SecurityRoleRefs references
	 */
	EList getSecurityRoleRefs();

	/**
	 * @generated This field/method will be replaced during code generation 
	 * @return The RunAs reference
	 * If defined for a servlet, overrides the security identity used to call an EJB
	 * by that servlet in this web application. The role-name is one of the security
	 * roles already defined for this web application.
	 */
	RunAsSpecifiedIdentity getRunAs();

	/**
	 * @generated This field/method will be replaced during code generation 
	 * @param value The new value of the RunAs reference
	 */
	void setRunAs(RunAsSpecifiedIdentity value);

	/**
	 * Returns the value of the '<em><b>Init Params</b></em>' containment reference list.
	 * The list contents are of type {@link org.eclipse.jst.j2ee.common.ParamValue}.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of the '<em>Init Params</em>' containment reference list isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @return the value of the '<em>Init Params</em>' containment reference list.
	 * @see org.eclipse.jst.j2ee.webapplication.WebapplicationPackage#getServlet_InitParams()
	 * @model type="org.eclipse.jst.j2ee.common.ParamValue" containment="true"
	 * @generated
	 */
	EList getInitParams();

	/**
	 * return the java servlet class associated with this servlet
	 * @return reference to JavaClass
	 */
	public JavaClass getServletClass();
}














Back to the top