public class WebAppContext extends Object implements Serializable
| Constructor and Description |
|---|
WebAppContext(String context)
Constructor
|
WebAppContext(String context,
String displayName,
String descr,
List<ServletBean> servlets,
Map<String,String> servletMappings,
List<String> roles,
List<String> welcomeFiles)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addRole(String role)
Add a new security role.
|
void |
addServlet(ServletBean servlet)
Add a new servlet bean.
|
void |
addServletMapping(String pattern,
String name)
Add a new servlet mapping and replace old mapping with same pattern.
|
void |
addServlets(List<ServletBean> servlets)
Add a List of ServletBean.
|
void |
addWelcomeFile(String filename)
Add a new welcome file.
|
boolean |
findRole(String role)
Return true if a given role is already in the list.
|
String |
findServletMapping(String pattern)
Return the servlet name mapped by the given pattern
otherwise return null.
|
String |
getContext()
Return the context
|
String |
getDescr()
Return the descr
|
String |
getDisplayName()
Return the display name
|
List<EntryPointDefinition> |
getEntryPointDefinitions() |
List<String> |
getRoles()
Return the security roles defined for this application.
|
ServletBean |
getServlet(String name)
Get a servlet looking at it name.
|
Map<String,ServletBean> |
getServlets()
Return the List of servlets.
|
List<String> |
getWelcomeFiles()
Return the list of welcome file.
|
void |
setContext(String val)
Set the context
|
void |
setDescr(String val)
Set the descr
|
void |
setDisplayName(String val)
Set the display name
|
void |
setEntryPointDefinitions(List<EntryPointDefinition> entryPointDefinitions) |
void |
setRoles(List<String> roles)
Set roles.
|
void |
setServletMappings(Map<String,String> servletMappings)
Set the map of servlet mapping.
|
void |
setWelcomeFiles(List<String> welcomeFiles)
Set the welcome files.
|
public WebAppContext(String context)
public WebAppContext(String context, String displayName, String descr, List<ServletBean> servlets, Map<String,String> servletMappings, List<String> roles, List<String> welcomeFiles)
context - , the application contextdisplayName - , the application display namedescr, - the application descriptionservlets, - a List ServletBeanservletMappings, - a map of servletMappings keyed with the url pappern and value = the servlet namewelcomeFiles, - a List of welcome files (String)public void addServlets(List<ServletBean> servlets)
servlets - the ServletBeans to addpublic void addServlet(ServletBean servlet)
servlet - the ServletBean to addpublic ServletBean getServlet(String name)
name - , the servlet namepublic void setServletMappings(Map<String,String> servletMappings)
servletMappings - a map of servlet mappings keyed with the url pattern and the servlet name as valuepublic void addServletMapping(String pattern, String name)
pattern - the URL pattern for which we want to add a mappingname - the name of the servlet mapped to the specified URL patternpublic String findServletMapping(String pattern)
pattern - the url-patternpublic Map<String,ServletBean> getServlets()
public void setRoles(List<String> roles)
roles - a List of security rolespublic void addRole(String role)
role - New security rolepublic boolean findRole(String role)
role - the security role to look forpublic void setWelcomeFiles(List<String> welcomeFiles)
welcomeFiles - a List of welcome file namespublic void addWelcomeFile(String filename)
filename - New welcome file namepublic List<EntryPointDefinition> getEntryPointDefinitions()
public void setEntryPointDefinitions(List<EntryPointDefinition> entryPointDefinitions)
public List<String> getWelcomeFiles()
public String getContext()
public void setContext(String val)
val - the new contextpublic String getDisplayName()
public void setDisplayName(String val)
val - the new display namepublic String getDescr()
public void setDescr(String val)
val - the new descriptionCopyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.