public code v1

This commit is contained in:
Francisco Jesús Martínez Mimbrera
2026-05-23 00:32:57 +02:00
commit 759a8968a2
4357 changed files with 163763 additions and 0 deletions
@@ -0,0 +1,108 @@
package flintstones.model.problemelement.service;
import flintstones.entity.problemelement.entities.ProblemElement;
/**
* The Interface IProblemElementService.
*/
public interface IProblemElementService {
/**
* Adds the problem element to the service.
*
* @param problemElement the problem element
*/
void add(ProblemElement problemElement) throws RuntimeException;
/**
* Gets the all the problem element with the given type.
*
* @param type the type
* @return the all
*/
ProblemElement[] getAll(String type);
/**
* Gets the only problem element of the given type in the service.
* If there is more than one it throws an error.
*
* @param type the type
* @return the only
* @throws RuntimeException the runtime exception
*/
ProblemElement getOnly(String type) throws RuntimeException;
/**
* Gets the generic problemElement.
*
* @return the generic
*/
ProblemElement getGeneric();
/**
* Gets the problem element by its id.
*
* @param type the type
* @param name the name
* @return the by id
*/
ProblemElement getById(String type, String id);
/**
* Gets the problem element by its name.
*
* @param type the type
* @param name the name
* @return the by name
*/
ProblemElement getByName(String type, String name);
/**
* Gets the problem element by its canonical name.
*
* @param type the type
* @param canonicalName the canonical name
* @return the by canonical name
*/
ProblemElement getByCanonicalName(String type, String canonicalName);
/**
* Gets the main (root) elements.
*
* @param type the type
* @return the main elements
*/
ProblemElement[] getMainElements(String type);
/**
* Gets the sub elements.
*
* @param type the type
* @return the sub elements
*/
ProblemElement[] getSubElements(String type);
/**
* Gets the sub elements.
*
* @param type the type
* @param root the root
* @return the sub elements
*/
ProblemElement[] getSubElements(String type, ProblemElement root);
/**
* Delete all the problem elements.
*/
void deleteAll();
/**
* Delete a problem element.
*
* @param pe the pe
* @return true, if successful
*/
boolean delete(ProblemElement problemElement);
}