org.opennms.netmgt.model.AggregateStatusDefinition Maven / Gradle / Ivy
/*
* Licensed to The OpenNMS Group, Inc (TOG) under one or more
* contributor license agreements. See the LICENSE.md file
* distributed with this work for additional information
* regarding copyright ownership.
*
* TOG licenses this file to You under the GNU Affero General
* Public License Version 3 (the "License") or (at your option)
* any later version. You may not use this file except in
* compliance with the License. You may obtain a copy of the
* License at:
*
* https://www.gnu.org/licenses/agpl-3.0.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package org.opennms.netmgt.model;
import java.util.Set;
/**
* This class defines how the AggregateStatus object is to be
* created and it's properties are to be populated.
*
* @author David Hustace
*/
public class AggregateStatusDefinition {
private int m_id;
private String m_name;
private String m_reportCategory;
private Set m_categories;
/**
* Constructor for AggregateStatusDefinition.
*/
public AggregateStatusDefinition() {
}
/**
* Constructor for AggregateStatusDefinition.
*
* @param aggrStatus a {@link java.lang.String} object.
* @param categories a {@link java.util.Set} object.
*/
public AggregateStatusDefinition(String aggrStatus, Set categories) {
if (aggrStatus == null || categories == null || categories.isEmpty()) {
throw new IllegalArgumentException("Invalid arguments");
}
m_name = aggrStatus;
m_categories = categories;
}
/**
* getId
*
* @return a {@link java.lang.Integer} object.
*/
public Integer getId() {
return m_id;
}
/**
* setId
*
* @param id a {@link java.lang.Integer} object.
*/
public void setId(Integer id) {
m_id = id;
}
/**
* getName
*
* @return a {@link java.lang.String} object.
*/
public String getName() {
return m_name;
}
/**
* setName
*
* @param name a {@link java.lang.String} object.
*/
public void setName(String name) {
m_name = name;
}
/**
* getCategories
*
* @return a {@link java.util.Set} object.
*/
public Set getCategories() {
return m_categories;
}
/**
* setCategories
*
* @param categories a {@link java.util.Set} object.
*/
public void setCategories(Set categories) {
m_categories = categories;
}
/**
* toString
*
* @return a {@link java.lang.String} object.
*/
@Override
public String toString() {
return getName();
}
/**
* getReportCategory
*
* @return a {@link java.lang.String} object.
*/
public String getReportCategory() {
return m_reportCategory;
}
/**
* setReportCategory
*
* @param reportCategory a {@link java.lang.String} object.
*/
public void setReportCategory(String reportCategory) {
m_reportCategory = reportCategory;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy