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-2015 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 * Tells whether this is the number of aborted operations. 043 * @return <CODE>true</CODE> if this corresponds to the number of aborted 044 * operations and <CODE>false</CODE> otherwise. 045 */ 046 boolean isAborted(); 047 048 /** 049 * Return whether this attribute contains a numeric value or not. 050 * @return <CODE>true</CODE> if the value is numeric and <CODE>false</CODE> 051 * otherwise. 052 */ 053 boolean isNumeric(); 054 055 /** 056 * Return whether this attribute contains a time value or not. 057 * @return <CODE>true</CODE> if the value is a time and <CODE>false</CODE> 058 * otherwise. 059 */ 060 boolean isTime(); 061 062 /** 063 * Return whether this attribute contains a numeric date value or not. 064 * The date is a long value in milliseconds. 065 * @return <CODE>true</CODE> if the value is date and <CODE>false</CODE> 066 * otherwise. 067 */ 068 boolean isNumericDate(); 069 070 /** 071 * Return whether this attribute contains a GMT date value or not. The date 072 * has a format of type ServerConstants.DATE_FORMAT_GMT_TIME. 073 * @return <CODE>true</CODE> if the value is a GMT date and <CODE>false</CODE> 074 * otherwise. 075 */ 076 boolean isGMTDate(); 077 078 /** 079 * Return whether this attribute represents a value in bytes or not. 080 * @return <CODE>true</CODE> if the value represents a value in bytes and 081 * <CODE>false</CODE> otherwise. 082 */ 083 boolean isValueInBytes(); 084 085 /** 086 * Returns <CODE>true</CODE> if the average for this attribute makes sense 087 * and <CODE>false</CODE> otherwise. 088 * @return <CODE>true</CODE> if the average for this attribute makes sense 089 * and <CODE>false</CODE> otherwise. 090 */ 091 boolean canHaveAverage(); 092}