00001 00027 package org.objectweb.jonas_web.deployment.api; 00028 00029 import java.util.ArrayList; 00030 import java.util.Iterator; 00031 import java.util.List; 00032 00033 import org.objectweb.jonas_lib.deployment.api.SecurityRoleRefDesc; 00034 import org.objectweb.jonas_lib.deployment.xml.SecurityRoleRef; 00035 00036 import org.objectweb.jonas_web.deployment.xml.Servlet; 00043 public class ServletDesc { 00044 00048 private Servlet servlet = null; 00049 00053 private List securityRoleRefDescList = null; 00054 00055 00056 00061 public ServletDesc(Servlet servlet) { 00062 this.servlet = servlet; 00063 securityRoleRefDescList = new ArrayList(); 00064 for (Iterator it = servlet.getSecurityRoleRefList().iterator(); it.hasNext();) { 00065 SecurityRoleRef securityRoleRef = (SecurityRoleRef) it.next(); 00066 SecurityRoleRefDesc securityRoleRefDesc = 00067 new SecurityRoleRefDesc(getServletName(), securityRoleRef, false); 00068 securityRoleRefDescList.add(securityRoleRefDesc); 00069 } 00070 00071 } 00072 00076 public String getServletName() { 00077 return servlet.getServletName(); 00078 } 00079 00083 public String getServletClass() { 00084 return servlet.getServletClass(); 00085 } 00086 00087 00092 public List getSecurityRoleRefList() { 00093 return securityRoleRefDescList; 00094 } 00095 00096 }