Class ProductModels
java.lang.Object
ecmwf.ecpds.master.plugin.http.controller.monitoring.ProductModels
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 Summary
Modifier and TypeMethodDescriptionGets the model of each product that has one.static voidDeletes a model; its products are left without model.names()Gets the names of all the models, sorted alphabetically (ignoring the case).Gets the products of each model, including the models without any product.static voidretainProducts(Collection<String> valid) Removes from their model the products which are not in the specified collection (e.g. products which no longer have a product description).static voidsave(String oldName, String name, Collection<String> products) Creates a model, or renames and updates the products of an existing one.
-
Method Details
-
names
Gets the names of all the models, sorted alphabetically (ignoring the case).- Returns:
- the model names
- Throws:
RemoteException- on remote failureDataBaseException- if the models cannot be read
-
assignments
Gets the model of each product that has one.- Returns:
- the models, keyed by product name (sorted ignoring the case)
- Throws:
RemoteException- on remote failureDataBaseException- if the assignments cannot be read
-
productsPerModel
public static Map<String, List<String>> productsPerModel() throws DataBaseException, RemoteExceptionGets 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 failureDataBaseException- 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, ornullto create a new modelname- the (new) unique name of the modelproducts- the names of the products of the model- Throws:
RemoteException- on remote failureDataBaseException- if the name or a product is invalid, if the name is already used, or if the update fails
-
delete
Deletes a model; its products are left without model.- Parameters:
name- the name of the model- Throws:
RemoteException- on remote failureDataBaseException- 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 failureDataBaseException- if the update fails
-