1 23 package org.infoglue.cms.taglib.management; 24 25 import java.util.Collection ; 26 27 import javax.servlet.jsp.JspException ; 28 import javax.servlet.jsp.JspTagException ; 29 30 import org.infoglue.cms.controllers.kernel.impl.simple.RoleControllerProxy; 31 import org.infoglue.deliver.taglib.AbstractTag; 32 33 36 public class RolesTag extends AbstractTag { 37 40 private static final long serialVersionUID = 1099238117777571574L; 41 42 45 public RolesTag() 46 { 47 super(); 48 } 49 50 53 public int doEndTag() throws JspException 54 { 55 setResultAttribute(getRoles()); 56 return super.doEndTag(); 57 } 58 59 62 private Collection getRoles() throws JspException 63 { 64 try 65 { 66 return RoleControllerProxy.getController().getAllRoles(); 67 } 68 catch(Exception e) 69 { 70 e.printStackTrace(); 71 throw new JspTagException (e.getMessage()); 72 } 73 } 74 } 75 | Popular Tags |