Overview | Package | Class | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hyperic.hq.ui.taglib
Class MetricDisplayTag

    java.lang.Object
      javax.servlet.jsp.tagext.TagSupport
          org.hyperic.hq.ui.taglib.MetricDisplayTag

All Implemented Interfaces:
  java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

    public class MetricDisplayTag

extends javax.servlet.jsp.tagext.TagSupport

This is a locale aware tag for displaying metrics and units. Suppose you have a metricDisplaySummary.setMin(9234289) and metricDisplaySummary.setUnit("bytes") set in the bean, this tag allows you to say: and get this output: 9,018 KB This class assumes that any re-scaling of the metric value and unit string as well as any localization of the unit string was performed prior to the data being parameterized for this tag. To assure that the locale of the unit string agrees with the locale of the metric, use the jakarta-struts key org.apache.struts.Globals.LOCALE_KEY

See Also:
  Serialized Form

Field Summary
`protected java.lang.String` | `bundle`
`protected java.lang.String` | `locale`
`static org.apache.commons.logging.Log` | `log`

Fields inherited from class javax.servlet.jsp.tagext.TagSupport
`id, pageContext`

Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
`EVAL_BODY_AGAIN`

Fields inherited from interface javax.servlet.jsp.tagext.Tag
`EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE`

Constructor Summary
`MetricDisplayTag()`

Method Summary
`int` | `doEndTag()`
`int` | `doStartTag()`
`java.lang.String` | `getDefaultKey()` Returns the defaultKey.
`java.lang.String` | `getLongDate()` Returns the flag for whether or not the metric is a long/date
`java.lang.String` | `getMetric()` Returns the metric.
`java.lang.String` | `getSpan()` Returns the span.
`java.lang.String` | `getUnit()` Returns the unit.
`void` | `release()`
`void` | `setDefaultKey(java.lang.String defaultKey)` Sets the defaultKey.
`void` | `setLongDate(java.lang.String longDate)`
`void` | `setMetric(java.lang.String metric)` Sets the metric.
`void` | `setSpan(java.lang.String span)` Sets the span.
`void` | `setUnit(java.lang.String unit)` Sets the unit.
`void` | `validate()`

Methods inherited from class javax.servlet.jsp.tagext.TagSupport
`doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### log

    public static org.apache.commons.logging.Log log

### locale

    protected java.lang.String locale

### bundle

    protected java.lang.String bundle

Constructor Detail

### MetricDisplayTag

    public MetricDisplayTag()

Method Detail

### doEndTag

    public int doEndTag()
                 throws javax.servlet.jsp.JspException

  Specified by:
    `doEndTag` in interface `javax.servlet.jsp.tagext.Tag`
  Overrides:
    `doEndTag` in class `javax.servlet.jsp.tagext.TagSupport`
  Throws:
    `javax.servlet.jsp.JspException`

### validate

    public void validate()
                  throws javax.servlet.jsp.JspException

  Throws:
    `javax.servlet.jsp.JspException`

### release

    public void release()

  Specified by:
    `release` in interface `javax.servlet.jsp.tagext.Tag`
  Overrides:
    `release` in class `javax.servlet.jsp.tagext.TagSupport`

### doStartTag

    public int doStartTag()
                   throws javax.servlet.jsp.JspException

  Specified by:
    `doStartTag` in interface `javax.servlet.jsp.tagext.Tag`
  Overrides:
    `doStartTag` in class `javax.servlet.jsp.tagext.TagSupport`
  Throws:
    `javax.servlet.jsp.JspException`

### getMetric

    public java.lang.String getMetric()

  Returns the metric.

  Returns:
    String

### setMetric

    public void setMetric(java.lang.String metric)

  Sets the metric.

  Parameters:
    `metric` - The metric to set

### getSpan

    public java.lang.String getSpan()

  Returns the span.

  Returns:
    String

### setDefaultKey

    public void setDefaultKey(java.lang.String defaultKey)

  Sets the defaultKey.

  Parameters:
    `defaultKey` - The defaultKey to set

### getDefaultKey

    public java.lang.String getDefaultKey()

  Returns the defaultKey.

  Returns:
    String

### setSpan

    public void setSpan(java.lang.String span)

  Sets the span.

  Parameters:
    `span` - The span to set

### getUnit

    public java.lang.String getUnit()

  Returns the unit.

  Returns:
    String

### setLongDate

    public void setLongDate(java.lang.String longDate)

  Parameters:
    `longDate` -

### getLongDate

    public java.lang.String getLongDate()

  Returns the flag for whether or not the metric is a long/date

  Returns:
    String

### setUnit

    public void setUnit(java.lang.String unit)

  Sets the unit.

  Parameters:
    `unit` - The unit to set

Overview | Package | Class | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.