Example #1
0
  /**
   * Return all outages (optionally only unresolved outages) sorted by given sort style for the
   * given IP address.
   *
   * @param ipAddress a {@link java.lang.String} object.
   * @param sortStyle a {@link org.opennms.web.outage.SortStyle} object.
   * @param outType a {@link org.opennms.web.outage.OutageType} object.
   * @return an array of {@link org.opennms.web.outage.Outage} objects.
   * @throws java.sql.SQLException if any.
   */
  public static Outage[] getOutagesForInterface(
      String ipAddress, SortStyle sortStyle, OutageType outType) throws SQLException {
    if (ipAddress == null || sortStyle == null || outType == null) {
      throw new IllegalArgumentException("Cannot take null parameters.");
    }

    Filter[] filters = new Filter[] {new InterfaceFilter(ipAddress)};
    return (OutageFactory.getOutages(sortStyle, outType, filters));
  }
Example #2
0
  /**
   * Return all outages (optionally only unresolved outages) sorted by given sort style for the
   * given service identifier.
   *
   * @param serviceId a int.
   * @param sortStyle a {@link org.opennms.web.outage.SortStyle} object.
   * @param outType a {@link org.opennms.web.outage.OutageType} object.
   * @return an array of {@link org.opennms.web.outage.Outage} objects.
   * @throws java.sql.SQLException if any.
   */
  public static Outage[] getOutagesForService(
      int serviceId, SortStyle sortStyle, OutageType outType, ServletContext servletContext)
      throws SQLException {
    if (sortStyle == null || outType == null) {
      throw new IllegalArgumentException("Cannot take null parameters.");
    }

    Filter[] filters = new Filter[] {new ServiceFilter(serviceId, servletContext)};
    return (OutageFactory.getOutages(sortStyle, outType, filters));
  }
Example #3
0
 /**
  * Return all unresolved outages sorted by the given sort style.
  *
  * @param sortStyle a {@link org.opennms.web.outage.SortStyle} object.
  * @return an array of {@link org.opennms.web.outage.Outage} objects.
  * @throws java.sql.SQLException if any.
  */
 public static Outage[] getOutages(SortStyle sortStyle) throws SQLException {
   return OutageFactory.getOutages(sortStyle, OutageType.CURRENT, new Filter[0], -1, -1);
 }
Example #4
0
 /**
  * Return all outages (optionally only unresolved outages) sorted by the given sort style.
  *
  * @param sortStyle a {@link org.opennms.web.outage.SortStyle} object.
  * @param outType a {@link org.opennms.web.outage.OutageType} object.
  * @param filters an array of org$opennms$web$filter$Filter objects.
  * @return an array of {@link org.opennms.web.outage.Outage} objects.
  * @throws java.sql.SQLException if any.
  */
 public static Outage[] getOutages(SortStyle sortStyle, OutageType outType, Filter[] filters)
     throws SQLException {
   return OutageFactory.getOutages(sortStyle, outType, filters, -1, -1);
 }
Example #5
0
 /**
  * Return all unresolved outages sorted by the default sort style, outage identifier.
  *
  * @return an array of {@link org.opennms.web.outage.Outage} objects.
  * @throws java.sql.SQLException if any.
  */
 public static Outage[] getOutages() throws SQLException {
   return OutageFactory.getOutages(
       SortStyle.DEFAULT_SORT_STYLE, OutageType.CURRENT, new Filter[0], -1, -1);
 }