Class ProductModels

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

public final class ProductModels extends Object
ECMWF Product Data Store (OpenECPDS) Project Product models: a model (e.g. "IFS" or "AIFS") is only identified by its unique name, and a product belongs to at most one model. Both are kept in the SYS_CONFIG table (groups "ProductModelName" for the model names and "ProductModel" for the product to model assignments), so no schema change is needed. Models are maintained from Admin Tasks → Product Descriptions and used to group and filter the products of the Delay Notification page.
Since:
2026-10-12
Version:
8.2.0
Author:
Laurent Gougeon - syi@ecmwf.int, ECMWF.
  • Method Details

    • names

      public static List<String> names() throws DataBaseException, RemoteException
      Gets the names of all the models, sorted alphabetically (ignoring the case).
      Returns:
      the model names
      Throws:
      RemoteException - on remote failure
      DataBaseException - if the models cannot be read
    • assignments

      public static Map<String,String> assignments() throws DataBaseException, RemoteException
      Gets the model of each product that has one.
      Returns:
      the models, keyed by product name (sorted ignoring the case)
      Throws:
      RemoteException - on remote failure
      DataBaseException - if the assignments cannot be read
    • productsPerModel

      public static Map<String, List<String>> productsPerModel() throws DataBaseException, RemoteException
      Gets the products of each model, including the models without any product.
      Returns:
      the product names of each model, keyed by model name (sorted ignoring the case)
      Throws:
      RemoteException - on remote failure
      DataBaseException - if the models cannot be read
    • save

      public static void save(String oldName, String name, Collection<String> products) throws DataBaseException, RemoteException
      Creates a model, or renames and updates the products of an existing one. The list of products is authoritative: the products of the model that are not in the list are removed from it, and the listed products that belong to another model are moved to this one.
      Parameters:
      oldName - the current name of the model to update, or null to create a new model
      name - the (new) unique name of the model
      products - the names of the products of the model
      Throws:
      RemoteException - on remote failure
      DataBaseException - if the name or a product is invalid, if the name is already used, or if the update fails
    • delete

      public static void delete(String name) throws DataBaseException, RemoteException
      Deletes a model; its products are left without model.
      Parameters:
      name - the name of the model
      Throws:
      RemoteException - on remote failure
      DataBaseException - if the model does not exist or cannot be deleted
    • retainProducts

      public static void retainProducts(Collection<String> valid) throws DataBaseException, RemoteException
      Removes from their model the products which are not in the specified collection (e.g. products which no longer have a product description).
      Parameters:
      valid - the product names which can stay assigned to a model
      Throws:
      RemoteException - on remote failure
      DataBaseException - if the update fails