Files
Flintstones/bundles/flintstones.model.valuation.service/src/flintstones/model/valuation/service/IValuationService.java
T
Francisco Jesús Martínez Mimbrera 759a8968a2 public code v1
2026-05-23 00:32:57 +02:00

118 lines
2.5 KiB
Java

package flintstones.model.valuation.service;
import java.util.HashMap;
import java.util.LinkedHashMap;
import flintstones.entity.domain.Domain;
import flintstones.entity.problemelement.ProblemElementKey;
import flintstones.entity.problemelement.entities.ProblemElement;
import flintstones.entity.valuation.Valuation;
/**
* The Interface IValuationService.
*
* @author Sinbad2 Valuation Service Proider
*/
public interface IValuationService {
/**
* Creates a Valuation for the given extension point with the given domain.
*
* @param id extension point id
* @param d domain
* @return Working valuation
*/
public Valuation create(Domain d);
/**
* Inserts or updates a valuation into the service.
*
* @param pek Problem element key to assing the valuation
* @param v The valuation
*/
void addOrUpdate(ProblemElementKey pek, Valuation v);
void removeValuation(ProblemElementKey pek);
/**
* Gets the extension id for the given domain type.
*
* @param domainType the domain type
* @return Every extension ID for the given domain
*/
String getExtensionIdFor(String domainType);
/**
* Gets the extension name for the given domain type.
*
* @param domainType the domain type
* @return the extension name for
*/
String getExtensionNameFor(String domainType);
/**
* Gets every valuation.
*
* @return Every valuation
*/
Valuation[] getAll();
/**
* Gets the valuation for a PEK.
*
* @param pek Problem element key
* @return The valuation assigned to the PE Key given
*/
Valuation getValuationFor(ProblemElementKey pek);
/**
* Removes the valuation for a given domain.
*
* @param domain the domain
*/
void removeValuationFor(Domain domain);
/**
* Removes the valuation for an PE item.
*
* @param type the type
* @param item the item
*/
void removeValuationFor(String type, ProblemElement item);
/**
* Gets the domain for a valuation.
*
* @param valuationId the valuation id
* @return the domain for
*/
String getDomainFor(String valuationId);
/**
* Clear the service memory.
*/
void clear();
/**
* Gets the all the Key-Value PEK-Valuation.
*
* @return the all KV
*/
LinkedHashMap<ProblemElementKey, Valuation> getAllKV();
/**
* Gets the all valuations for a given ProblemElement.
*
* @param item the item
* @return the all valuations
*/
Valuation[] getAllValuationsWith(ProblemElement item);
HashMap<ProblemElementKey, Valuation> getAllValuationsKVWith(ProblemElement item);
boolean isAssignmentFilled();
boolean isEvaluationFilled();
}