[Ejtools-cvs] applications/jmx.browser/src/main/org/ejtools/jmx/browser/web/taglib MBeanSortTag.java
Brought to you by:
letiemble
Update of /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/web/taglib In directory sc8-pr-cvs1:/tmp/cvs-serv13614/jmx.browser/src/main/org/ejtools/jmx/browser/web/taglib Modified Files: ConnectTag.java MBeanAttributeAccessTag.java MBeanAttributeClassTag.java MBeanAttributeEditorTag.java MBeanNameTag.java MBeanParameterClassTag.java MBeanParameterEditorTag.java MBeanResultEditorTag.java NotificationCheckBoxTag.java TreeRendererImpl.java Added Files: MBeanSortTag.java Log Message: Address Bug #775745 Address Todo #800902 Address Todo #755528 Remove @created tags Add support for MXJ4 2.0.0 (still beta) Add support for JXM Remoting through RMI --- NEW FILE: MBeanSortTag.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package org.ejtools.jmx.browser.web.taglib; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.List; import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.TagSupport; import org.apache.struts.util.RequestUtils; import org.ejtools.jmx.MBeanSorter; /** * Description of the Class * * @author Laurent Etiemble * @version $Revision: 1.1 $ * @todo Javadoc to complete * @jsp:tag name="mbeanSort" body-content="empty" */ public class MBeanSortTag extends TagSupport { /** Description of the Field */ protected String id = null; /** Description of the Field */ protected String name = null; /** Description of the Field */ protected String property = null; /** Description of the Field */ protected String scope = null; /** * Description of the Method * * @return Description of the Returned Value * @exception JspException Description of Exception */ public int doStartTag() throws JspException { Object object = null; // Look up the requested bean (if necessary) if (property != null) { object = RequestUtils.lookup(pageContext, name, property, scope); } else { object = RequestUtils.lookup(pageContext, name, scope); } if (object == null) { throw new JspException("Unable to find bean " + name + " or its property " + property); } List content = null; if (object.getClass().isArray()) { content = Arrays.asList((Object[]) object); MBeanSorter.sortByName(content); } else { if (object instanceof Collection) { content = new ArrayList((Collection) object); } if (object instanceof List) { content = (List) object; } if (content != null) { MBeanSorter.sortByName(content); } } // Put the sorted result in the pagecontext if (content != null) { pageContext.setAttribute(id, content); } else { throw new JspException("Cannot sort input " + object); } // Continue processing this page return (SKIP_BODY); } /** * Gets the id attribute of the HiddenObjectTag object * * @return The id value * @jsp:attribute name="id" required="true" rtexprvalue="true" */ public String getId() { return (this.id); } /** * Getter for the name attribute * * @return The value of name attribute * @jsp:attribute name="name" required="true" rtexprvalue="true" */ public String getName() { return (this.name); } /** * Gets the property attribute of the HiddenObjectTag object * * @return The property value * @jsp:attribute name="property" required="false" rtexprvalue="true" */ public String getProperty() { return (this.property); } /** * Getter for the scope attribute * * @return The value of scope attribute * @jsp:attribute name="scope" required="false" rtexprvalue="true" */ public String getScope() { return (this.scope); } /** Release all allocated resources. */ public void release() { super.release(); id = null; name = null; property = null; scope = null; } /** * Sets the id attribute of the HiddenObjectTag object * * @param id The new id value */ public void setId(String id) { this.id = id; } /** * Setter for the name attribute * * @param name The new value for name attribute */ public void setName(String name) { this.name = name; } /** * Sets the property attribute of the HiddenObjectTag object * * @param property The new property value */ public void setProperty(String property) { this.property = property; } /** * Setter for the scope attribute * * @param scope The new value for scope attribute */ public void setScope(String scope) { this.scope = scope; } } Index: ConnectTag.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/web/taglib/ConnectTag.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ConnectTag.java 10 Feb 2003 20:49:34 -0000 1.1 --- ConnectTag.java 27 Nov 2003 01:13:08 -0000 1.2 *************** *** 1,137 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.web.taglib; ! ! import javax.servlet.ServletContext; ! import javax.servlet.jsp.JspException; ! import javax.servlet.jsp.tagext.TagSupport; ! ! import org.ejtools.jmx.browser.web.Constants; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 1 mars 2002 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @jsp:tag name="connect" body-content="empty" ! */ ! public class ConnectTag extends TagSupport ! { ! /** The key of the application-scope bean we look for. */ ! private String name = Constants.TREE; ! /** The page to which we should forward for the user to log on. */ ! private String page = "/connect.do"; ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Returned Value ! * @exception JspException Description of the Exception ! */ ! public int doEndTag() ! throws JspException ! { ! boolean valid = false; ! ! ServletContext context = pageContext.getServletContext(); ! ! if (context.getAttribute(name) != null) ! { ! valid = true; ! } ! ! // Forward control based on the results ! if (valid) ! { ! return (EVAL_PAGE); ! } ! else ! { ! try ! { ! pageContext.forward(page); ! } ! catch (Exception e) ! { ! throw new JspException("Error during forwarding to " + page); ! } ! return (SKIP_PAGE); ! } ! } ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Returned Value ! * @exception JspException Description of the Exception ! */ ! public int doStartTag() ! throws JspException ! { ! return (SKIP_BODY); ! } ! ! ! /** ! * Getter for the name attribute ! * ! * @return The value of name attribute ! * @jsp:attribute name="name" required="false" rtexprvalue="true" ! */ ! public String getName() ! { ! return (this.name); ! } ! ! ! /** ! * Getter for the page attribute ! * ! * @return The value of page attribute ! * @jsp:attribute name="page" required="false" rtexprvalue="true" ! */ ! public String getPage() ! { ! return (this.page); ! } ! ! ! /** Description of the Method */ ! public void release() ! { ! super.release(); ! this.name = Constants.TREE; ! this.page = "/connect.do"; ! } ! ! ! /** ! * Setter for the name attribute ! * ! * @param name The new name value ! */ ! public void setName(String name) ! { ! this.name = name; ! } ! ! ! /** ! * Setter for the page attribute ! * ! * @param page The new page value ! */ ! public void setPage(String page) ! { ! this.page = page; ! } ! } ! --- 1,137 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.web.taglib; ! ! import javax.servlet.ServletContext; ! import javax.servlet.jsp.JspException; ! import javax.servlet.jsp.tagext.TagSupport; ! ! import org.ejtools.jmx.browser.web.Constants; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 1 mars 2002 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @jsp:tag name="connect" body-content="empty" ! */ ! public class ConnectTag extends TagSupport ! { ! /** The key of the application-scope bean we look for. */ ! private String name = Constants.TREE; ! /** The page to which we should forward for the user to log on. */ ! private String page = "/connect.do"; ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Returned Value ! * @exception JspException Description of the Exception ! */ ! public int doEndTag() ! throws JspException ! { ! boolean valid = false; ! ! ServletContext context = pageContext.getServletContext(); ! ! if (context.getAttribute(name) != null) ! { ! valid = true; ! } ! ! // Forward control based on the results ! if (valid) ! { ! return (EVAL_PAGE); ! } ! else ! { ! try ! { ! pageContext.forward(page); ! } ! catch (Exception e) ! { ! throw new JspException("Error during forwarding to " + page); ! } ! return (SKIP_PAGE); ! } ! } ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Returned Value ! * @exception JspException Description of the Exception ! */ ! public int doStartTag() ! throws JspException ! { ! return (SKIP_BODY); ! } ! ! ! /** ! * Getter for the name attribute ! * ! * @return The value of name attribute ! * @jsp:attribute name="name" required="false" rtexprvalue="true" ! */ ! public String getName() ! { ! return (this.name); ! } ! ! ! /** ! * Getter for the page attribute ! * ! * @return The value of page attribute ! * @jsp:attribute name="page" required="false" rtexprvalue="true" ! */ ! public String getPage() ! { ! return (this.page); ! } ! ! ! /** Description of the Method */ ! public void release() ! { ! super.release(); ! this.name = Constants.TREE; ! this.page = "/connect.do"; ! } ! ! ! /** ! * Setter for the name attribute ! * ! * @param name The new name value ! */ ! public void setName(String name) ! { ! this.name = name; ! } ! ! ! /** ! * Setter for the page attribute ! * ! * @param page The new page value ! */ ! public void setPage(String page) ! { ! this.page = page; ! } ! } ! Index: MBeanAttributeAccessTag.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/web/taglib/MBeanAttributeAccessTag.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MBeanAttributeAccessTag.java 10 Feb 2003 21:26:45 -0000 1.2 --- MBeanAttributeAccessTag.java 27 Nov 2003 01:13:08 -0000 1.3 *************** *** 1,208 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.web.taglib; ! ! import javax.management.MBeanAttributeInfo; ! import javax.servlet.jsp.JspException; ! import javax.servlet.jsp.tagext.TagSupport; ! ! import org.apache.struts.util.MessageResources; ! import org.apache.struts.util.RequestUtils; ! import org.apache.struts.util.ResponseUtils; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 25 avril 2002 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @jsp:tag name="mbeanAttributeAccess" body-content="empty" ! */ ! public class MBeanAttributeAccessTag extends TagSupport ! { ! /** Filter the rendered output for characters that are sensitive in HTML? */ ! protected boolean filter = true; ! /** Should we ignore missing beans and simply output nothing? */ ! protected boolean ignore = false; ! /** Name of the bean that contains the data we will be rendering. */ ! protected String name = null; ! /** The scope to be searched to retrieve the specified bean. */ ! protected String scope = null; ! /** Description of the Field */ ! private static MessageResources messages = MessageResources.getMessageResources("org.ejtools.jmx.browser.web.taglib.MBeanAttributeInfoAccess"); ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Returned Value ! * @exception JspException Description of the Exception ! */ ! public int doStartTag() ! throws JspException ! { ! // Look up the requested bean (if necessary) ! MBeanAttributeInfo info = (MBeanAttributeInfo) RequestUtils.lookup(pageContext, name, scope); ! if (ignore) ! { ! if (info == null) ! { ! return (SKIP_BODY); ! } ! // Nothing to output ! } ! ! String output = computeAccess(info); ! if (filter) ! { ! ResponseUtils.write(pageContext, ResponseUtils.filter(output)); ! } ! else ! { ! ResponseUtils.write(pageContext, output); ! } ! ! // Continue processing this page ! return (SKIP_BODY); ! } ! ! ! /** ! * Getter for the filter attribute ! * ! * @return The value of filter attribute ! * @jsp:attribute name="filter" required="false" rtexprvalue="true" ! */ ! public boolean getFilter() ! { ! return (this.filter); ! } ! ! ! /** ! * Getter for the ignore attribute ! * ! * @return The value of ignore attribute ! * @jsp:attribute name="ignore" required="false" rtexprvalue="true" ! */ ! public boolean getIgnore() ! { ! return (this.ignore); ! } ! ! ! /** ! * Getter for the name attribute ! * ! * @return The value of name attribute ! * @jsp:attribute name="name" required="true" rtexprvalue="true" ! */ ! public String getName() ! { ! return (this.name); ! } ! ! ! /** ! * Getter for the scope attribute ! * ! * @return The value of scope attribute ! * @jsp:attribute name="scope" required="false" rtexprvalue="true" ! */ ! public String getScope() ! { ! return (this.scope); ! } ! ! ! /** Release all allocated resources. */ ! public void release() ! { ! ! super.release(); ! filter = true; ! ignore = false; ! name = null; ! scope = null; ! ! } ! ! ! /** ! * Setter for the filter attribute ! * ! * @param filter The new filter value ! */ ! public void setFilter(boolean filter) ! { ! this.filter = filter; ! } ! ! ! /** ! * Setter for the ignore attribute ! * ! * @param ignore The new ignore value ! */ ! public void setIgnore(boolean ignore) ! { ! this.ignore = ignore; ! } ! ! ! /** ! * Setter for the name attribute ! * ! * @param name The new name value ! */ ! public void setName(String name) ! { ! this.name = name; ! } ! ! ! /** ! * Setter for the scope attribute ! * ! * @param scope The new scope value ! */ ! public void setScope(String scope) ! { ! this.scope = scope; ! } ! ! ! /** ! * Description of the Method ! * ! * @param info Description of the Parameter ! * @return Description of the Returned Value ! */ ! protected String computeAccess(MBeanAttributeInfo info) ! { ! String result = messages.getMessage("access.ro"); ! ! if (info.isIs() || info.isReadable()) ! { ! if (info.isWritable()) ! { ! result = messages.getMessage("access.rw"); ! } ! } ! else ! { ! if (info.isWritable()) ! { ! result = messages.getMessage("access.wo"); ! } ! } ! ! return result; ! } ! } ! --- 1,208 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.web.taglib; ! ! import javax.management.MBeanAttributeInfo; ! import javax.servlet.jsp.JspException; ! import javax.servlet.jsp.tagext.TagSupport; ! ! import org.apache.struts.util.MessageResources; ! import org.apache.struts.util.RequestUtils; ! import org.apache.struts.util.ResponseUtils; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 25 avril 2002 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @jsp:tag name="mbeanAttributeAccess" body-content="empty" ! */ ! public class MBeanAttributeAccessTag extends TagSupport ! { ! /** Filter the rendered output for characters that are sensitive in HTML? */ ! protected boolean filter = true; ! /** Should we ignore missing beans and simply output nothing? */ ! protected boolean ignore = false; ! /** Name of the bean that contains the data we will be rendering. */ ! protected String name = null; ! /** The scope to be searched to retrieve the specified bean. */ ! protected String scope = null; ! /** Description of the Field */ ! private static MessageResources messages = MessageResources.getMessageResources("org.ejtools.jmx.browser.web.taglib.MBeanAttributeInfoAccess"); ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Returned Value ! * @exception JspException Description of the Exception ! */ ! public int doStartTag() ! throws JspException ! { ! // Look up the requested bean (if necessary) ! MBeanAttributeInfo info = (MBeanAttributeInfo) RequestUtils.lookup(pageContext, name, scope); ! if (ignore) ! { ! if (info == null) ! { ! return (SKIP_BODY); ! } ! // Nothing to output ! } ! ! String output = computeAccess(info); ! if (filter) ! { ! ResponseUtils.write(pageContext, ResponseUtils.filter(output)); ! } ! else ! { ! ResponseUtils.write(pageContext, output); ! } ! ! // Continue processing this page ! return (SKIP_BODY); ! } ! ! ! /** ! * Getter for the filter attribute ! * ! * @return The value of filter attribute ! * @jsp:attribute name="filter" required="false" rtexprvalue="true" ! */ ! public boolean getFilter() ! { ! return (this.filter); ! } ! ! ! /** ! * Getter for the ignore attribute ! * ! * @return The value of ignore attribute ! * @jsp:attribute name="ignore" required="false" rtexprvalue="true" ! */ ! public boolean getIgnore() ! { ! return (this.ignore); ! } ! ! ! /** ! * Getter for the name attribute ! * ! * @return The value of name attribute ! * @jsp:attribute name="name" required="true" rtexprvalue="true" ! */ ! public String getName() ! { ! return (this.name); ! } ! ! ! /** ! * Getter for the scope attribute ! * ! * @return The value of scope attribute ! * @jsp:attribute name="scope" required="false" rtexprvalue="true" ! */ ! public String getScope() ! { ! return (this.scope); ! } ! ! ! /** Release all allocated resources. */ ! public void release() ! { ! ! super.release(); ! filter = true; ! ignore = false; ! name = null; ! scope = null; ! ! } ! ! ! /** ! * Setter for the filter attribute ! * ! * @param filter The new filter value ! */ ! public void setFilter(boolean filter) ! { ! this.filter = filter; ! } ! ! ! /** ! * Setter for the ignore attribute ! * ! * @param ignore The new ignore value ! */ ! public void setIgnore(boolean ignore) ! { ! this.ignore = ignore; ! } ! ! ! /** ! * Setter for the name attribute ! * ! * @param name The new name value ! */ ! public void setName(String name) ! { ! this.name = name; ! } ! ! ! /** ! * Setter for the scope attribute ! * ! * @param scope The new scope value ! */ ! public void setScope(String scope) ! { ! this.scope = scope; ! } ! ! ! /** ! * Description of the Method ! * ! * @param info Description of the Parameter ! * @return Description of the Returned Value ! */ ! protected String computeAccess(MBeanAttributeInfo info) ! { ! String result = messages.getMessage("access.ro"); ! ! if (info.isIs() || info.isReadable()) ! { ! if (info.isWritable()) ! { ! result = messages.getMessage("access.rw"); ! } ! } ! else ! { ! if (info.isWritable()) ! { ! result = messages.getMessage("access.wo"); ! } ! } ! ! return result; ! } ! } ! Index: MBeanAttributeClassTag.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/web/taglib/MBeanAttributeClassTag.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MBeanAttributeClassTag.java 10 Feb 2003 20:49:34 -0000 1.1 --- MBeanAttributeClassTag.java 27 Nov 2003 01:13:08 -0000 1.2 *************** *** 1,177 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.web.taglib; ! ! import javax.management.MBeanAttributeInfo; ! import javax.servlet.jsp.JspException; ! import javax.servlet.jsp.tagext.TagSupport; ! ! import org.apache.struts.util.RequestUtils; ! import org.apache.struts.util.ResponseUtils; ! import org.ejtools.util.ClassTools; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 25 avril 2002 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @jsp:tag name="mbeanAttributeClass" body-content="empty" ! */ ! public class MBeanAttributeClassTag extends TagSupport ! { ! /** Filter the rendered output for characters that are sensitive in HTML? */ ! protected boolean filter = true; ! /** Should we ignore missing beans and simply output nothing? */ ! protected boolean ignore = false; ! /** Name of the bean that contains the data we will be rendering. */ ! protected String name = null; ! /** The scope to be searched to retrieve the specified bean. */ ! protected String scope = null; ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Returned Value ! * @exception JspException Description of the Exception ! */ ! public int doStartTag() ! throws JspException ! { ! // Look up the requested bean (if necessary) ! MBeanAttributeInfo info = (MBeanAttributeInfo) RequestUtils.lookup(pageContext, name, scope); ! if (ignore) ! { ! if (info == null) ! { ! return (SKIP_BODY); ! } ! // Nothing to output ! } ! ! String output = ClassTools.classDisplay(info.getType()); ! ! if (filter) ! { ! ResponseUtils.write(pageContext, ResponseUtils.filter(output)); ! } ! else ! { ! ResponseUtils.write(pageContext, output); ! } ! ! // Continue processing this page ! return (SKIP_BODY); ! } ! ! ! /** ! * Getter for the filter attribute ! * ! * @return The value of filter attribute ! * @jsp:attribute name="filter" required="false" rtexprvalue="true" ! */ ! public boolean getFilter() ! { ! return (this.filter); ! } ! ! ! /** ! * Getter for the ignore attribute ! * ! * @return The value of ignore attribute ! * @jsp:attribute name="ignore" required="false" rtexprvalue="true" ! */ ! public boolean getIgnore() ! { ! return (this.ignore); ! } ! ! ! /** ! * Getter for the name attribute ! * ! * @return The value of name attribute ! * @jsp:attribute name="name" required="true" rtexprvalue="true" ! */ ! public String getName() ! { ! return (this.name); ! } ! ! ! /** ! * Getter for the scope attribute ! * ! * @return The value of scope attribute ! * @jsp:attribute name="scope" required="false" rtexprvalue="true" ! */ ! public String getScope() ! { ! return (this.scope); ! } ! ! ! /** Release all allocated resources. */ ! public void release() ! { ! super.release(); ! filter = true; ! ignore = false; ! name = null; ! scope = null; ! id = null; ! } ! ! ! /** ! * Setter for the filter attribute ! * ! * @param filter The new filter value ! */ ! public void setFilter(boolean filter) ! { ! this.filter = filter; ! } ! ! ! /** ! * Setter for the ignore attribute ! * ! * @param ignore The new ignore value ! */ ! public void setIgnore(boolean ignore) ! { ! this.ignore = ignore; ! } ! ! ! /** ! * Setter for the name attribute ! * ! * @param name The new name value ! */ ! public void setName(String name) ! { ! this.name = name; ! } ! ! ! /** ! * Setter for the scope attribute ! * ! * @param scope The new scope value ! */ ! public void setScope(String scope) ! { ! this.scope = scope; ! } ! } ! --- 1,177 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.web.taglib; ! ! import javax.management.MBeanAttributeInfo; ! import javax.servlet.jsp.JspException; ! import javax.servlet.jsp.tagext.TagSupport; ! ! import org.apache.struts.util.RequestUtils; ! import org.apache.struts.util.ResponseUtils; ! import org.ejtools.util.ClassTools; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 25 avril 2002 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @jsp:tag name="mbeanAttributeClass" body-content="empty" ! */ ! public class MBeanAttributeClassTag extends TagSupport ! { ! /** Filter the rendered output for characters that are sensitive in HTML? */ ! protected boolean filter = true; ! /** Should we ignore missing beans and simply output nothing? */ ! protected boolean ignore = false; ! /** Name of the bean that contains the data we will be rendering. */ ! protected String name = null; ! /** The scope to be searched to retrieve the specified bean. */ ! protected String scope = null; ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Returned Value ! * @exception JspException Description of the Exception ! */ ! public int doStartTag() ! throws JspException ! { ! // Look up the requested bean (if necessary) ! MBeanAttributeInfo info = (MBeanAttributeInfo) RequestUtils.lookup(pageContext, name, scope); ! if (ignore) ! { ! if (info == null) ! { ! return (SKIP_BODY); ! } ! // Nothing to output ! } ! ! String output = ClassTools.classDisplay(info.getType()); ! ! if (filter) ! { ! ResponseUtils.write(pageContext, ResponseUtils.filter(output)); ! } ! else ! { ! ResponseUtils.write(pageContext, output); ! } ! ! // Continue processing this page ! return (SKIP_BODY); ! } ! ! ! /** ! * Getter for the filter attribute ! * ! * @return The value of filter attribute ! * @jsp:attribute name="filter" required="false" rtexprvalue="true" ! */ ! public boolean getFilter() ! { ! return (this.filter); ! } ! ! ! /** ! * Getter for the ignore attribute ! * ! * @return The value of ignore attribute ! * @jsp:attribute name="ignore" required="false" rtexprvalue="true" ! */ ! public boolean getIgnore() ! { ! return (this.ignore); ! } ! ! ! /** ! * Getter for the name attribute ! * ! * @return The value of name attribute ! * @jsp:attribute name="name" required="true" rtexprvalue="true" ! */ ! public String getName() ! { ! return (this.name); ! } ! ! ! /** ! * Getter for the scope attribute ! * ! * @return The value of scope attribute ! * @jsp:attribute name="scope" required="false" rtexprvalue="true" ! */ ! public String getScope() ! { ! return (this.scope); ! } ! ! ! /** Release all allocated resources. */ ! public void release() ! { ! super.release(); ! filter = true; ! ignore = false; ! name = null; ! scope = null; ! id = null; ! } ! ! ! /** ! * Setter for the filter attribute ! * ! * @param filter The new filter value ! */ ! public void setFilter(boolean filter) ! { ! this.filter = filter; ! } ! ! ! /** ! * Setter for the ignore attribute ! * ! * @param ignore The new ignore value ! */ ! public void setIgnore(boolean ignore) ! { ! this.ignore = ignore; ! } ! ! ! /** ! * Setter for the name attribute ! * ! * @param name The new name value ! */ ! public void setName(String name) ! { ! this.name = name; ! } ! ! ! /** ! * Setter for the scope attribute ! * ! * @param scope The new scope value ! */ ! public void setScope(String scope) ! { ! this.scope = scope; ! } ! } ! Index: MBeanAttributeEditorTag.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/web/taglib/MBeanAttributeEditorTag.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MBeanAttributeEditorTag.java 10 Feb 2003 21:26:45 -0000 1.2 --- MBeanAttributeEditorTag.java 27 Nov 2003 01:13:08 -0000 1.3 *************** *** 1,528 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.web.taglib; ! ! import java.beans.PropertyEditor; ! import java.util.Hashtable; [...1027 lines suppressed...] ! if ("javax.management.ObjectName".equals(type)) ! { ! try ! { ! Hashtable params = new Hashtable(); ! params.put("reference", value); ! ! String url = RequestUtils.computeURL(pageContext, null, null, page, params, null, false); ! ! return (" <a href=\"" + url + "\">" + messages.getMessage("hyperlink.go") + "</a>"); ! } ! catch (Exception e) ! { ! logger.warn("Exception during computation of writable editor " + e.getMessage()); ! } ! } ! ! return ""; ! } ! } Index: MBeanNameTag.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/web/taglib/MBeanNameTag.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MBeanNameTag.java 12 Feb 2003 21:22:45 -0000 1.2 --- MBeanNameTag.java 27 Nov 2003 01:13:08 -0000 1.3 *************** *** 1,218 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.web.taglib; ! ! import javax.servlet.jsp.JspException; ! import javax.servlet.jsp.tagext.TagSupport; ! ! import org.apache.struts.util.RequestUtils; ! import org.apache.struts.util.ResponseUtils; ! import org.ejtools.jmx.browser.model.Node; ! import org.ejtools.jmx.browser.model.Resource; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 25 avril 2002 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @jsp:tag name="mbeanName" body-content="empty" ! */ ! public class MBeanNameTag extends TagSupport ! { ! /** Filter the rendered output for characters that are sensitive in HTML? */ ! protected boolean filter = true; ! /** Should we ignore missing beans and simply output nothing? */ ! protected boolean full = true; ! /** Should we ignore missing beans and simply output nothing? */ ! protected boolean ignore = false; ! /** Name of the bean that contains the data we will be rendering. */ ! protected String name = null; ! /** The scope to be searched to retrieve the specified bean. */ ! protected String scope = null; ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Returned Value ! * @exception JspException Description of the Exception ! */ ! public int doStartTag() ! throws JspException ! { ! String output = ""; ! ! // Look up the requested bean (if necessary) ! Node node = (Node) RequestUtils.lookup(pageContext, name, scope); ! ! if (ignore) ! { ! if (node == null) ! { ! return (SKIP_BODY); ! } ! // Nothing to output ! } ! ! if (node instanceof Resource) ! { ! Resource res = (Resource) node; ! output = res.getCanonicalName(); ! ! if (!full) ! { ! output = output.substring(res.getDomain().length() + 1); ! } ! } ! else ! { ! output = node.toString(); ! } ! ! if (filter) ! { ! ResponseUtils.write(pageContext, ResponseUtils.filter(output)); ! } ! else ! { ! ResponseUtils.write(pageContext, output); ! } ! ! // Continue processing this page ! return (SKIP_BODY); ! } ! ! ! /** ! * Getter for the filter attribute ! * ! * @return The value of filter attribute ! * @jsp:attribute name="filter" required="false" rtexprvalue="true" ! */ ! public boolean getFilter() ! { ! return (this.filter); ! } ! ! ! /** ! * Gets the full attribute of the MBeanNameTag object ! * ! * @return The full value ! * @jsp:attribute name="full" required="false" rtexprvalue="true" ! */ ! public boolean getFull() ! { ! return (this.full); ! } ! ! ! /** ! * Getter for the ignore attribute ! * ! * @return The value of ignore attribute ! * @jsp:attribute name="ignore" required="false" rtexprvalue="true" ! */ ! public boolean getIgnore() ! { ! return (this.ignore); ! } ! ! ! /** ! * Getter for the name attribute ! * ! * @return The value of name attribute ! * @jsp:attribute name="name" required="true" rtexprvalue="true" ! */ ! public String getName() ! { ! return (this.name); ! } ! ! ! /** ! * Getter for the scope attribute ! * ! * @return The value of scope attribute ! * @jsp:attribute name="scope" required="false" rtexprvalue="true" ! */ ! public String getScope() ! { ! return (this.scope); ! } ! ! ! /** Release all allocated resources. */ ! public void release() ! { ! super.release(); ! filter = true; ! ignore = false; ! full = false; ! name = null; ! scope = null; ! } ! ! ! /** ! * Setter for the filter attribute ! * ! * @param filter The new filter value ! */ ! public void setFilter(boolean filter) ! { ! this.filter = filter; ! } ! ! ! /** ! * Sets the full attribute of the MBeanNameTag object ! * ! * @param full The new full value ! */ ! public void setFull(boolean full) ! { ! this.full = full; ! } ! ! ! /** ! * Setter for the ignore attribute ! * ! * @param ignore The new ignore value ! */ ! public void setIgnore(boolean ignore) ! { ! this.ignore = ignore; ! } ! ! ! /** ! * Setter for the name attribute ! * ! * @param name The new name value ! */ ! public void setName(String name) ! { ! this.name = name; ! } ! ! ! /** ! * Setter for the scope attribute ! * ! * @param scope The new scope value ! */ ! public void setScope(String scope) ! { ! this.scope = scope; ! } ! } ! --- 1,218 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.web.taglib; ! ! import javax.servlet.jsp.JspException; ! import javax.servlet.jsp.tagext.TagSupport; ! ! import org.apache.struts.util.RequestUtils; ! import org.apache.struts.util.ResponseUtils; ! import org.ejtools.jmx.browser.model.Node; ! import org.ejtools.jmx.browser.model.Resource; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 25 avril 2002 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @jsp:tag name="mbeanName" body-content="empty" ! */ ! public class MBeanNameTag extends TagSupport ! { ! /** Filter the rendered output for characters that are sensitive in HTML? */ ! protected boolean filter = true; ! /** Should we ignore missing beans and simply output nothing? */ ! protected boolean full = true; ! /** Should we ignore missing beans and simply output nothing? */ ! protected boolean ignore = false; ! /** Name of the bean that contains the data we will be rendering. */ ! protected String name = null; ! /** The scope to be searched to retrieve the specified bean. */ ! protected String scope = null; ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Returned Value ! * @exception JspException Description of the Exception ! */ ! public int doStartTag() ! throws JspException ! { ! String output = ""; ! ! // Look up the requested bean (if necessary) ! Node node = (Node) RequestUtils.lookup(pageContext, name, scope); ! ! if (ignore) ! { ! if (node == null) ! { ! return (SKIP_BODY); ! } ! // Nothing to output ! } ! ! if (node instanceof Resource) ! { ! Resource res = (Resource) node; ! output = res.getCanonicalName(); ! ! if (!full) ! { ! output = output.substring(res.getDomain().length() + 1); ! } ! } ! else ! { ! output = node.toString(); ! } ! ! if (filter) ! { ! ResponseUtils.write(pageContext, ResponseUtils.filter(output)); ! } ! else ! { ! ResponseUtils.write(pageContext, output); ! } ! ! // Continue processing this page ! return (SKIP_BODY); ! } ! ! ! /** ! * Getter for the filter attribute ! * ! * @return The value of filter attribute ! * @jsp:attribute name="filter" required="false" rtexprvalue="true" ! */ ! public boolean getFilter() ! { ! return (this.filter); ! } ! ! ! /** ! * Gets the full attribute of the MBeanNameTag object ! * ! * @return The full value ! * @jsp:attribute name="full" required="false" rtexprvalue="true" ! */ ! public boolean getFull() ! { ! return (this.full); ! } ! ! ! /** ! * Getter for the ignore attribute ! * ! * @return The value of ignore attribute ! * @jsp:attribute name="ignore" required="false" rtexprvalue="true" ! */ ! public boolean getIgnore() ! { ! return (this.ignore); ! } ! ! ! /** ! * Getter for the name attribute ! * ! * @return The value of name attribute ! * @jsp:attribute name="name" required="true" rtexprvalue="true" ! */ ! public String getName() ! { ! return (this.name); ! } ! ! ! /** ! * Getter for the scope attribute ! * ! * @return The value of scope attribute ! * @jsp:attribute name="scope" required="false" rtexprvalue="true" ! */ ! public String getScope() ! { ! return (this.scope); ! } ! ! ! /** Release all allocated resources. */ ! public void release() ! { ! super.release(); ! filter = true; ! ignore = false; ! full = false; ! name = null; ! scope = null; ! } ! ! ! /** ! * Setter for the filter attribute ! * ! * @param filter The new filter value ! */ ! public void setFilter(boolean filter) ! { ! this.filter = filter; ! } ! ! ! /** ! * Sets the full attribute of the MBeanNameTag object ! * ! * @param full The new full value ! */ ! public void setFull(boolean full) ! { ! this.full = full; ! } ! ! ! /** ! * Setter for the ignore attribute ! * ! * @param ignore The new ignore value ! */ ! public void setIgnore(boolean ignore) ! { ! this.ignore = ignore; ! } ! ! ! /** ! * Setter for the name attribute ! * ! * @param name The new name value ! */ ! public void setName(String name) ! { ! this.name = name; ! } ! ! ! /** ! * Setter for the scope attribute ! * ! * @param scope The new scope value ! */ ! public void setScope(String scope) ! { ! this.scope = scope; ! } ! } ! Index: MBeanParameterClassTag.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/web/taglib/MBeanParameterClassTag.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MBeanParameterClassTag.java 10 Feb 2003 20:49:34 -0000 1.1 --- MBeanParameterClassTag.java 27 Nov 2003 01:13:08 -0000 1.2 *************** *** 1,176 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.web.taglib; ! ! import javax.management.MBeanParameterInfo; ! import javax.servlet.jsp.JspException; ! import javax.servlet.jsp.tagext.TagSupport; ! ! import org.apache.struts.util.RequestUtils; ! import org.apache.struts.util.ResponseUtils; ! import org.ejtools.util.ClassTools; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 25 avril 2002 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @jsp:tag name="mbeanParameterClass" body-content="empty" ! */ ! public class MBeanParameterClassTag extends TagSupport ! { ! /** Filter the rendered output for characters that are sensitive in HTML? */ ! protected boolean filter = true; ! /** Should we ignore missing beans and simply output nothing? */ ! protected boolean ignore = false; ! /** Name of the bean that contains the data we will be rendering. */ ! protected String name = null; ! /** The scope to be searched to retrieve the specified bean. */ ! protected String scope = null; ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Returned Value ! * @exception JspException Description of the Exception ! */ ! public int doStartTag() ! throws JspException ! { ! // Look up the requested bean (if necessary) ! MBeanParameterInfo info = (MBeanParameterInfo) RequestUtils.lookup(pageContext, name, scope); ! if (ignore) ! { ! if (info == null) ! { ! return (SKIP_BODY); ! } ! // Nothing to output ! } ! ! String output = ClassTools.classDisplay(info.getType()); ! ! if (filter) ! { ! ResponseUtils.write(pageContext, ResponseUtils.filter(output)); ! } ! else ! { ! ResponseUtils.write(pageContext, output); ! } ! ! // Continue processing this page ! return (SKIP_BODY); ! } ! ! ! /** ! * Getter for the filter attribute ! * ! * @return The value of filter attribute ! * @jsp:attribute name="filter" required="false" rtexprvalue="true" ! */ ! public boolean getFilter() ! { ! return (this.filter); ! } ! ! ! /** ! * Getter for the ignore attribute ! * ! * @return The value of ignore attribute ! * @jsp:attribute name="ignore" required="false" rtexprvalue="true" ! */ ! public boolean getIgnore() ! { ! return (this.ignore); ! } ! ! ! /** ! * Getter for the name attribute ! * ! * @return The value of name attribute ! * @jsp:attribute name="name" required="true" rtexprvalue="true" ! */ ! public String getName() ! { ! return (this.name); ! } ! ! ! /** ! * Getter for the scope attribute ! * ! * @return The value of scope attribute ! * @jsp:attribute name="scope" required="false" rtexprvalue="true" ! */ ! public String getScope() ! { ! return (this.scope); ! } ! ! ! /** Release all allocated resources. */ ! public void release() ! { ! super.release(); ! filter = true; ! ignore = false; ! name = null; ! scope = null; ! } ! ! ! /** ! * Setter for the filter attribute ! * ! * @param filter The new filter value ! */ ! public void setFilter(boolean filter) ! { ! this.filter = filter; ! } ! ! ! /** ! * Setter for the ignore attribute ! * ! * @param ignore The new ignore value ! */ ! public void setIgnore(boolean ignore) ! { ! this.ignore = ignore; ! } ! ! ! /** ! * Setter for the name attribute ! * ! * @param name The new name value ! */ ! public void setName(String name) ! { ! this.name = name; ! } ! ! ! /** ! * Setter for the scope attribute ! * ! * @param scope The new scope value ! */ ! public void setScope(String scope) ! { ! this.scope = scope; ! } ! } ! --- 1,176 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.web.taglib; ! ! import javax.management.MBeanParameterInfo; ! import javax.servlet.jsp.JspException; ! import javax.servlet.jsp.tagext.TagSupport; ! ! import org.apache.struts.util.RequestUtils; ! import org.apache.struts.util.ResponseUtils; ! import org.ejtools.util.ClassTools; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 25 avril 2002 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @jsp:tag name="mbeanParameterClass" body-content="empty" ! */ ! public class MBeanParameterClassTag extends TagSupport ! { ! /** Filter the rendered output for characters that are sensitive in HTML? */ ! protected boolean filter = true; ! /** Should we ignore missing beans and simply output nothing? */ ! protected boolean ignore = false; ! /** Name of the bean that contains the data we will be rendering. */ ! protected String name = null; ! /** The scope to be searched to retrieve the specified bean. */ ! protected String scope = null; ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Returned Value ! * @exception JspException Description of the Exception ! */ ! public int doStartTag() ! throws JspException ! { ! // Look up the requested bean (if necessary) ! MBeanParameterInfo info = (MBeanParameterInfo) RequestUtils.lookup(pageContext, name, scope); ! if (ignore) ! { ! if (info == null) ! { ! return (SKIP_BODY); ! } ! // Nothing to output ! } ! ! String output = ClassTools.classDisplay(info.getType()); ! ! if (filter) ! { ! ResponseUtils.write(pageContext, ResponseUtils.filter(output)); ! } ! else ! { ! ResponseUtils.write(pageContext, output); ! } ! ! // Continue processing this page ! return (SKIP_BODY); ! } ! ! ! /** ! * Getter for the filter attribute ! * ! * @return The value of filter attribute ! * @jsp:attribute name="filter" required="false" rtexprvalue="true" ! */ ! public boolean getFilter() ! { ! return (this.filter); ! } ! ! ! /** ! * Getter for the ignore attribute ! * ! * @return The value of ignore attribute ! * @jsp:attribute name="ignore" required="false" rtexprvalue="true" ! */ ! public boolean getIgnore() ! { ! return (this.ignore); ! } ! ! ! /** ! * Getter for the name attribute ! * ! * @return The value of name attribute ! * @jsp:attribute name="name" required="true" rtexprvalue="true" ! */ ! public String getName() ! { ! return (this.name); ! } ! ! ! /** ! * Getter for the scope attribute ! * ! * @return The value of scope attribute ! * @jsp:attribute name="scope" required="false" rtexprvalue="true" ! */ ! public String getScope() ! { ! return (this.scope); ! } ! ! ! /** Release all allocated resources. */ ! public void release() ! { ! super.release(); ! filter = true; ! ignore = false; ! name = null; ! scope = null; ! } ! ! ! /** ! * Setter for the filter attribute ! * ! * @param filter The new filter value ! */ ! public void setFilter(boolean filter) ! { ! this.filter = filter; ! } ! ! ! /** ! * Setter for the ignore attribute ! * ! * @param ignore The new ignore value ! */ ! public void setIgnore(boolean ignore) ! { ! this.ignore = ignore; ! } ! ! ! /** ! * Setter for the name attribute ! * ! * @param name The new name value ! */ ! public void setName(String name) ! { ! this.name = name; ! } ! ! ! /** ! * Setter for the scope attribute ! * ! * @param scope The new scope value ! */ ! public void setScope(String scope) ! { ! this.scope = scope; ! } ! } ! Index: MBeanParameterEditorTag.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/web/taglib/MBeanParameterEditorTag.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MBeanParameterEditorTag.java 10 Feb 2003 21:26:43 -0000 1.2 --- MBeanParameterEditorTag.java 27 Nov 2003 01:13:08 -0000 1.3 *************** *** 1,345 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.web.taglib; ! ! import java.beans.PropertyEditor; ! ! import javax.management.MBeanParameterInfo; ! import javax.servlet.jsp.JspException; ! import javax.servlet.jsp.tagext.TagSupport; ! ! import org.apache.log4j.Logger; ! import org.apache.struts.util.MessageResources; ! import org.apache.struts.util.RequestUtils; ! import org.apache.struts.util.ResponseUtils; ! import org.ejtools.beans.CustomPropertyEditorManager; ! import org.ejtools.util.ClassTools; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 25 avril 2002 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @jsp:tag name="mbeanParameterEditor" body-content="empty" ! */ ! public class MBeanParameterEditorTag extends TagSupport ! { ! /** Filter the rendered output for characters that are sensitive in HTML? */ ! protected boolean filter = true; ! /** Description of the Field */ ! protected String id = null; ! /** Should we ignore missing beans and simply output nothing? */ ! protected boolean ignore = false; ! /** Name of the bean that contains the data we will be rendering. */ ! protected String name = null; ! /** The scope to be searched to retrieve the specified bean. */ ! protected String scope = null; ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(MBeanAttributeEditorTag.class); ! /** Description of the Field */ ! private static MessageResources messages = MessageResources.getMessageResources("org.ejtools.jmx.browser.web.taglib.MBeanAttributeInfoEditor"); ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Returned Value ! * @exception JspException Description of the Exception ! */ ! public int doStartTag() ! throws JspException ! { ! // Look up the requested bean (if necessary) ! MBeanParameterInfo info = (MBeanParameterInfo) RequestUtils.lookup(pageContext, name, scope); ! ! if (ignore) ! { ! if (info == null) ! { ! return (SKIP_BODY); ! } ! // Nothing to output ! } ! ! PropertyEditor propertyeditor = null; ! Class c = ClassTools.getClass(info.getType()); ! ! logger.debug("Parameter class " + c); ! ! if (c == null) ! { ! this.addUnsupportedParameter(); ! } ! else ! { ! if (c.isArray()) ! { ! this.addUnsupportedArrayParameter(); ! } ! else ! { ! propertyeditor = CustomPropertyEditorManager.findEditor(c); ! ! logger.debug("Property Editor " + propertyeditor); ! ! if (propertyeditor == null) ! { ! this.addUnsupportedParameter(); ! } ! else ! { ! this.addParameter(propertyeditor, info); ! } ! } ! } ! ! // Continue processing this page ! return (SKIP_BODY); ! } ! ! ! /** ! * Getter for the filter attribute ! * ! * @return The value of filter attribute ! * @jsp:attribute name="filter" required="false" rtexprvalue="true" ! */ ! public boolean getFilter() ! { ! return (this.filter); ! } ! ! ! /** ! * @return The id value ! * @jsp:attribute name="id" required="true" rtexprvalue="true" ! */ ! public String getId() ! { ! return (this.id); ! } ! ! ! /** ! * Getter for the ignore attribute ! * ! * @return The value of ignore attribute ! * @jsp:attribute name="ignore" required="false" rtexprvalue="true" ! */ ! public boolean getIgnore() ! { ! return (this.ignore); ! } ! ! ! /** ! * Getter for the name attribute ! * ! * @return The value of name attribute ! * @jsp:attribute name="name" required="true" rtexprvalue="true" ! */ ! public String getName() ! { ! return (this.name); ! } ! ! ! /** ! * Getter for the scope attribute ! * ! * @return The value of scope attribute ! * @jsp:attribute name="scope" required="false" rtexprvalue="true" ! */ ! public String getScope() ! { ! return (this.scope); ! } ! ! ! /** Release all allocated resources. */ ! public void release() ! { ! super.release(); ! filter = true; ! ignore = false; ! name = null; ! scope = null; ! id = null; ! } ! ! ! /** ! * Setter for the filter attribute ! * ! * @param filter The new filter value ! */ ! public void setFilter(boolean filter) ! { ! this.filter = filter; ! } ! ! ! /** ! * Sets the id attribute of the MBeanParameterEditorTag object ! * ! * @param id The new id value ! */ ! public void setId(String id) ! { ! this.id = id; ! } ! ! ! /** ! * Setter for the ignore attribute ! * ! * @param ignore The new ignore value ! */ ! public void setIgnore(boolean ignore) ! { ! this.ignore = ignore; ! } ! ! ! /** ! * Setter for the name attribute ! * ! * @param name The new name value ! */ ! public void setName(String name) ! { ! this.name = name; ! } ! ! ! /** ! * Setter for the scope attribute ! * ! * @param scope The new scope value ! */ ! public void setScope(String scope) ! { ! this.scope = scope; ! } ! ! ! /** ! * Adds a feature to the UnsupportedProperty attribute of the MBeanAttributeEditorTag object ! * ! * @param propertyeditor The feature to be added to the Parameter attribute ! * @param info The feature to be added to the Parameter attribute ! * @exception JspException Description of the Exception ! */ ! protected void addParameter(PropertyEditor propertyeditor, MBeanParameterInfo info) ! throws JspException ! { ! StringBuffer buffer = new StringBuffer(); ! int id = -1; ! ! logger.debug("addParameter " + propertyeditor + " " + info.getName()); ! ! try ! { ! Integer value = (Integer) pageContext.getAttribute(getId()); ! id = value.intValue(); ! } ! catch (Exception e) ! { ! logger.error("Exception during numbering reading " + e.getMessage()); ! throw new JspException(e.getMessage()); ! } ! ! buffer.append("<input type=\"hidden\" name=\":parameter:"); ! buffer.append(id); ! buffer.append("\" value=\""); ! buffer.append(info.getType()); ! buffer.append("\"/>"); ! ! buffer.append("<input type=\"hidden\" name=\":editor:"); ! buffer.append(id); ! buffer.append("\" value=\""); ! buffer.append(propertyeditor.getClass().getName()); ! buffer.append("\"/>"); ! ! // Boolean types ! if (("java.lang.Boolean".equals(info.getType())) || ("boolean".equals(info.getType()))) ! { ! buffer.append("<select name=\":value:"); ! buffer.append(id); ! buffer.append("\">"); ! ! buffer.append("<option value=\"true\">"); ! buffer.append(messages.getMessage("boolean.true")); ! buffer.append("</option>"); ! ! buffer.append("<option value=\"false\">"); ! buffer.append(messages.getMessage("boolean.false")); ! buffer.append("</option>"); ! ! buffer.append("</select>"); ! } ! // Others types ! else ! { ! buffer.append("<input type=\"text\" name=\":value:"); ! buffer.append(id); ! buffer.append("\"/>"); ! } ! ! ResponseUtils.write(pageContext, buffer.toString()); ! } ! ! ! /** ! * Adds a feature to the UnsupportedProperty attribute of the MBeanAttributeEditorTag object ! ... [truncated message content] |