Class MonitoringRequest

java.lang.Object
ecmwf.ecpds.master.plugin.http.controller.monitoring.MonitoringRequest

public class MonitoringRequest extends Object
The Class MonitoringRequest.
  • Field Details

    • DESTINATIONS_PER_PAGE_OR_COLUMN

      protected static final int DESTINATIONS_PER_PAGE_OR_COLUMN
      The Constant DESTINATIONS_PER_PAGE_OR_COLUMN.
  • Constructor Details

  • Method Details

    • refreshContactsList

      public static void refreshContactsList(Map<String,String> contactsPerDestinations)
      Refresh contacts list. Compute the contacts list and dump it to the configuration file!
      Parameters:
      contactsPerDestinations - the contacts per destinations
    • getDestinations

      public Collection<Destination> getDestinations()
      Gets the destinations.
      Returns:
      the destinations
    • getTypeOptions

      public Collection<ecmwf.web.util.bean.StringPair> getTypeOptions()
      Gets the type options.
      Returns:
      the type options
    • getNetworkOptions

      public Collection<ecmwf.web.util.bean.StringPair> getNetworkOptions()
      Gets the network options.
      Returns:
      the network options
    • getStatusOptions

      public Collection<ecmwf.web.util.bean.StringPair> getStatusOptions()
      Gets the status options.
      Returns:
      the status options
    • getProductWindow

      public Collection<ProductStatus> getProductWindow()
      Gets the product window.
      Returns:
      the product window
    • getProductWindowHeader

      public Collection<ProductStatus> getProductWindowHeader()
      Gets the product window header.
      Returns:
      the product window header
    • getAllProductNames

      public List<String> getAllProductNames()
      Gets the distinct, sorted list of all known product names, regardless of the current product-name filter. Used to populate the "Products" picker panel, so that products currently hidden by the filter can still be listed (and re-enabled) from it.
      Returns:
      the all product names
    • getStatus

      public ecmwf.ecpds.master.plugin.http.controller.monitoring.MonitoringRequest.Status getStatus()
      Gets the status.
      Returns:
      the status
    • getContacts

      public Map<String,String> getContacts()
      Gets the contacts.
      Returns:
      the contacts
    • getPage

      public String getPage()
      Gets the page.
      Returns:
      the page
    • setPage

      public void setPage(String page)
      Sets the page.
      Parameters:
      page - the new page
    • getPages

      public Collection<Integer> getPages()
      Gets the pages.
      Returns:
      the pages
    • getFiltered

      public String getFiltered()
      Gets the filtered.
      Returns:
      the filtered
    • mergeProductStatuses

      public static ProductStatus mergeProductStatuses(String product, List<ProductStatus> cycles)
      Merges several cycles/times of the same product into a single synthetic ProductStatus: the worst (highest severity) status among its non-"none" cycles is used for the color/label (falling back to "none" only if every cycle is "none"), the earliest scheduledTime is kept (so the merged pill sorts alongside its most urgent cycle, consistent with ProductStatusComparator), and the most recent lastUpdate/productTime are kept. The number of cycles being merged is stashed in the (otherwise unused, for this kind of entry) "buffer" field, so JSPs can show it (e.g. ${pro.buffer}) without needing a new interface method.
      Parameters:
      product - the product name
      cycles - the individual per-time entries for this product (non-empty)
      Returns:
      the merged, synthetic entry, with an empty "time"
    • getNearestToScheduleIndex

      public static int getNearestToScheduleIndex(Collection<ProductStatus> productStatuses)
      Gets the nearest to schedule index.
      Parameters:
      productStatuses - the product statuses
      Returns:
      The position within the where the product to sent next is.
    • getUpdated

      public Date getUpdated()
      Gets the updated.
      Returns:
      the updated
    • getStepsPerColumn

      public int getStepsPerColumn()
      Gets the steps per column.
      Returns:
      the steps per column