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; 23 24 import javax.servlet.ServletContext; 25 26 import org.apache.pluto.om.common.Description; 27 import org.apache.pluto.om.common.DisplayName; 28 import org.apache.pluto.om.common.ParameterSet; 29 import org.apache.pluto.om.common.SecurityRoleSet; 30 31 /** 32 * <P> 33 * This interface provides access to a web application and its attributes. 34 * A web application is defined in the web.xml of a portlet application 35 * archive file. Portlet application information defined in the portlet.xml 36 * is also accessible in this interface when the information is bound 37 * to the application code.<br> 38 * Additionally, this interface allows to retrieve containing elements such 39 * as servlets. 40 * </P> 41 * <P> 42 * This interface defines the model as known from the MVC pattern. 43 * Its purpose is to provide read access to the data stored in the model. 44 * </P> 45 */ 46 public interface WebApplicationDefinition extends org.apache.pluto.om.Model 47 { 48 49 50 /** 51 * Returns the identifier of this web application. 52 * The return value cannot be NULL. 53 * 54 * @return the identifier 55 */ 56 public org.apache.pluto.om.common.ObjectID getId(); 57 58 /** 59 * Returns the display name for the given locale of this web application. 60 * The return value may be NULL. 61 * 62 * @return the localized display name 63 */ 64 public DisplayName getDisplayName(Locale locale); 65 66 /** 67 * Returns the description of this web application for the given locale. 68 * The return value may be NULL. 69 * 70 * @return the localized description 71 */ 72 public Description getDescription(Locale locale); 73 74 /** 75 * Returns all parameters of this web application. 76 * The return value cannot be NULL. 77 * 78 * @return the parameter set 79 */ 80 public ParameterSet getInitParameterSet(); 81 82 /** 83 * Returns all servlets contained in this web application. 84 * The return value cannot be NULL. 85 * 86 * @return a collection containing ServletModel objects 87 */ 88 public ServletDefinitionList getServletDefinitionList(); 89 90 /** 91 * Returns the servlet context of this web application. 92 * The return value cannot be NULL. 93 * 94 * @param servletContext 95 * a servlet context 96 * 97 * @return the servlet context of this web application 98 */ 99 public ServletContext getServletContext(ServletContext servletContext); 100 101 /** 102 * Returns the context root of the web application. 103 * The return value cannot be NULL. 104 * 105 * @return the context root 106 */ 107 public String getContextRoot(); 108 109 /** 110 * Returns the security roles defined for the web application. 111 * The returned value cannot be NULL. 112 * 113 * @return a set containing SecurityRole objects 114 */ 115 public SecurityRoleSet getSecurityRoles(); 116 117 } 118