1 package org.jahia.deprecated.taglibs.button; 2 3 import javax.servlet.jsp.JspException ; 4 5 import org.jahia.data.JahiaData; 6 import org.jahia.exceptions.JahiaException; 7 import org.jahia.services.usermanager.JahiaUser; 8 9 10 16 public class AdminButtonTag extends AbstractButtonTag { 17 18 private String title = "Administration"; 19 private String style = ""; 20 21 public void setTitle(String title) { 22 this.title = title; 23 } 24 25 public void setStyle(String style) { 26 this.style = style; 27 } 28 29 public String getTitle() { 30 return this.title; 31 } 32 33 public String getStyle() { 34 return this.style; 35 } 36 37 public boolean testRights (JahiaData jData) { 38 JahiaUser user = jData.params().getUser(); 40 return user.isAdminMember( jData.params().getSiteID() ); 41 } 42 43 public String getLauncher(JahiaData jData) throws JahiaException { 44 return jData.gui().html().drawAdministrationLauncher(); 46 } 47 48 public int doEndTag() throws JspException { 49 title = "Administration"; 52 style = ""; 53 return EVAL_PAGE; 54 } 55 56 } 57 | Popular Tags |