001/*
002 * CDDL HEADER START
003 *
004 * The contents of this file are subject to the terms of the
005 * Common Development and Distribution License, Version 1.0 only
006 * (the "License").  You may not use this file except in compliance
007 * with the License.
008 *
009 * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
010 * or http://forgerock.org/license/CDDLv1.0.html.
011 * See the License for the specific language governing permissions
012 * and limitations under the License.
013 *
014 * When distributing Covered Code, include this CDDL HEADER in each
015 * file and include the License file at legal-notices/CDDLv1_0.txt.
016 * If applicable, add the following below this CDDL HEADER, with the
017 * fields enclosed by brackets "[]" replaced with your own identifying
018 * information:
019 *      Portions Copyright [yyyy] [name of copyright owner]
020 *
021 * CDDL HEADER END
022 *
023 *
024 *      Copyright 2008-2009 Sun Microsystems, Inc.
025 *      Portions Copyright 2014-2015 ForgeRock AS
026 */
027package org.opends.guitools.controlpanel.datamodel;
028
029import org.forgerock.i18n.LocalizableMessage;
030
031/**
032 * An interface defining the different methods required by the UI components
033 * to display monitoring attributes data.
034 *
035 */
036public interface MonitoringAttributes
037{
038  /**
039   * Returns the message associated with the attribute (basically is the
040   * localized name of the operation associated with the attribute).
041   * @return the message associated with the attribute.
042   */
043  LocalizableMessage getMessage();
044
045  /**
046   * Returns the name of the attribute.
047   * @return the name of the attribute.
048   */
049  String getAttributeName();
050
051  /**
052   * Tells whether this is the number of aborted operations.
053   * @return <CODE>true</CODE> if this corresponds to the number of aborted
054   * operations and <CODE>false</CODE> otherwise.
055   */
056  boolean isAborted();
057
058  /**
059   * Return whether this attribute contains a numeric value or not.
060   * @return <CODE>true</CODE> if the value is numeric and <CODE>false</CODE>
061   * otherwise.
062   */
063  boolean isNumeric();
064
065  /**
066   * Return whether this attribute contains a time value or not.
067   * @return <CODE>true</CODE> if the value is a time and <CODE>false</CODE>
068   * otherwise.
069   */
070  boolean isTime();
071
072  /**
073   * Return whether this attribute contains a numeric date value or not.
074   * The date is a long value in milliseconds.
075   * @return <CODE>true</CODE> if the value is date and <CODE>false</CODE>
076   * otherwise.
077   */
078  boolean isNumericDate();
079
080  /**
081   * Return whether this attribute contains a GMT date value or not.  The date
082   * has a format of type ServerConstants.DATE_FORMAT_GMT_TIME.
083   * @return <CODE>true</CODE> if the value is a GMT date and <CODE>false</CODE>
084   * otherwise.
085   */
086  boolean isGMTDate();
087
088  /**
089   * Return whether this attribute represents a value in bytes or not.
090   * @return <CODE>true</CODE> if the value represents a value in bytes and
091   * <CODE>false</CODE> otherwise.
092   */
093  boolean isValueInBytes();
094
095  /**
096   * Returns <CODE>true</CODE> if the average for this attribute makes sense
097   * and <CODE>false</CODE> otherwise.
098   * @return <CODE>true</CODE> if the average for this attribute makes sense
099   * and <CODE>false</CODE> otherwise.
100   */
101  boolean canHaveAverage();
102}