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